]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.h
- mainwindow.cpp: possibly avoid a step when locating MLT environment in parseProfiles()
[kdenlive] / src / mainwindow.h
index 7cd9bc7c632c6e9b4c4ccf5bbb3afee0bc87fc17..27fa7d88d67a265c7311b6a5ebd68ee41b803949 100644 (file)
@@ -68,15 +68,23 @@ class MainWindow : public KXmlGuiWindow
     Q_CLASSINFO("D-Bus Interface", "org.kdenlive.MainWindow")
 
 public:
-    /** Constructor
-     * \param MltPath path to MLT environment
-     * \param Url Url to open
-     * \param parent Std. widget parent
+
+    /** @brief Initialises the main window.
+     * @param MltPath (optional) path to MLT environment
+     * @param Url (optional) file to open
+     *
+     * If Url is present, it will be opened, otherwhise, if openlastproject is
+     * set, latest project will be opened. If no file is open after trying this,
+     * a default new file will be created. */
+    explicit MainWindow(const QString &MltPath = QString(),
+                        const KUrl &Url = KUrl(), QWidget *parent = 0);
+
+    /** @brief Locates the MLT environment.
+     * @param mltPath (optional) path to MLT environment
      *
-     * 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. */
-    explicit MainWindow(const QString &MltPath = QString(), const KUrl & Url = KUrl(), QWidget *parent = 0);
+     * It tries to set the paths of the MLT profiles and renderer, using
+     * mltPath, MLT_PREFIX, searching for the binary `melt`, or asking to the
+     * user. It doesn't fill any list of profiles, while its name suggests so. */
     void parseProfiles(const QString &mltPath = QString());
 
     static EffectsList videoEffects;
@@ -84,23 +92,29 @@ public:
     static EffectsList customEffects;
     static EffectsList transitions;
 protected:
+
+    /** @brief Closes the window.
+     * @return false if the user presses "Cancel" on a confirmation dialog or
+     *     the operation requested (starting waiting jobs or saving file) fails,
+     *     true otherwise */
     virtual bool queryClose();
-    virtual void customEvent(QEvent * e);
+
+    /** @brief Reports a message in the status bar when an error occurs. */
+    virtual void customEvent(QEvent *e);
+
+    /** @brief Enables live search in the timeline. */
     virtual void keyPressEvent(QKeyEvent *ke);
-    /** Override hideEvent to get events when the mainwindow gets hidden */
+
+    /** @brief Stops the active monitor when the window gets hidden. */
     virtual void hideEvent(QHideEvent *e);
+
+    /** @brief Filters key events to the live search. */
     bool eventFilter(QObject *obj, QEvent *ev);
-    /**
-     * This function is called when it is time for the app to save its
-     * properties for session management purposes.
-     */
+
+    /** @brief Saves the file and the window properties when saving the session. */
     virtual void saveProperties(KConfigGroup &config);
 
-    /**
-     * This function is called when this app is restored.  The KConfig
-     * object points to the session management config file that was saved
-     * with @ref saveProperties
-     */
+    /** @brief Restores the window and the file when a session is loaded. */
     virtual void readProperties(const KConfigGroup &config);
 
 private:
@@ -145,10 +159,10 @@ private:
     QMenu *m_timelineContextTransitionMenu;
     KUrl m_startUrl;
 
-    /**
-     * Shortcut to remove the focus of any element. Allows to get out
-     * of e.g. text input fields and to press another shortcut.
-     */
+    /** @brief Shortcut to remove the focus from any element.
+     *
+     * It allows to get out of e.g. text input fields and to press another
+     * shortcut. */
     QShortcut* m_shortcutRemoveFocus;
 
     RenderWidget *m_renderWidget;
@@ -166,8 +180,9 @@ private:
     KAction *m_buttonVideoThumbs;
     KAction *m_buttonShowMarkers;
     KAction *m_buttonFitZoom;
