1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
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.
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 ///////////////////////////////////////////////////////////////////////////////
24 #include "../tmp/UIC_MainWindow.h"
27 class QFileSystemModelEx;
29 class MessageHandlerThread;
35 class AbstractEncoder;
39 class MainWindow: public QMainWindow, private Ui::MainWindow
44 MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
47 bool isAccepted() { return m_accepted; }
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 normalizationModeChanged(int mode);
101 void notifyOtherInstance(void);
102 void openFolderActionActivated(void);
103 void outputFolderContextMenu(const QPoint &pos);
104 void outputFolderViewClicked(const QModelIndex &index);
105 void outputFolderViewMoved(const QModelIndex &index);
106 void playlistEnabledChanged(void);
107 void prependRelativePathChanged(void);
108 void previewContextActionTriggered(void);
109 void removeFileButtonClicked(void);
110 void renameOutputEnabledChanged(bool checked);
111 void renameOutputPatternChanged(void);
112 void renameOutputPatternChanged(const QString &text);
113 void resetAdvancedOptionsButtonClicked(void);
114 void restoreCursor(void);
115 void samplingRateChanged(int value);
116 void saveToSourceFolderChanged(void);
117 void showAnnounceBox(void);
118 void showDetailsButtonClicked(void);
119 void showDropBoxWidgetActionTriggered(bool checked);
120 void showFolderContextActionTriggered(void);
121 void showRenameMacros(const QString &text);
122 void sourceFilesContextMenu(const QPoint &pos);
123 void sourceFilesScrollbarMoved(int);
124 void sourceModelChanged(void);
125 void styleActionActivated(QAction *action);
126 void tabActionActivated(QAction *action);
127 void tabPageChanged(int idx);
128 void toneAdjustBassChanged(double value);
129 void toneAdjustTrebleChanged(double value);
130 void toneAdjustTrebleReset(void);
131 void updateBitrate(int value);
132 void updateEncoder(int id);
133 void updateLameAlgoQuality(int value);
134 void updateMaximumInstances(int value);
135 void updateRCMode(int id);
136 void useCustomTempFolderChanged(bool checked);
137 void visitHomepageActionActivated(void);
138 void windowShown(void);
141 void changeEvent(QEvent *e);
142 void closeEvent(QCloseEvent *event);
143 void dragEnterEvent(QDragEnterEvent *event);
144 void dropEvent(QDropEvent *event);
145 bool eventFilter(QObject *obj, QEvent *event);
146 void resizeEvent(QResizeEvent *event);
147 void showEvent(QShowEvent *event);
150 void addFiles(const QStringList &files);
151 void addFolder(const QString &path, bool recursive = false, bool delayed = false);
152 bool checkForUpdates(void);
153 void refreshFavorites(void);
156 bool m_firstTimeShown;
157 bool m_OutputFolderViewInitialized;
159 const bool m_neroEncoderAvailable;
160 const bool m_fhgEncoderAvailable;
162 WorkingBanner *m_banner;
163 QStringList *m_delayedFileList;
164 QTimer *m_delayedFileTimer;
166 QLabel *m_dropNoteLabel;
167 FileListModel *m_fileListModel;
168 QFileSystemModelEx *m_fileSystemModel;
169 MessageHandlerThread *m_messageHandler;
170 AudioFileModel *m_metaData;
171 MetaInfoModel *m_metaInfoModel;
172 QMenu *m_outputFolderContextMenu;
173 SettingsModel *m_settings;
174 QMenu *m_sourceFilesContextMenu;
175 QMenu *m_outputFolderFavoritesMenu;
177 QAction *m_findFileContextAction;
178 QAction *m_previewContextAction;
179 QAction *m_showDetailsContextAction;
180 QAction *m_showFolderContextAction;
181 QAction *m_addFavoriteFolderAction;
182 QActionGroup *m_languageActionGroup;
183 QActionGroup *m_styleActionGroup;
184 QActionGroup *m_tabActionGroup;
185 QButtonGroup *m_encoderButtonGroup;
186 QButtonGroup *m_modeButtonGroup;