OSDN Git Service

Added options to disable the notifications for the Nero AAC encoder and the WMA Decod...
[lamexp/LameXP.git] / src / Dialog_MainWindow.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2010 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
38 class MainWindow: public QMainWindow, private Ui::MainWindow
39 {
40         Q_OBJECT
41
42 public:
43         MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
44         ~MainWindow(void);
45
46         bool isAccepted() { return m_accepted; }
47
48 private slots:
49         void windowShown(void);
50         void aboutButtonClicked(void);
51         void encodeButtonClicked(void);
52         void closeButtonClicked(void);
53         void addFilesButtonClicked(void);
54         void clearFilesButtonClicked(void);
55         void removeFileButtonClicked(void);
56         void fileDownButtonClicked(void);
57         void fileUpButtonClicked(void);
58         void showDetailsButtonClicked(void);
59         void tabPageChanged(int idx);
60         void tabActionActivated(QAction *action);
61         void styleActionActivated(QAction *action);
62         void outputFolderViewClicked(const QModelIndex &index);
63         void makeFolderButtonClicked(void);
64         void gotoHomeFolderButtonClicked(void);
65         void gotoDesktopButtonClicked(void);
66         void gotoMusicFolderButtonClicked(void);
67         void checkUpdatesActionActivated(void);
68         void visitHomepageActionActivated(void);
69         void openFolderActionActivated(void);
70         void notifyOtherInstance(void);
71         void addFileDelayed(const QString &filePath);
72         void handleDelayedFiles(void);
73         void editMetaButtonClicked(void);
74         void clearMetaButtonClicked(void);
75         void updateEncoder(int id);
76         void updateRCMode(int id);
77         void updateBitrate(int value);
78         void sourceModelChanged(void);
79         void metaTagsEnabledChanged(void);
80         void playlistEnabledChanged(void);
81         void saveToSourceFolderChanged(void);
82         void prependRelativePathChanged(void);
83         void restoreCursor(void);
84         void sourceFilesContextMenu(const QPoint &pos);
85         void previewContextActionTriggered(void);
86         void findFileContextActionTriggered(void);
87         void disableUpdateReminderActionTriggered(bool checked);
88         void disableSoundsActionTriggered(bool checked);
89         void outputFolderContextMenu(const QPoint &pos);
90         void showFolderContextActionTriggered(void);
91         void installWMADecoderActionTriggered(bool checked);
92         void disableNeroAacNotificationsActionTriggered(bool checked);
93         void disableWmaDecoderNotificationsActionTriggered(bool checked);
94
95 protected:
96         void showEvent(QShowEvent *event);
97         void dragEnterEvent(QDragEnterEvent *event);
98         void dropEvent(QDropEvent *event);
99         void closeEvent(QCloseEvent *event);
100         void resizeEvent(QResizeEvent *event);
101         bool eventFilter(QObject *obj, QEvent *event);
102
103 private:
104         void addFiles(const QStringList &files);
105
106         bool m_accepted;
107         bool m_firstTimeShown;
108         FileListModel *m_fileListModel;
109         QFileSystemModelEx *m_fileSystemModel;
110         QActionGroup *m_tabActionGroup;
111         QActionGroup *m_styleActionGroup;
112         QButtonGroup *m_encoderButtonGroup;
113         QButtonGroup *m_modeButtonGroup;
114         WorkingBanner *m_banner;
115         MessageHandlerThread *m_messageHandler;
116         QStringList *m_delayedFileList;
117         QTimer *m_delayedFileTimer;
118         AudioFileModel *m_metaData;
119         MetaInfoModel *m_metaInfoModel;
120         SettingsModel *m_settings;
121         QLabel *m_dropNoteLabel;
122         QMenu *m_sourceFilesContextMenu;
123         QMenu *m_outputFolderContextMenu;
124 };