OSDN Git Service

Move about dialog into a separate class
[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 #include "Model_FileList.h"
27
28 //Class declarations
29 class QFileSystemModel;
30 class WorkingBanner;
31 class MessageHandlerThread;
32 class AudioFileModel;
33 class MetaInfoModel;
34
35 class MainWindow: public QMainWindow, private Ui::MainWindow
36 {
37         Q_OBJECT
38
39 public:
40         MainWindow(QWidget *parent = 0);
41         ~MainWindow(void);
42
43 private slots:
44         void windowShown(void);
45         void aboutButtonClicked(void);
46         void encodeButtonClicked(void);
47         void addFilesButtonClicked(void);
48         void clearFilesButtonClicked(void);
49         void removeFileButtonClicked(void);
50         void fileDownButtonClicked(void);
51         void fileUpButtonClicked(void);
52         void showDetailsButtonClicked(void);
53         void tabPageChanged(int idx);
54         void tabActionActivated(QAction *action);
55         void styleActionActivated(QAction *action);
56         void outputFolderViewClicked(const QModelIndex &index);
57         void makeFolderButtonClicked(void);
58         void gotoHomeFolderButtonClicked(void);
59         void gotoDesktopButtonClicked(void);
60         void gotoMusicFolderButtonClicked(void);
61         void checkUpdatesActionActivated(void);
62         void visitHomepageActionActivated(void);
63         void openFolderActionActivated(void);
64         void notifyOtherInstance(void);
65         void addFileDelayed(const QString &filePath);
66         void handleDelayedFiles(void);
67         void editMetaButtonClicked(void);
68         void clearMetaButtonClicked(void);
69
70 protected:
71         void showEvent(QShowEvent *event);
72
73 private:
74         void addFiles(const QStringList &files);
75
76         FileListModel *m_fileListModel;
77         QFileSystemModel *m_fileSystemModel;
78         QActionGroup *m_tabActionGroup;
79         QActionGroup *m_styleActionGroup;
80         WorkingBanner *m_banner;
81         MessageHandlerThread *m_messageHandler;
82         QStringList *m_delayedFileList;
83         QTimer *m_delayedFileTimer;
84         AudioFileModel *m_metaData;
85         MetaInfoModel *m_metaInfoModel;
86 };