]> git.sesse.net Git - kdenlive/blob - src/kdenlivesettingsdialog.h
jogshuttle: proof of concept - port to mediactrl (WIP)
[kdenlive] / src / kdenlivesettingsdialog.h
1 /***************************************************************************
2  *   Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20
21 #ifndef KDENLIVESETTINGSDIALOG_H
22 #define KDENLIVESETTINGSDIALOG_H
23
24 #include <QMap>
25 #include <KConfigDialog>
26 #include <KProcess>
27
28 #include "ui_configmisc_ui.h"
29 #include "ui_configenv_ui.h"
30 #include "ui_configtimeline_ui.h"
31 #include "ui_configcapture_ui.h"
32 #include "ui_configjogshuttle_ui.h"
33 #include "ui_configsdl_ui.h"
34 #include "ui_configtranscode_ui.h"
35 #include "ui_configproject_ui.h"
36
37 class KdenliveSettingsDialog : public KConfigDialog
38 {
39     Q_OBJECT
40
41 public:
42     KdenliveSettingsDialog(const QMap<QString, QString>& mappable_actions, QWidget * parent = 0);
43     ~KdenliveSettingsDialog();
44     void showPage(int page, int option);
45     void checkProfile();
46
47 protected slots:
48     void updateSettings();
49     void updateWidgets();
50     virtual bool hasChanged();
51
52 private slots:
53     void slotUpdateDisplay();
54     void slotCheckShuttle(int state = 0);
55     void slotUpdateShuttleDevice(int ix = 0);
56     void slotEditImageApplication();
57     void slotEditAudioApplication();
58     void slotEditVideoApplication();
59     void slotReadAudioDevices();
60     void slotUpdateGrabRegionStatus();
61     void slotCheckAlsaDriver();
62     void slotAddTranscode();
63     void slotDeleteTranscode();
64     /** @brief Update current transcoding profile. */
65     void slotUpdateTranscodingProfile();
66     /** @brief Enable / disable the update profile button. */
67     void slotEnableTranscodeUpdate();
68     /** @brief Update display of current transcoding profile parameters. */
69     void slotSetTranscodeProfile();
70     void slotShuttleModified();
71     void slotDialogModified();
72     void slotEnableCaptureFolder();
73     void slotUpdatev4lDevice();
74     void slotUpdatev4lCaptureProfile();
75     void slotManageEncodingProfile();
76     void slotUpdateDecklinkProfile(int ix = 0);
77     void slotUpdateProxyProfile(int ix = 0);
78     void slotUpdateV4lProfile(int ix = 0);
79     void slotUpdateGrabProfile(int ix = 0);
80     void slotEditVideo4LinuxProfile();
81     void slotReloadBlackMagic();
82     void slotReloadShuttleDevices();
83
84 private:
85     KPageWidgetItem *m_page1;
86     KPageWidgetItem *m_page2;
87     KPageWidgetItem *m_page3;
88     KPageWidgetItem *m_page4;
89     KPageWidgetItem *m_page5;
90     KPageWidgetItem *m_page6;
91     KPageWidgetItem *m_page7;
92     KPageWidgetItem *m_page8;
93     Ui::ConfigEnv_UI m_configEnv;
94     Ui::ConfigMisc_UI m_configMisc;
95     Ui::ConfigTimeline_UI m_configTimeline;
96     Ui::ConfigCapture_UI m_configCapture;
97     Ui::ConfigJogShuttle_UI m_configShuttle;
98     Ui::ConfigSdl_UI m_configSdl;
99     Ui::ConfigTranscode_UI m_configTranscode;
100     Ui::ConfigProject_UI m_configProject;
101     QString m_defaultProfile;
102     QString m_defaultPath;
103     KProcess m_readProcess;
104     bool m_modified;
105     bool m_shuttleModified;
106     QMap<QString, QString> m_mappable_actions;
107     QVector<KComboBox*> m_shuttle_buttons;
108     void initDevices();
109     void loadTranscodeProfiles();
110     void saveTranscodeProfiles();
111     void loadCurrentV4lProfileInfo();
112     void saveCurrentV4lProfile();
113     void loadEncodingProfiles();
114     void setupJogshuttleBtns(QString device);
115
116 signals:
117     void customChanged();
118     void doResetProfile();
119     void updateCaptureFolder();
120 };
121
122
123 #endif
124