]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.h
* Fix several transition move problems
[kdenlive] / src / mainwindow.h
index 783675cd151f5d024563439a8a9aac6328eb10d6..7788f4b6b1a8ba09864ae089226170d1c4ce61cb 100644 (file)
@@ -53,7 +53,9 @@ class Monitor;
 class RecMonitor;
 class CustomTrackView;
 class RenderWidget;
+#ifndef NO_JOGSHUTTLE
 class JogShuttle;
+#endif /* NO_JOGSHUTTLE */
 class DocClipBase;
 class Render;
 
@@ -61,7 +63,15 @@ class MainWindow : public KXmlGuiWindow {
     Q_OBJECT
 
 public:
-    MainWindow(const QString &MltPath = QString(), QWidget *parent = 0);
+    /** Constructor
+     * \param MltPath path to MLT environment
+     * \param Url Url to open
+     * \param parent Std. widget parent
+     *
+     * The constructor inits the main window. If Url is present, it will be opened.
+     * If Url is not present, and openLastproject is set, last project will be set
+     * If no file is open after trying this, a default "newfile" will be created. */
+    MainWindow(const QString &MltPath = QString(), const KUrl & Url = KUrl(), QWidget *parent = 0);
     void parseProfiles(const QString &mltPath = QString());
 
     static EffectsList videoEffects;
@@ -72,6 +82,8 @@ protected:
     virtual bool queryClose();
     virtual void customEvent(QEvent * e);
     virtual void keyPressEvent(QKeyEvent *ke);
+    /** Override hideEvent to get events when the mainwindow gets hidden */
+    virtual void hideEvent(QHideEvent *e);
     bool eventFilter(QObject *obj, QEvent *ev);
     /**
      * This function is called when it is time for the app to save its
@@ -132,7 +144,9 @@ private:
 
     RenderWidget *m_renderWidget;
 
+#ifndef NO_JOGSHUTTLE
     JogShuttle *m_jogProcess;
+#endif /* NO_JOGSHUTTLE */
 
     KRecentFilesAction *m_fileOpenRecent;
     KAction *m_projectSearch;
@@ -144,10 +158,14 @@ private:
     KAction *m_buttonFitZoom;
     KAction *m_buttonSelectTool;
     KAction *m_buttonRazorTool;
+    KAction *m_buttonSpacerTool;
     KAction *m_buttonSnap;
     QActionGroup *m_toolGroup;
     KAction *m_saveAction;
+    KAction *m_closeAction;
     QSlider *m_zoomSlider;
+    QAction *m_loopZone;
+    QAction *m_playZone;
     StatusBarMessageLabel *m_messageLabel;
 
     bool m_findActivated;
@@ -157,8 +175,10 @@ private:
 
     void readOptions();
     void saveOptions();
+#ifndef NO_JOGSHUTTLE
     void activateShuttleDevice();
     void slotShuttleAction(int code);
+#endif /* NO_JOGSHUTTLE */
     void connectDocumentInfo(KdenliveDoc *doc);
     void findAhead();
     void doOpenFile(const KUrl &url, KAutoSaveFile *stale);
@@ -169,15 +189,15 @@ public slots:
     void slotGotProgressInfo(const QString &message, int progress);
 
 private slots:
-    void newFile();
+    void newFile(bool showProjectSettings = true);
     void queryQuit();
     void activateDocument();
     void connectDocument(TrackView*, KdenliveDoc*);
     void openFile();
     void openLastFile();
-    void saveFile();
-    void saveFileAs();
-    void saveFileAs(const QString &outputFileName);
+    bool saveFile();
+    bool saveFileAs();
+    bool saveFileAs(const QString &outputFileName);
     void slotPreferences(int page = -1, int option = -1);
     void updateConfiguration();
     void slotConnectMonitors();
@@ -211,7 +231,9 @@ private slots:
     void slotAddCustomEffect(QAction *result);
     void slotAddTransition(QAction *result);
     void slotAddProjectClip(KUrl url);
+#ifndef NO_JOGSHUTTLE
     void slotShuttleButton(int code);
+#endif /* NO_JOGSHUTTLE */
     void slotShowClipProperties(DocClipBase *clip);
     void slotActivateEffectStackView();
     void slotActivateTransitionView();
@@ -225,6 +247,8 @@ private slots:
     void findTimeout();
     void slotFindNext();
 
+    void slotInsertSpace();
+    void slotRemoveSpace();
     void slotAddGuide();
     void slotEditGuide();
     void slotDeleteGuide();
@@ -244,6 +268,12 @@ private slots:
     void slotSetInPoint();
     void slotSetOutPoint();
     void configureNotifications();
+    void slotInsertTrack(int ix = 0);
+    void slotDeleteTrack(int ix = 0);
+    void slotChangeTrack(int ix = 0);
+    void slotGetNewStuff();
+    void slotAutoTransition();
+    void slotRunWizard();
 };