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"
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 outputFolderViewClicked(const QModelIndex &index);
65 void outputFolderViewMoved(const QModelIndex &index);
66 void makeFolderButtonClicked(void);
67 void gotoHomeFolderButtonClicked(void);
68 void gotoDesktopButtonClicked(void);
69 void gotoMusicFolderButtonClicked(void);
70 void checkUpdatesActionActivated(void);
71 void visitHomepageActionActivated(void);
72 void openFolderActionActivated(void);
73 void notifyOtherInstance(void);
74 void addFileDelayed(const QString &filePath);
75 void handleDelayedFiles(void);
76 void editMetaButtonClicked(void);
77 void clearMetaButtonClicked(void);
78 void updateEncoder(int id);
79 void updateRCMode(int id);
80 void updateBitrate(int value);
81 void sourceModelChanged(void);
82 void metaTagsEnabledChanged(void);
83 void playlistEnabledChanged(void);
84 void saveToSourceFolderChanged(void);
85 void prependRelativePathChanged(void);
86 void restoreCursor(void);
87 void sourceFilesContextMenu(const QPoint &pos);
88 void previewContextActionTriggered(void);
89 void findFileContextActionTriggered(void);
90 void disableUpdateReminderActionTriggered(bool checked);
91 void disableSoundsActionTriggered(bool checked);
92 void outputFolderContextMenu(const QPoint &pos);
93 void showFolderContextActionTriggered(void);
94 void installWMADecoderActionTriggered(bool checked);
95 void disableNeroAacNotificationsActionTriggered(bool checked);
96 void disableWmaDecoderNotificationsActionTriggered(bool checked);
97 void showDropBoxWidgetActionTriggered(bool checked);
100 void showEvent(QShowEvent *event);
101 void dragEnterEvent(QDragEnterEvent *event);
102 void dropEvent(QDropEvent *event);
103 void closeEvent(QCloseEvent *event);
104 void resizeEvent(QResizeEvent *event);
105 bool eventFilter(QObject *obj, QEvent *event);
106 void changeEvent(QEvent *e);
109 void addFiles(const QStringList &files);
112 bool m_firstTimeShown;
113 FileListModel *m_fileListModel;
114 QFileSystemModelEx *m_fileSystemModel;
115 QActionGroup *m_tabActionGroup;
116 QActionGroup *m_styleActionGroup;
117 QActionGroup *m_languageActionGroup;
118 QButtonGroup *m_encoderButtonGroup;
119 QButtonGroup *m_modeButtonGroup;
120 QAction *m_showDetailsContextAction;
121 QAction *m_previewContextAction;
122 QAction *m_findFileContextAction;
123 QAction *m_showFolderContextAction;
124 WorkingBanner *m_banner;
125 MessageHandlerThread *m_messageHandler;
126 QStringList *m_delayedFileList;
127 QTimer *m_delayedFileTimer;
128 AudioFileModel *m_metaData;
129 MetaInfoModel *m_metaInfoModel;
130 SettingsModel *m_settings;
131 QLabel *m_dropNoteLabel;
132 QMenu *m_sourceFilesContextMenu;
133 QMenu *m_outputFolderContextMenu;