X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=7788f4b6b1a8ba09864ae089226170d1c4ce61cb;hb=7caecc149e65907e4a57c8115c7cac12042e9308;hp=2a0deea1c26d2fe23f9807c342e245b67901dbf0;hpb=c60118aadf194393e71f34229ea38800352d6e66;p=kdenlive diff --git a/src/mainwindow.h b/src/mainwindow.h index 2a0deea1..7788f4b6 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include "effectslist.h" #include "gentime.h" @@ -51,15 +53,26 @@ class Monitor; class RecMonitor; class CustomTrackView; class RenderWidget; +#ifndef NO_JOGSHUTTLE class JogShuttle; +#endif /* NO_JOGSHUTTLE */ class DocClipBase; +class Render; class MainWindow : public KXmlGuiWindow { Q_OBJECT public: - MainWindow(QWidget *parent = 0); - void parseProfiles(); + /** 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; static EffectsList audioEffects; @@ -68,6 +81,22 @@ public: 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 + * properties for session management purposes. + */ + void saveProperties(KConfig *); + + /** + * 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 + */ + void readProperties(KConfig *); private: KTabWidget* m_timelineArea; @@ -108,53 +137,72 @@ private: QDockWidget *overviewDock; CustomTrackView *m_overView; + QMenu *m_customEffectsMenu; QMenu *m_timelineContextMenu; QMenu *m_timelineContextClipMenu; QMenu *m_timelineContextTransitionMenu; RenderWidget *m_renderWidget; +#ifndef NO_JOGSHUTTLE JogShuttle *m_jogProcess; +#endif /* NO_JOGSHUTTLE */ KRecentFilesAction *m_fileOpenRecent; + KAction *m_projectSearch; + KAction *m_projectSearchNext; - QAction *m_buttonAudioThumbs; - QAction *m_buttonVideoThumbs; - QAction *m_buttonShowMarkers; - QAction *m_buttonFitZoom; - QAction *m_buttonSelectTool; - QAction *m_buttonRazorTool; - QAction *m_buttonSnap; + KAction *m_buttonAudioThumbs; + KAction *m_buttonVideoThumbs; + KAction *m_buttonShowMarkers; + 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; + QString m_findString; + QTimer m_findTimer; + bool m_initialized; + 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); + void recoverFiles(QList staleFiles); public slots: void openFile(const KUrl &url); void slotGotProgressInfo(const QString &message, int progress); private slots: - void newFile(); - void undo(); - void redo(); + void newFile(bool showProjectSettings = true); void queryQuit(); void activateDocument(); void connectDocument(TrackView*, KdenliveDoc*); void openFile(); - void saveFile(); - void saveFileAs(); - void saveFileAs(const QString &outputFileName); - void slotPreferences(); + void openLastFile(); + bool saveFile(); + bool saveFileAs(); + bool saveFileAs(const QString &outputFileName); + void slotPreferences(int page = -1, int option = -1); void updateConfiguration(); void slotConnectMonitors(); void slotRaiseMonitor(bool clipMonitor); - void slotSetClipDuration(int id, int duration); + void slotSetClipDuration(const QString &id, int duration); void slotUpdateMousePosition(int pos); void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1); void slotEditProfiles(); @@ -163,18 +211,19 @@ private slots: void slotSwitchVideoThumbs(); void slotSwitchAudioThumbs(); void slotSwitchMarkersComments(); - void slotSwitchSnap(); + void slotSwitchSnap(); void slotRenderProject(); - void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter); + void slotDoRender(const QString &dest, const QString &render, const QStringList &overlay_args, const QStringList &avformat_args, bool zoneOnly, bool playAfter, double guideStart, double guideEnd); void slotFullScreen(); void slotUpdateDocumentState(bool modified); void slotZoomIn(); void slotZoomOut(); void slotFitZoom(); - void slotRemoveTab(); + void closeCurrentDocument(); void slotDeleteTimelineClip(); void slotAddClipMarker(); void slotDeleteClipMarker(); + void slotDeleteAllClipMarkers(); void slotEditClipMarker(); void slotCutTimelineClip(); void slotAddVideoEffect(QAction *result); @@ -182,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(); @@ -190,6 +241,40 @@ private slots: void slotSetTool(PROJECTTOOL tool); void slotSnapForward(); void slotSnapRewind(); + void slotClipStart(); + void slotClipEnd(); + void slotFind(); + void findTimeout(); + void slotFindNext(); + + void slotInsertSpace(); + void slotRemoveSpace(); + void slotAddGuide(); + void slotEditGuide(); + void slotDeleteGuide(); + void slotDeleteAllGuides(); + void slotGuidesUpdated(); + + void slotCopy(); + void slotPaste(); + void slotPasteEffects(); + void slotReloadEffects(); + void slotChangeClipSpeed(); + + void slotAdjustClipMonitor(); + void slotAdjustProjectMonitor(); + void slotSaveZone(Render *render, QPoint zone); + + 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(); }; + #endif