-    KAction *m_overwriteModeTool;
-    KAction *m_insertModeTool;
+    KAction *m_normalEditTool;
+    KAction *m_overwriteEditTool;
+    KAction *m_insertEditTool;
     KAction *m_buttonSelectTool;
     KAction *m_buttonRazorTool;
     KAction *m_buttonSpacerTool;
@@ -200,6 +215,7 @@ private:
                    QMenu *menu, const char *member,
                    QActionGroup *actionGroup);
     void aboutPlugins();
+    int getNewStuff(const QString &configFile = QString());
     QStringList m_pluginFileNames;
     QByteArray m_timelineState;
     void loadTranscoders();
@@ -212,7 +228,7 @@ public slots:
     Q_SCRIPTABLE void setRenderingFinished(const QString &url, int status, const QString &error);
 
 private slots:
-    void newFile(bool showProjectSettings = true);
+    void newFile(bool showProjectSettings = true, bool force = false);
     void queryQuit();
     void activateDocument();
     void connectDocument(TrackView*, KdenliveDoc*);
@@ -249,6 +265,7 @@ private slots:
     void slotDeleteAllClipMarkers();
     void slotEditClipMarker();
     void slotCutTimelineClip();
+    void slotInsertClipOverwrite();
     void slotSelectTimelineClip();
     void slotSelectTimelineTransition();
     void slotDeselectTimelineClip();
@@ -264,6 +281,7 @@ private slots:
     void slotShuttleButton(int code);
 #endif /* NO_JOGSHUTTLE */
     void slotShowClipProperties(DocClipBase *clip);
+    void slotShowClipProperties(QList <DocClipBase *>cliplist, QMap<QString, QString> commonproperties);
     void slotActivateEffectStackView();
     void slotActivateTransitionView(Transition *);
     void slotChangeTool(QAction * action);
@@ -278,6 +296,8 @@ private slots:
     void slotFind();
     void findTimeout();
     void slotFindNext();
+    void slotSelectClipInTimeline();
+    void slotClipInTimeline(const QString &clipId);
 
     void slotInsertSpace();
     void slotRemoveSpace();
@@ -305,6 +325,7 @@ private slots:
     void slotDeleteTrack(int ix = 0);
     void slotChangeTrack(int ix = 0);
     void slotGetNewLumaStuff();
+    void slotGetNewTitleStuff();
     void slotGetNewRenderStuff();
     void slotGetNewMltProfileStuff();
     void slotAutoTransition();
@@ -315,13 +336,15 @@ private slots:
     void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal");
     void slotGroupClips();
     void slotUnGroupClips();
+    void slotEditItemDuration();
+    void slotClipInProjectTree();
     void slotSplitAudio();
     void slotUpdateClipType(QAction *action);
     void slotShowTimeline(bool show);
     void slotMaximizeCurrent(bool show);
     void slotTranscode(KUrl::List urls = KUrl::List());
     void slotTranscodeClip();
-    void slotSetDocumentRenderProfile(const QString &dest, const QString &name, const QString &file);
+    void slotSetDocumentRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &file);
     void slotPrepareRendering(bool scriptExport, bool zoneOnly, const QString &chapterFile);
     void slotUpdateTimecodeFormat(int ix);
     /** Removes the focus of anything */
@@ -332,8 +355,15 @@ private slots:
     void slotRevert();
     void slotShutdown();
     void slotUpdateTrackInfo();
-    /** \brief Change color scheme */
+    /** @brief Changes the color scheme. */
     void slotChangePalette(QAction *action, const QString &themename = QString());
+    void slotSwitchMonitors();
+    void slotCheckRenderStatus();
+    void slotInsertZoneToTree();
+    void slotInsertZoneToTimeline();
+    void slotDeleteProjectClips(QStringList ids, QMap<QString, QString> folderids);
+    void slotShowTitleBars(bool show);
+    void slotSwitchTitles();
 
 signals:
     Q_SCRIPTABLE void abortRenderJob(const QString &url);