Files
oak-editor/io/config.h
T
2019-02-19 02:28:50 -08:00

125 lines
3.0 KiB
C++

/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CONFIG_H
#define CONFIG_H
#include <QString>
namespace olive {
const int kSaveVersion = 190219; // YYMMDD
const int kMinimumSaveVersion = 190219; // lowest compatible project version
enum TimecodeType {
kTimecodeDrop,
kTimecodeNonDrop,
kTimecodeFrames,
kTimecodeMilliseconds
};
enum RecordingMode {
RECORD_MODE_MONO,
RECORD_MODE_STEREO
};
enum AutoScrollMode {
AUTOSCROLL_NO_SCROLL,
AUTOSCROLL_PAGE_SCROLL,
AUTOSCROLL_SMOOTH_SCROLL
};
enum ProjectView {
PROJECT_VIEW_TREE,
PROJECT_VIEW_ICON
};
enum FrameQueueType {
FRAME_QUEUE_TYPE_FRAMES,
FRAME_QUEUE_TYPE_SECONDS
};
}
struct Config {
Config();
bool saved_layout;
bool show_track_lines;
bool scroll_zooms;
bool edit_tool_selects_links;
bool edit_tool_also_seeks;
bool select_also_seeks;
bool paste_seeks;
QString img_seq_formats;
bool rectified_waveforms;
int default_transition_length;
int timecode_view;
bool show_title_safe_area;
bool use_custom_title_safe_ratio;
double custom_title_safe_ratio;
bool enable_drag_files_to_timeline;
bool autoscale_by_default;
int recording_mode;
bool enable_seek_to_import;
bool enable_audio_scrubbing;
bool drop_on_media_to_replace;
int autoscroll;
int audio_rate;
bool fast_seeking;
bool hover_focus;
int project_view_type;
bool set_name_with_marker;
bool show_project_toolbar;
double previous_queue_size;
int previous_queue_type;
double upcoming_queue_size;
int upcoming_queue_type;
bool loop;
bool seek_also_selects;
QString css_path;
int effect_textbox_lines;
bool use_software_fallback;
bool center_timeline_timecodes;
QString preferred_audio_output;
QString preferred_audio_input;
QString language_file;
int waveform_resolution;
int thumbnail_resolution;
bool add_default_effects_to_clips;
void load(QString path);
void save(QString path);
};
struct RuntimeConfig {
RuntimeConfig();
bool shaders_are_enabled;
bool disable_blending;
QString external_translation_file;
};
namespace olive {
extern Config CurrentConfig;
extern RuntimeConfig CurrentRuntimeConfig;
}
#endif // CONFIG_H