Updated MediaInfo binary to v0.7.48 (2011-08-17), compiled with MSVC 10.0
[LameXP.git] / src / Dialog_MainWindow.h
blob7c00a6648c8c7d862bb9f898c23af9fdb13d4c4d
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.
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.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
22 #pragma once
24 #include "../tmp/UIC_MainWindow.h"
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;
39 class MainWindow: public QMainWindow, private Ui::MainWindow
41 Q_OBJECT
43 public:
44 MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
45 ~MainWindow(void);
47 bool isAccepted() { return m_accepted; }
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 addFavoriteFolderActionTriggered(void);
55 void addFolderDelayed(const QString &folderPath, bool recursive);
56 void aftenCodingModeChanged(int value);
57 void aftenDRCModeChanged(int value);
58 void aftenFastAllocationChanged(bool checked);
59 void aftenSearchSizeChanged(int value);
60 void autoDetectInstancesChanged(bool checked);
61 void bitrateManagementEnabledChanged(bool checked);
62 void bitrateManagementMaxChanged(int value);
63 void bitrateManagementMinChanged(int value);
64 void browseCustomTempFolderButtonClicked(void);
65 void channelModeChanged(int value);
66 void checkForBetaUpdatesActionTriggered(bool checked);
67 void checkUpdatesActionActivated(void);
68 void clearFilesButtonClicked(void);
69 void clearMetaButtonClicked(void);
70 void closeButtonClicked(void);
71 void customParamsChanged(void);
72 void customTempFolderChanged(const QString &text);
73 void disableNeroAacNotificationsActionTriggered(bool checked);
74 void disableShellIntegrationActionTriggered(bool);
75 void disableSlowStartupNotificationsActionTriggered(bool checked);
76 void disableSoundsActionTriggered(bool checked);
77 void disableUpdateReminderActionTriggered(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 forceStereoDownmixEnabledChanged(bool checked);
85 void gotoDesktopButtonClicked(void);
86 void gotoFavoriteFolder(void);
87 void gotoHomeFolderButtonClicked(void);
88 void gotoMusicFolderButtonClicked(void);
89 void handleDelayedFiles(void);
90 void importCueSheetActionTriggered(bool checked);
91 void initOutputFolderModel(void);
92 void languageActionActivated(QAction *action);
93 void languageFromFileActionActivated(bool checked);
94 void makeFolderButtonClicked(void);
95 void metaTagsEnabledChanged(void);
96 void neroAAC2PassChanged(bool checked);
97 void neroAACProfileChanged(int value);
98 void normalizationEnabledChanged(bool checked);
99 void normalizationMaxVolumeChanged(double volume);
100 void notifyOtherInstance(void);
101 void openFolderActionActivated(void);
102 void outputFolderContextMenu(const QPoint &pos);
103 void outputFolderViewClicked(const QModelIndex &index);
104 void outputFolderViewMoved(const QModelIndex &index);
105 void playlistEnabledChanged(void);
106 void prependRelativePathChanged(void);
107 void previewContextActionTriggered(void);
108 void removeFileButtonClicked(void);
109 void renameOutputEnabledChanged(bool checked);
110 void renameOutputPatternChanged(void);
111 void renameOutputPatternChanged(const QString &text);
112 void resetAdvancedOptionsButtonClicked(void);
113 void restoreCursor(void);
114 void samplingRateChanged(int value);
115 void saveToSourceFolderChanged(void);
116 void showDetailsButtonClicked(void);
117 void showDropBoxWidgetActionTriggered(bool checked);
118 void showFolderContextActionTriggered(void);
119 void showRenameMacros(const QString &text);
120 void sourceFilesContextMenu(const QPoint &pos);
121 void sourceModelChanged(void);
122 void styleActionActivated(QAction *action);
123 void tabActionActivated(QAction *action);
124 void tabPageChanged(int idx);
125 void toneAdjustBassChanged(double value);
126 void toneAdjustTrebleChanged(double value);
127 void toneAdjustTrebleReset(void);
128 void updateBitrate(int value);
129 void updateEncoder(int id);
130 void updateLameAlgoQuality(int value);
131 void updateMaximumInstances(int value);
132 void updateRCMode(int id);
133 void useCustomTempFolderChanged(bool checked);
134 void visitHomepageActionActivated(void);
135 void windowShown(void);
137 protected:
138 void changeEvent(QEvent *e);
139 void closeEvent(QCloseEvent *event);
140 void dragEnterEvent(QDragEnterEvent *event);
141 void dropEvent(QDropEvent *event);
142 bool eventFilter(QObject *obj, QEvent *event);
143 void resizeEvent(QResizeEvent *event);
144 void showEvent(QShowEvent *event);
146 private:
147 void addFiles(const QStringList &files);
148 void addFolder(const QString &path, bool recursive = false, bool delayed = false);
149 bool checkForUpdates(void);
150 void refreshFavorites(void);
152 bool m_accepted;
153 bool m_firstTimeShown;
154 bool m_OutputFolderViewInitialized;
156 const bool m_neroEncoderAvailable;
158 WorkingBanner *m_banner;
159 QStringList *m_delayedFileList;
160 QTimer *m_delayedFileTimer;
161 DropBox *m_dropBox;
162 QLabel *m_dropNoteLabel;
163 FileListModel *m_fileListModel;
164 QFileSystemModelEx *m_fileSystemModel;
165 MessageHandlerThread *m_messageHandler;
166 AudioFileModel *m_metaData;
167 MetaInfoModel *m_metaInfoModel;
168 QMenu *m_outputFolderContextMenu;
169 SettingsModel *m_settings;
170 QMenu *m_sourceFilesContextMenu;
171 QMenu *m_outputFolderFavoritesMenu;
173 QAction *m_findFileContextAction;
174 QAction *m_previewContextAction;
175 QAction *m_showDetailsContextAction;
176 QAction *m_showFolderContextAction;
177 QAction *m_addFavoriteFolderAction;
178 QActionGroup *m_languageActionGroup;
179 QActionGroup *m_styleActionGroup;
180 QActionGroup *m_tabActionGroup;
181 QButtonGroup *m_encoderButtonGroup;
182 QButtonGroup *m_modeButtonGroup;