#include <mainwindow.h>
MainWindow::MainWindow |
( |
QWidget * |
parent | ) |
|
|
explicit |
MainWindow::~MainWindow |
( |
| ) |
|
|
overridevirtual |
void MainWindow::changeEvent |
( |
QEvent * |
e | ) |
|
|
overrideprotectedvirtual |
Change event.
Overridden to handle language changes (e->type() == QEvent::LanguageChange) by calling Retranslate().
See documentation for QWidget::changeEvent() for more information.
- Parameters
-
- Returns
void MainWindow::closeEvent |
( |
QCloseEvent * |
e | ) |
|
|
overrideprotectedvirtual |
Close event.
Confirms whether the project can be closed, and if so performs various clean-up functions before the application exits. It's preferable to call clean-up functions here rather than in the destructor because this will get called first.
void MainWindow::editMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare Edit menu.
Primarily used to set the enabled state on Undo and Redo depending if there are undos/redos available.
void MainWindow::fileMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare File menu.
Primarily used to populate the Open Recent Projects menu.
void MainWindow::finished_first_paint |
( |
| ) |
|
|
signal |
Signal emitted once when the main window has finished initializing.
Emitted the first time paintEvent runs. Connect this to functions that must be completed post-initialization.
bool MainWindow::load_css_from_file |
( |
const QString & |
fn | ) |
|
Load a CSS/QSS style from file to customize Olive's interface.
- Parameters
-
fn | URL to load the CSS file from. |
- Returns
TRUE if CSS was successfully loaded.
void MainWindow::load_shortcuts |
( |
const QString & |
fn | ) |
|
Load shortcut file.
Loads a shortcut configuration from file and sets Olive to use them.
- Parameters
-
fn | URL of the shortcut file to be loaded |
void MainWindow::maximize_panel |
( |
| ) |
|
|
privateslot |
Maximizes the currently hovered panel.
Saves the current state of the panels/dock widgets and removes all except the currently hovered panel, effectively maximizing the panel to the entire window.
void MainWindow::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Paint event.
Overridden to provide the finished_first_paint() signal.
Set up the dock widget layout on the main window
For some reason, Qt didn't like this in the constructor. It would lead to several geometry issues with HiDPI on Windows, and also seemed to break QMainWindow::restoreState() which is why it took so long to implement saving/restoring panel layouts. Putting it in showEvent() didn't help either, nor did putting it in changeEvent() (QEvent::type() == QEvent::Polish). This is the only place it's functioned as expected.
Signal that window has finished loading.
void MainWindow::playbackMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare Playback menu.
Primarily used to set the checked state on the "Loop" item.
void MainWindow::reset_layout |
( |
| ) |
|
|
privateslot |
Reset panel layout to default.
Resets the current panel layout to default. Doesn't save the current layout.
void MainWindow::Restyle |
( |
| ) |
|
Set application's QStyle based on values from Config.
void MainWindow::Retranslate |
( |
| ) |
|
|
private |
void MainWindow::save_shortcuts |
( |
const QString & |
fn | ) |
|
Save shortcut file.
Saves the current shortcut configuration to file. Only saves shortcuts that have been changed from default.
- Parameters
-
fn | URL to save the shortcut file to. |
void MainWindow::set_panels_locked |
( |
bool |
locked | ) |
|
|
privateslot |
Set panel lock.
- Parameters
-
locked | If TRUE prevents panels from being moved around. Defaults to FALSE. |
void MainWindow::setup_layout |
( |
bool |
reset | ) |
|
|
private |
Internal function for setting the panel layout to a predetermined preset.
Resets layout to default and optionally loads a layout from file. If loading from file, this function will always load from get_config_path() + "/layout"
.
- Parameters
-
reset | TRUE if this function should just reset the current layout. FALSE if it should load from the aforementioned layout file. |
void MainWindow::setup_menus |
( |
| ) |
|
|
private |
Initialize menu bar menus and items.
Internal initialization function for all menus and menu items in the main window. Called once from the MainWindow() constructor.
void MainWindow::toggle_full_screen |
( |
| ) |
|
|
slot |
Toggles full screen mode.
Toggles the main window between full screen and windowed modes.
void MainWindow::toggle_panel_visibility |
( |
| ) |
|
|
privateslot |
Toggle whether a panel is visible or not.
Assumes the sender() QAction has a pointer to a QDockWidget in its data variable. Casts it and toggles its visibility.
void MainWindow::toolMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare Tools menu.
Primarily used to set the checked state on various settings available from the Tools menu.
void MainWindow::updateTitle |
( |
| ) |
|
Update window title.
Updates the window title to reflect the current project filename. Call if the project filename changes.
NOTE: It's recommended to use update_project_filename() from Olive::Global to update the filename completely instead of calling this function directly (update_project_filename() calls this function in the process).
void MainWindow::viewMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare View menu.
Primarily used to set the checked state of various options in the view menu (e.g. title safe area, timecode units, etc.)
void MainWindow::windowMenu_About_To_Be_Shown |
( |
| ) |
|
|
privateslot |
Function to prepare Window menu.
Primarily used to set the checked state of menu items corresponding to the panels that are currently visible.
QAction* MainWindow::about_action_ |
|
private |
QAction* MainWindow::action_search_ |
|
private |
QAction* MainWindow::autocut_silence_ |
|
private |
QAction* MainWindow::clear_open_recent_action |
|
private |
QAction* MainWindow::clear_undo_action_ |
|
private |
QAction* MainWindow::debug_log_ |
|
private |
QAction* MainWindow::decrease_track_height_ |
|
private |
QAction* MainWindow::delete_inout_point_ |
|
private |
QAction* MainWindow::deselect_all_action |
|
private |
QAction* MainWindow::drop_frame_action |
|
private |
QMenu* MainWindow::edit_menu |
|
private |
QAction* MainWindow::edit_to_in_point_ |
|
private |
QAction* MainWindow::edit_to_out_point_ |
|
private |
QAction* MainWindow::edit_tool_action |
|
private |
QAction* MainWindow::exit_action |
|
private |
QAction* MainWindow::export_action |
|
private |
QMenu* MainWindow::file_menu |
|
private |
bool MainWindow::first_show |
|
private |
QAction* MainWindow::frames_action |
|
private |
QAction* MainWindow::full_screen |
|
private |
QAction* MainWindow::full_screen_viewer_ |
|
private |
QAction* MainWindow::go_to_end_ |
|
private |
QAction* MainWindow::go_to_in_point_ |
|
private |
QAction* MainWindow::go_to_next_cut_ |
|
private |
QAction* MainWindow::go_to_out_point_ |
|
private |
QAction* MainWindow::go_to_prev_cut_ |
|
private |
QAction* MainWindow::go_to_start_ |
|
private |
QAction* MainWindow::hand_tool_action |
|
private |
QMenu* MainWindow::help_menu |
|
private |
QAction* MainWindow::import_action |
|
private |
QAction* MainWindow::increase_track_height_ |
|
private |
QAction* MainWindow::lock_panels_ |
|
private |
QAction* MainWindow::loop_action_ |
|
private |
QAction* MainWindow::maximize_panel_ |
|
private |
QAction* MainWindow::milliseconds_action |
|
private |
QMenu* MainWindow::new_menu |
|
private |
QAction* MainWindow::next_frame_ |
|
private |
QAction* MainWindow::no_autoscroll |
|
private |
QAction* MainWindow::nondrop_frame_action |
|
private |
QAction* MainWindow::open_action |
|
private |
QAction* MainWindow::open_project |
|
private |
QMenu* MainWindow::open_recent |
|
private |
QAction* MainWindow::page_autoscroll |
|
private |
QAction* MainWindow::play_in_to_out_ |
|
private |
QMenu* MainWindow::playback_menu |
|
private |
QAction* MainWindow::playpause_ |
|
private |
QAction* MainWindow::pointer_tool_action |
|
private |
QAction* MainWindow::preferences_action_ |
|
private |
QAction* MainWindow::previous_frame_ |
|
private |
QAction* MainWindow::razor_tool_action |
|
private |
QAction* MainWindow::rectified_waveforms |
|
private |
QAction* MainWindow::redo_action |
|
private |
QAction* MainWindow::reset_default_layout_ |
|
private |
QAction* MainWindow::ripple_delete_inout_point_ |
|
private |
QAction* MainWindow::ripple_to_in_point_ |
|
private |
QAction* MainWindow::ripple_to_out_point_ |
|
private |
QAction* MainWindow::ripple_tool_action |
|
private |
QAction* MainWindow::save_project |
|
private |
QAction* MainWindow::save_project_as |
|
private |
QAction* MainWindow::select_all_action |
|
private |
QAction* MainWindow::setedit_marker_ |
|
private |
QAction* MainWindow::show_all |
|
private |
QAction* MainWindow::shuttle_left_ |
|
private |
QAction* MainWindow::shuttle_right_ |
|
private |
QAction* MainWindow::shuttle_stop_ |
|
private |
QAction* MainWindow::slide_tool_action |
|
private |
QAction* MainWindow::slip_tool_action |
|
private |
QAction* MainWindow::smooth_autoscroll |
|
private |
QAction* MainWindow::snap_toggle |
|
private |
QByteArray MainWindow::temp_panel_state |
|
private |
QAction* MainWindow::title_safe_169 |
|
private |
QAction* MainWindow::title_safe_43 |
|
private |
QMenu* MainWindow::title_safe_area_menu |
|
private |
QAction* MainWindow::title_safe_custom |
|
private |
QAction* MainWindow::title_safe_default |
|
private |
QAction* MainWindow::title_safe_off |
|
private |
QMenu* MainWindow::tools_menu |
|
private |
QAction* MainWindow::track_lines |
|
private |
QAction* MainWindow::transition_tool_action |
|
private |
QAction* MainWindow::undo_action |
|
private |
QMenu* MainWindow::view_menu |
|
private |
QAction* MainWindow::window_effectcontrols_action |
|
private |
QAction* MainWindow::window_footageviewer_action |
|
private |
QAction* MainWindow::window_graph_editor_action |
|
private |
QMenu* MainWindow::window_menu |
|
private |
QAction* MainWindow::window_project_action |
|
private |
QAction* MainWindow::window_sequenceviewer_action |
|
private |
QAction* MainWindow::window_timeline_action |
|
private |
QAction* MainWindow::zoom_in_ |
|
private |
QAction* MainWindow::zoom_out_ |
|
private |
The documentation for this class was generated from the following files: