OSDN Git Service

Five new strings to translate.
[lamexp/LameXP.git] / src / Dialog_MainWindow.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
21
22 #pragma once
23
24 #include "../tmp/UIC_MainWindow.h"
25
26 //Class declarations
27 class QFileSystemModelEx;
28 class WorkingBanner;
29 class MessageHandlerThread;
30 class AudioFileModel;
31 class MetaInfoModel;
32 class SettingsModel;
33 class QButtonGroup;
34 class FileListModel;
35 class AbstractEncoder;
36 class QMenu;
37 class DropBox;
38
39 class MainWindow: public QMainWindow, private Ui::MainWindow
40 {
41         Q_OBJECT
42
43 public:
44         MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
45         ~MainWindow(void);
46
47         bool isAccepted() { return m_accepted; }
48
49 private slots:
50         void aboutButtonClicked(void);
51         void addFileDelayed(const QString &filePath, bool tryASAP = false);
52         void addFilesButtonClicked(void);
53         void addFilesDelayed(const QStringList &filePaths, bool tryASAP = false);
54         void addFolderDelayed(const QString &folderPath, bool recursive);
55         void aftenCodingModeChanged(int value);
56         void aftenDRCModeChanged(int value);
57         void aftenFastAllocationChanged(bool checked);
58         void aftenSearchSizeChanged(int value);
59         void autoDetectInstancesChanged(bool checked);
60         void bitrateManagementEnabledChanged(bool checked);
61         void bitrateManagementMaxChanged(int value);
62         void bitrateManagementMinChanged(int value);
63         void browseCustomTempFolderButtonClicked(void);
64         void channelModeChanged(int value);
65         void checkForBetaUpdatesActionTriggered(bool checked);
66         void checkUpdatesActionActivated(void);
67         void clearFilesButtonClicked(void);
68         void clearMetaButtonClicked(void);
69         void closeButtonClicked(void);
70         void customParamsChanged(void);
71         void customTempFolderChanged(const QString &text);
72         void disableNeroAacNotificationsActionTriggered(bool checked);
73         void disableShellIntegrationActionTriggered(bool);
74         void disableSlowStartupNotificationsActionTriggered(bool checked);
75         void disableSoundsActionTriggered(bool checked);
76         void disableUpdateReminderActionTriggered(bool checked);
77         void disableWmaDecoderNotificationsActionTriggered(bool checked);
78         void documentActionActivated(void);
79         void editMetaButtonClicked(void);
80         void encodeButtonClicked(void);
81         void fileDownButtonClicked(void);
82         void fileUpButtonClicked(void);
83         void findFileContextActionTriggered(void);
84         void gotoDesktopButtonClicked(void);
85         void gotoHomeFolderButtonClicked(void);
86         void gotoMusicFolderButtonClicked(void);
87         void handleDelayedFiles(void);
88         void importCueSheetActionTriggered(bool checked);
89         void initOutputFolderModel(void);
90         void installWMADecoderActionTriggered(bool checked);
91         void languageActionActivated(QAction *action);
92         void languageFromFileActionActivated(bool checked);
93         void makeFolderButtonClicked(void);
94         void metaTagsEnabledChanged(void);
95         void neroAAC2PassChanged(bool checked);
96         void neroAACProfileChanged(int value);
97         void normalizationEnabledChanged(bool checked);
98         void normalizationMaxVolumeChanged(double volume);
99         void notifyOtherInstance(void);
100         void openFolderActionActivated(void);
101         void outputFolderContextMenu(const QPoint &pos);
102         void outputFolderViewClicked(const QModelIndex &index);
103         void outputFolderViewMoved(const QModelIndex &index);
104         void playlistEnabledChanged(void);
105         void prependRelativePathChanged(void);
106         void previewContextActionTriggered(void);
107         void removeFileButtonClicked(void);
108         void resetAdvancedOptionsButtonClicked(void);
109         void restoreCursor(void);
110         void samplingRateChanged(int value);
111         void saveToSourceFolderChanged(void);
112         void showDetailsButtonClicked(void);
113         void showDropBoxWidgetActionTriggered(bool checked);
114         void showFolderContextActionTriggered(void);
115         void sourceFilesContextMenu(const QPoint &pos);
116         void sourceModelChanged(void);
117         void styleActionActivated(QAction *action);
118         void tabActionActivated(QAction *action);
119         void tabPageChanged(int idx);
120         void toneAdjustBassChanged(double value);
121         void toneAdjustTrebleChanged(double value);
122         void toneAdjustTrebleReset(void);
123         void updateBitrate(int value);
124         void updateEncoder(int id);
125         void updateLameAlgoQuality(int value);
126         void updateMaximumInstances(int value);
127         void updateRCMode(int id);
128         void useCustomTempFolderChanged(bool checked);
129         void visitHomepageActionActivated(void);
130         void windowShown(void);
131
132 protected:
133         void changeEvent(QEvent *e);
134         void closeEvent(QCloseEvent *event);
135         void dragEnterEvent(QDragEnterEvent *event);
136         void dropEvent(QDropEvent *event);
137         bool eventFilter(QObject *obj, QEvent *event);
138         void resizeEvent(QResizeEvent *event);
139         void showEvent(QShowEvent *event);
140
141 private:
142         void addFiles(const QStringList &files);
143         void addFolder(const QString &path, bool recursive = false, bool delayed = false);
144         bool checkForUpdates(void);
145         bool installWMADecoder(void);
146         
147         bool m_accepted;
148         bool m_firstTimeShown;
149         bool m_OutputFolderViewInitialized;
150
151         const bool m_neroEncoderAvailable;
152
153         WorkingBanner *m_banner;
154         QStringList *m_delayedFileList;
155         QTimer *m_delayedFileTimer;
156         DropBox *m_dropBox;
157         QLabel *m_dropNoteLabel;
158         FileListModel *m_fileListModel;
159         QFileSystemModelEx *m_fileSystemModel;
160         MessageHandlerThread *m_messageHandler;
161         AudioFileModel *m_metaData;
162         MetaInfoModel *m_metaInfoModel;
163         QMenu *m_outputFolderContextMenu;
164         SettingsModel *m_settings;
165         QMenu *m_sourceFilesContextMenu;
166
167         QAction *m_findFileContextAction;
168         QAction *m_previewContextAction;
169         QAction *m_showDetailsContextAction;
170         QAction *m_showFolderContextAction;
171         QActionGroup *m_languageActionGroup;
172         QActionGroup *m_styleActionGroup;
173         QActionGroup *m_tabActionGroup;
174         QButtonGroup *m_encoderButtonGroup;
175         QButtonGroup *m_modeButtonGroup;
176 };