X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=2292a3a7ef281dc50a3b1e4c9c8f4275750a357a;hb=4a47150aaf6f75c45ddca8a071c3bc291117bdd3;hp=cd7df0707935a15bba9c9bdf8e124d8d6149633f;hpb=9c59a265a6ded9306fa7afa13b18c96e25d45f77;p=kdenlive diff --git a/src/mainwindow.h b/src/mainwindow.h index cd7df070..2292a3a7 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -35,11 +35,13 @@ #include #include #include +#include #include "effectslist.h" #include "gentime.h" #include "definitions.h" #include "statusbarmessagelabel.h" +#include "dvdwizard.h" class KdenliveDoc; class TrackView; @@ -52,15 +54,28 @@ class Monitor; class RecMonitor; class CustomTrackView; class RenderWidget; +#ifndef NO_JOGSHUTTLE class JogShuttle; +#endif /* NO_JOGSHUTTLE */ class DocClipBase; +class Render; +class Transition; class MainWindow : public KXmlGuiWindow { Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kdenlive.MainWindow") 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. */ + explicit MainWindow(const QString &MltPath = QString(), const KUrl & Url = KUrl(), QWidget *parent = 0); + void parseProfiles(const QString &mltPath = QString()); static EffectsList videoEffects; static EffectsList audioEffects; @@ -70,6 +85,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 @@ -130,21 +147,28 @@ private: 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; @@ -154,32 +178,43 @@ 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); + void recoverFiles(QList staleFiles); + void loadPlugins(); + void populateMenus(QObject *plugin); + void addToMenu(QObject *plugin, const QStringList &texts, + QMenu *menu, const char *member, + QActionGroup *actionGroup); + void aboutPlugins(); + QStringList m_pluginFileNames; public slots: void openFile(const KUrl &url); void slotGotProgressInfo(const QString &message, int progress); + Q_SCRIPTABLE void setRenderingProgress(const QString &url, int progress); + Q_SCRIPTABLE void setRenderingFinished(const QString &url, int status, const QString &error); private slots: - void newFile(); - void undo(); - void redo(); + 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(); 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(); @@ -190,13 +225,13 @@ private slots: void slotSwitchMarkersComments(); 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, bool resizeProfile, const QString &scriptExport); void slotFullScreen(); void slotUpdateDocumentState(bool modified); void slotZoomIn(); void slotZoomOut(); void slotFitZoom(); - void slotRemoveTab(); + void closeCurrentDocument(); void slotDeleteTimelineClip(); void slotAddClipMarker(); void slotDeleteClipMarker(); @@ -208,10 +243,12 @@ 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(); + void slotActivateTransitionView(Transition *); void slotChangeTool(QAction * action); void slotSetTool(PROJECTTOOL tool); void slotSnapForward(); @@ -222,17 +259,42 @@ private slots: 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 resetProfiles(); + + 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 slotGetNewLumaStuff(); + void slotGetNewRenderStuff(); + void slotGetNewMltProfileStuff(); + void slotAutoTransition(); + void slotRunWizard(); + void generateClip(); + void slotZoneMoved(int start, int end); + void slotUpdatePreviewSettings(); + void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal"); + +signals: + Q_SCRIPTABLE void abortRenderJob(const QString &url); };