X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=848f23fac393a396adc97ac150cc5f6441c95367;hb=734a2ab657a472fba50202160d47261e97155078;hp=62f5c68122e72e8fe32fdf51de7bbc628362d791;hpb=04d9ee1d73082325557f73929600ffca12701cf3;p=kdenlive diff --git a/src/mainwindow.h b/src/mainwindow.h index 62f5c681..848f23fa 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -37,12 +37,16 @@ #include #include #include +#include #include "effectslist.h" #include "gentime.h" #include "definitions.h" #include "statusbarmessagelabel.h" #include "dvdwizard.h" +#include "stopmotion/stopmotion.h" +#include "noteswidget.h" +#include "ui_backupdialog_ui.h" class KdenliveDoc; class TrackView; @@ -57,6 +61,7 @@ class CustomTrackView; class RenderWidget; #ifndef NO_JOGSHUTTLE class JogShuttle; +class JogShuttleAction; #endif /* NO_JOGSHUTTLE */ class DocClipBase; class Render; @@ -66,7 +71,10 @@ class Vectorscope; class Waveform; class RGBParade; class KActionCollection; - +class AudioSignal; +class AbstractAudioScopeWidget; +class AudioSpectrum; +class Spectrogram; class MainWindow : public KXmlGuiWindow { @@ -143,7 +151,7 @@ private: //KListWidget *m_effectList; QDockWidget *m_notesDock; - KTextEdit *m_notesWidget; + NotesWidget *m_notesWidget; QDockWidget *m_effectStackDock; EffectStackView *m_effectStack; @@ -172,6 +180,15 @@ private: QDockWidget *m_histogramDock; Histogram *m_histogram; + QDockWidget *m_audiosignalDock; + AudioSignal *m_audiosignal; + + QDockWidget *m_audioSpectrumDock; + AudioSpectrum *m_audioSpectrum; + + QDockWidget *m_spectrogramDock; + Spectrogram *m_spectrogram; + QDockWidget *m_undoViewDock; QUndoView *m_undoView; QUndoGroup *m_commandStack; @@ -179,17 +196,24 @@ private: KComboBox *m_timecodeFormat; /** This list holds all the scopes used in Kdenlive, allowing to manage some global settings */ - QList m_scopesList; + QList m_gfxScopesList; + QList m_audioScopesList; - QMenu *m_videoEffectsMenu; - QMenu *m_audioEffectsMenu; - QMenu *m_customEffectsMenu; + KActionCategory *m_effectActions; + QMenu *m_effectsMenu; QMenu *m_transitionsMenu; QMenu *m_timelineContextMenu; QMenu *m_timelineContextClipMenu; QMenu *m_timelineContextTransitionMenu; KUrl m_startUrl; + /** Actions used in the stopmotion widget */ + KActionCategory *m_stopmotion_actions; + + /** Action names that can be used in the slotDoAction() slot, with their i18n() names */ + QStringList m_action_names; + + /** @brief Shortcut to remove the focus from any element. * * It allows to get out of e.g. text input fields and to press another @@ -200,6 +224,7 @@ private: #ifndef NO_JOGSHUTTLE JogShuttle *m_jogProcess; + JogShuttleAction* m_jogShuttle; #endif /* NO_JOGSHUTTLE */ KRecentFilesAction *m_fileOpenRecent; @@ -230,6 +255,8 @@ private: KAction *m_zoomOut; KAction *m_loopZone; KAction *m_playZone; + KAction *m_loopClip; + KSelectAction *m_loadLayout; StatusBarMessageLabel *m_messageLabel; QActionGroup *m_clipTypeGroup; KActionCollection *m_effectsActionCollection; @@ -242,7 +269,6 @@ private: void saveOptions(); #ifndef NO_JOGSHUTTLE void activateShuttleDevice(); - void slotShuttleAction(int code); #endif /* NO_JOGSHUTTLE */ void connectDocumentInfo(KdenliveDoc *doc); void findAhead(); @@ -271,25 +297,29 @@ private: QPixmap createSchemePreviewIcon(const KSharedConfigPtr &config); /** @brief Checks that the Kdenlive mime type is correctly installed. + * @param open If set to true, this will return the mimetype allowed for file opening (adds .tar.gz format) * @return The mimetype */ - QString getMimeType(); + QString getMimeType(bool open = true); /** @brief Populates the "load layout" menu. */ void loadLayouts(); + StopmotionWidget *m_stopmotion; + QTime m_timer; + public slots: /** @brief Prepares opening @param url. * * Checks if already open and whether backup exists */ void openFile(const KUrl &url); void slotGotProgressInfo(const QString &message, int progress); + void slotReloadEffects(); 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(bool showProjectSettings = true, bool force = false); - void queryQuit(); void activateDocument(); void connectDocument(TrackView*, KdenliveDoc*); @@ -317,7 +347,7 @@ private slots: /** @brief Reflects setting changes to the GUI. */ void updateConfiguration(); void slotConnectMonitors(); - void slotRaiseMonitor(bool clipMonitor); + void slotRaiseMonitor(AbstractMonitor *monitor); void slotUpdateClip(const QString &id); void slotUpdateMousePosition(int pos); void slotAddEffect(const QDomElement effect); @@ -364,6 +394,13 @@ private slots: void slotDeleteClipMarker(); void slotDeleteAllClipMarkers(); void slotEditClipMarker(); + + /** @brief Adds marker or auide at the current position without showing the marker dialog. + * + * Adds a marker if clip monitor is active, otherwise a guide. + * The comment is set to the current position (therefore not dialog). + * This can be useful to mark something during playback. */ + void slotAddMarkerGuideQuickly(); void slotCutTimelineClip(); void slotInsertClipOverwrite(); void slotSelectTimelineClip(); @@ -373,16 +410,11 @@ private slots: void slotSelectAddTimelineClip(); void slotSelectAddTimelineTransition(); void slotAddVideoEffect(QAction *result); - void slotAddAudioEffect(QAction *result); - 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 slotShowClipProperties(QList cliplist, QMap commonproperties); - void slotActivateEffectStackView(); + void slotActivateEffectStackView(ClipItem* item = NULL, int ix = -1, bool raise = true); void slotActivateTransitionView(Transition *); void slotChangeTool(QAction * action); void slotChangeEdit(QAction * action); @@ -410,11 +442,10 @@ private slots: void slotCopy(); void slotPaste(); void slotPasteEffects(); - void slotReloadEffects(); void slotAdjustClipMonitor(); void slotAdjustProjectMonitor(); - void slotSaveZone(Render *render, QPoint zone); + void slotSaveZone(Render *render, QPoint zone, DocClipBase *baseClip = NULL, KUrl path = KUrl()); void slotSetInPoint(); void slotSetOutPoint(); @@ -434,7 +465,6 @@ private slots: /** @brief Lets the sampleplugin create a generator. */ void generateClip(); void slotZoneMoved(int start, int end); - void slotUpdatePreviewSettings(); void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal"); void slotGroupClips(); void slotUnGroupClips(); @@ -447,6 +477,8 @@ private slots: void slotMaximizeCurrent(bool show); void slotTranscode(KUrl::List urls = KUrl::List()); void slotTranscodeClip(); + /** @brief Archive project: creates a copy of the project file with all clips in a new folder. */ + void slotArchiveProject(); void slotSetDocumentRenderProfile(QMap props); void slotPrepareRendering(bool scriptExport, bool zoneOnly, const QString &chapterFile); @@ -475,6 +507,14 @@ private slots: void slotDeleteProjectClips(QStringList ids, QMap folderids); void slotShowTitleBars(bool show); void slotSwitchTitles(); + /** @brief Update the capture folder if user asked a change. */ + void slotUpdateCaptureFolder(); + + /** @brief Apply new properties to a clip */ + void slotApplyNewClipProperties(const QString id, QMap props, QMap newprops, bool refresh, bool reload); + + /** @brief Delete a clip from current project */ + void slotDeleteClip(const QString &id); /** @brief Saves the widgets layout */ void slotSaveLayout(QAction*); @@ -483,11 +523,33 @@ private slots: /** @brief The monitor informs that it needs (or not) to have frames sent by the renderer. */ void slotMonitorRequestRenderFrame(bool request); /** @brief Check if someone needs the render frame sent. */ - void slotUpdateScopeFrameRequest(); + void slotUpdateGfxScopeFrameRequest(); /** @brief Check if someone needs the render frame sent. */ - void slotDoUpdateScopeFrameRequest(); + void slotDoUpdateGfxScopeFrameRequest(); + void slotUpdateAudioScopeFrameRequest(); + void slotDoUpdateAudioScopeFrameRequest(); /** @brief When switching between monitors, update the visible scopes. */ void slotUpdateColorScopes(); + /** @brief Active monitor deleted, clear scopes. */ + void slotClearColorScopes(); + /** @brief Switch current monitor to fullscreen. */ + void slotSwitchFullscreen(); + /** @brief Open the stopmotion dialog. */ + void slotOpenStopmotion(); + /** @brief Implements all the actions that are int he ActionsCollection. */ + void slotDoAction(const QString& action_name); + /** @brief Update project because the use of proxy clips was enabled / disabled. */ + void slotUpdateProxySettings(); + /** @brief Insert current project's timecode into the notes widget. */ + void slotInsertNotesTimecode(); + /** @brief Open the project's backupdialog. */ + void slotOpenBackupDialog(const KUrl url = KUrl()); + /** @brief Make sure to block clip monitor before deleting a clip's producer. */ + void slotBlockClipMonitor(const QString id); + /** @brief Disable proxies for this project. */ + void slotDisableProxies(); + + void slotElapsedTime(); signals: Q_SCRIPTABLE void abortRenderJob(const QString &url);