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 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);
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);
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);
148 bool m_firstTimeShown;
149 bool m_OutputFolderViewInitialized;
151 const bool m_neroEncoderAvailable;
153 WorkingBanner *m_banner;
154 QStringList *m_delayedFileList;
155 QTimer *m_delayedFileTimer;
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;
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;