Olive
mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QMainWindow>
5 
6 class Project;
7 class EffectControls;
8 class Viewer;
9 class Timeline;
10 
11 class MainWindow : public QMainWindow {
12  Q_OBJECT
13 public:
14  explicit MainWindow(QWidget *parent);
15  virtual ~MainWindow() override;
16 
25  void updateTitle();
26 
37  void load_shortcuts(const QString &fn);
38 
48  void save_shortcuts(const QString &fn);
49 
57  void load_css_from_file(const QString& fn);
58 
59 public slots:
65  void toggle_full_screen();
66 
67 signals:
73  void finished_first_paint();
74 
75 protected:
83  virtual void closeEvent(QCloseEvent *) override;
84 
90  virtual void paintEvent(QPaintEvent *) override;
91 
92 private slots:
99  void maximize_panel();
100 
106  void reset_layout();
107 
114 
121 
128 
135 
143 
150 
158 
159 private:
171  void setup_layout(bool reset);
172 
179  void setup_menus();
180 
181  // menu bar menus
182  QMenu* window_menu;
183 
184  // file menu actions
185  QMenu* open_recent;
186  QAction* clear_open_recent_action;
187 
188  // view menu actions
189  QAction* track_lines;
190  QAction* frames_action;
191  QAction* drop_frame_action;
192  QAction* nondrop_frame_action;
193  QAction* milliseconds_action;
194  QAction* no_autoscroll;
195  QAction* page_autoscroll;
196  QAction* smooth_autoscroll;
197  QAction* title_safe_off;
198  QAction* title_safe_default;
199  QAction* title_safe_43;
200  QAction* title_safe_169;
201  QAction* title_safe_custom;
202  QAction* full_screen;
203  QAction* show_all;
204 
205  // tool menu actions
206  QAction* pointer_tool_action;
207  QAction* edit_tool_action;
208  QAction* ripple_tool_action;
209  QAction* razor_tool_action;
210  QAction* slip_tool_action;
211  QAction* slide_tool_action;
212  QAction* hand_tool_action;
213  QAction* transition_tool_action;
214  QAction* snap_toggle;
215  QAction* selecting_also_seeks;
216  QAction* edit_tool_also_seeks;
217  QAction* edit_tool_selects_links;
218  QAction* seek_to_end_of_pastes;
219  QAction* scroll_wheel_zooms;
220  QAction* rectified_waveforms;
221  QAction* enable_drag_files_to_timeline;
222  QAction* autoscale_by_default;
223  QAction* enable_seek_to_import;
224  QAction* enable_audio_scrubbing;
225  QAction* enable_drop_on_media_to_replace;
226  QAction* enable_hover_focus;
227  QAction* set_name_and_marker;
228  QAction* loop_action;
229  QAction* seek_also_selects;
230 
231  // edit menu actions
232  QAction* undo_action;
233  QAction* redo_action;
234 
235  // used to store the panel state when one panel is maximized
236  QByteArray temp_panel_state;
237 
238  // used in paintEvent() to determine the first paintEvent() performed
239  bool first_show;
240 };
241 
242 namespace Olive {
243  extern MainWindow* MainWindow;
244 }
245 
246 #endif // MAINWINDOW_H
void updateTitle()
Update window title.
Definition: mainwindow.cpp:733
void fileMenu_About_To_Be_Shown()
Function to prepare File menu.
Definition: mainwindow.cpp:914
void windowMenu_About_To_Be_Shown()
Function to prepare Window menu.
Definition: mainwindow.cpp:832
void toggle_full_screen()
Toggles full screen mode.
Definition: mainwindow.cpp:932
virtual void closeEvent(QCloseEvent *) override
Close event.
Definition: mainwindow.cpp:740
void load_shortcuts(const QString &fn)
Load shortcut file.
Definition: mainwindow.cpp:289
Definition: timeline.h:71
void finished_first_paint()
Signal emitted once when the main window has finished initializing.
void load_css_from_file(const QString &fn)
Load a CSS/QSS style from file to customize Olive's interface.
Definition: mainwindow.cpp:320
void editMenu_About_To_Be_Shown()
Function to prepare Edit menu.
Definition: mainwindow.cpp:331
void viewMenu_About_To_Be_Shown()
Function to prepare View menu.
Definition: mainwindow.cpp:846
virtual void paintEvent(QPaintEvent *) override
Paint event.
Definition: mainwindow.cpp:789
Definition: effectcontrols.h:32
Definition: project.h:40
void setup_menus()
Initialize menu bar menus and items.
Definition: mainwindow.cpp:336
void toolMenu_About_To_Be_Shown()
Function to prepare Tools menu.
Definition: mainwindow.cpp:873
void toggle_panel_visibility()
Toggle whether a panel is visible or not.
Definition: mainwindow.cpp:904
void maximize_panel()
Maximizes the currently hovered panel.
Definition: mainwindow.cpp:804
void reset_layout()
Reset panel layout to default.
Definition: mainwindow.cpp:798
void playbackMenu_About_To_Be_Shown()
Function to prepare Playback menu.
Definition: mainwindow.cpp:842
Definition: viewer.h:25
void setup_layout(bool reset)
Internal function for setting the panel layout to a predetermined preset.
Definition: mainwindow.cpp:51
Definition: mainwindow.h:11
void save_shortcuts(const QString &fn)
Save shortcut file.
Definition: mainwindow.cpp:303