1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2010 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"
26 //#include "Model_FileList.h"
29 class QFileSystemModel;
31 class MessageHandlerThread;
37 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 outputFolderViewClicked(const QModelIndex &index);
64 void makeFolderButtonClicked(void);
65 void gotoHomeFolderButtonClicked(void);
66 void gotoDesktopButtonClicked(void);
67 void gotoMusicFolderButtonClicked(void);
68 void checkUpdatesActionActivated(void);
69 void visitHomepageActionActivated(void);
70 void openFolderActionActivated(void);
71 void notifyOtherInstance(void);
72 void addFileDelayed(const QString &filePath);
73 void handleDelayedFiles(void);
74 void editMetaButtonClicked(void);
75 void clearMetaButtonClicked(void);
76 void updateEncoder(int id);
77 void updateRCMode(int id);
78 void updateBitrate(int value);
79 void sourceModelChanged(void);
80 void metaTagsEnabledChanged(void);
81 void playlistEnabledChanged(void);
82 void saveToSourceFolderChanged(void);
85 void showEvent(QShowEvent *event);
86 void dragEnterEvent(QDragEnterEvent *event);
87 void dropEvent(QDropEvent *event);
88 void closeEvent(QCloseEvent *event);
89 void resizeEvent(QResizeEvent *event);
92 void addFiles(const QStringList &files);
95 bool m_firstTimeShown;
96 FileListModel *m_fileListModel;
97 QFileSystemModel *m_fileSystemModel;
98 QActionGroup *m_tabActionGroup;
99 QActionGroup *m_styleActionGroup;
100 QButtonGroup *m_encoderButtonGroup;
101 QButtonGroup *m_modeButtonGroup;
102 WorkingBanner *m_banner;
103 MessageHandlerThread *m_messageHandler;
104 QStringList *m_delayedFileList;
105 QTimer *m_delayedFileTimer;
106 AudioFileModel *m_metaData;
107 MetaInfoModel *m_metaInfoModel;
108 SettingsModel *m_settings;
109 QLabel *m_dropNoteLabel;