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 windowShown(void);
51 void aboutButtonClicked(void);
52 void encodeButtonClicked(void);
53 void closeButtonClicked(void);
54 void addFilesButtonClicked(void);
55 void clearFilesButtonClicked(void);
56 void removeFileButtonClicked(void);
57 void fileDownButtonClicked(void);
58 void fileUpButtonClicked(void);
59 void showDetailsButtonClicked(void);
60 void tabPageChanged(int idx
);
61 void tabActionActivated(QAction
*action
);
62 void styleActionActivated(QAction
*action
);
63 void languageActionActivated(QAction
*action
);
64 void languageFromFileActionActivated(bool checked
);
65 void outputFolderViewClicked(const QModelIndex
&index
);
66 void outputFolderViewMoved(const QModelIndex
&index
);
67 void makeFolderButtonClicked(void);
68 void gotoHomeFolderButtonClicked(void);
69 void gotoDesktopButtonClicked(void);
70 void gotoMusicFolderButtonClicked(void);
71 void checkUpdatesActionActivated(void);
72 void visitHomepageActionActivated(void);
73 void openFolderActionActivated(void);
74 void notifyOtherInstance(void);
75 void addFileDelayed(const QString
&filePath
);
76 void handleDelayedFiles(void);
77 void editMetaButtonClicked(void);
78 void clearMetaButtonClicked(void);
79 void updateEncoder(int id
);
80 void updateRCMode(int id
);
81 void updateBitrate(int value
);
82 void updateLameAlgoQuality(int value
);
83 void bitrateManagementEnabledChanged(bool checked
);
84 void bitrateManagementMinChanged(int value
);
85 void bitrateManagementMaxChanged(int value
);
86 void samplingRateChanged(int value
);
87 void channelModeChanged(int value
);
88 void neroAACProfileChanged(int value
);
89 void neroAAC2PassChanged(bool checked
);
90 void normalizationEnabledChanged(bool checked
);
91 void normalizationMaxVolumeChanged(double volume
);
92 void resetAdvancedOptionsButtonClicked();
93 void sourceModelChanged(void);
94 void metaTagsEnabledChanged(void);
95 void playlistEnabledChanged(void);
96 void saveToSourceFolderChanged(void);
97 void prependRelativePathChanged(void);
98 void restoreCursor(void);
99 void sourceFilesContextMenu(const QPoint
&pos
);
100 void previewContextActionTriggered(void);
101 void findFileContextActionTriggered(void);
102 void disableUpdateReminderActionTriggered(bool checked
);
103 void disableSoundsActionTriggered(bool checked
);
104 void outputFolderContextMenu(const QPoint
&pos
);
105 void showFolderContextActionTriggered(void);
106 void installWMADecoderActionTriggered(bool checked
);
107 void disableNeroAacNotificationsActionTriggered(bool checked
);
108 void disableWmaDecoderNotificationsActionTriggered(bool checked
);
109 void showDropBoxWidgetActionTriggered(bool checked
);
112 void showEvent(QShowEvent
*event
);
113 void dragEnterEvent(QDragEnterEvent
*event
);
114 void dropEvent(QDropEvent
*event
);
115 void closeEvent(QCloseEvent
*event
);
116 void resizeEvent(QResizeEvent
*event
);
117 bool eventFilter(QObject
*obj
, QEvent
*event
);
118 void changeEvent(QEvent
*e
);
121 void addFiles(const QStringList
&files
);
124 bool m_firstTimeShown
;
125 FileListModel
*m_fileListModel
;
126 QFileSystemModelEx
*m_fileSystemModel
;
127 QActionGroup
*m_tabActionGroup
;
128 QActionGroup
*m_styleActionGroup
;
129 QActionGroup
*m_languageActionGroup
;
130 QButtonGroup
*m_encoderButtonGroup
;
131 QButtonGroup
*m_modeButtonGroup
;
132 QAction
*m_showDetailsContextAction
;
133 QAction
*m_previewContextAction
;
134 QAction
*m_findFileContextAction
;
135 QAction
*m_showFolderContextAction
;
136 WorkingBanner
*m_banner
;
137 MessageHandlerThread
*m_messageHandler
;
138 QStringList
*m_delayedFileList
;
139 QTimer
*m_delayedFileTimer
;
140 AudioFileModel
*m_metaData
;
141 MetaInfoModel
*m_metaInfoModel
;
142 SettingsModel
*m_settings
;
143 QLabel
*m_dropNoteLabel
;
144 QMenu
*m_sourceFilesContextMenu
;
145 QMenu
*m_outputFolderContextMenu
;