2010-11-06 23:04:47 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LameXP - Audio Encoder Front-End
|
2011-01-01 17:04:25 +01:00
|
|
|
// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
|
2010-11-06 23:04:47 +01:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../tmp/UIC_MainWindow.h"
|
|
|
|
|
|
|
|
//Class declarations
|
2010-11-25 01:23:48 +01:00
|
|
|
class QFileSystemModelEx;
|
2010-11-06 23:04:47 +01:00
|
|
|
class WorkingBanner;
|
2010-11-08 19:29:36 +01:00
|
|
|
class MessageHandlerThread;
|
2010-11-10 19:44:51 +01:00
|
|
|
class AudioFileModel;
|
|
|
|
class MetaInfoModel;
|
2010-11-12 19:02:01 +01:00
|
|
|
class SettingsModel;
|
2010-11-15 04:42:06 +01:00
|
|
|
class QButtonGroup;
|
2010-11-19 21:11:54 +01:00
|
|
|
class FileListModel;
|
2010-11-20 02:14:22 +01:00
|
|
|
class AbstractEncoder;
|
2010-11-25 20:41:59 +01:00
|
|
|
class QMenu;
|
2010-12-22 01:01:01 +01:00
|
|
|
class DropBox;
|
2010-11-06 23:04:47 +01:00
|
|
|
|
|
|
|
class MainWindow: public QMainWindow, private Ui::MainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2010-11-19 21:11:54 +01:00
|
|
|
MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
|
2010-11-06 23:04:47 +01:00
|
|
|
~MainWindow(void);
|
|
|
|
|
2010-11-19 21:11:54 +01:00
|
|
|
bool isAccepted() { return m_accepted; }
|
|
|
|
|
2010-11-06 23:04:47 +01:00
|
|
|
private slots:
|
|
|
|
void aboutButtonClicked(void);
|
2011-06-11 17:18:30 +02:00
|
|
|
void addFileDelayed(const QString &filePath, bool tryASAP = false);
|
2010-11-06 23:04:47 +01:00
|
|
|
void addFilesButtonClicked(void);
|
2011-06-11 17:18:30 +02:00
|
|
|
void addFilesDelayed(const QStringList &filePaths, bool tryASAP = false);
|
|
|
|
void addFolderDelayed(const QString &folderPath, bool recursive);
|
2011-05-21 13:07:17 +02:00
|
|
|
void aftenCodingModeChanged(int value);
|
|
|
|
void aftenDRCModeChanged(int value);
|
|
|
|
void aftenFastAllocationChanged(bool checked);
|
|
|
|
void aftenSearchSizeChanged(int value);
|
|
|
|
void autoDetectInstancesChanged(bool checked);
|
|
|
|
void bitrateManagementEnabledChanged(bool checked);
|
|
|
|
void bitrateManagementMaxChanged(int value);
|
|
|
|
void bitrateManagementMinChanged(int value);
|
|
|
|
void browseCustomTempFolderButtonClicked(void);
|
|
|
|
void channelModeChanged(int value);
|
|
|
|
void checkForBetaUpdatesActionTriggered(bool checked);
|
|
|
|
void checkUpdatesActionActivated(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void clearFilesButtonClicked(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void clearMetaButtonClicked(void);
|
|
|
|
void closeButtonClicked(void);
|
|
|
|
void customParamsChanged(void);
|
|
|
|
void customTempFolderChanged(const QString &text);
|
|
|
|
void disableNeroAacNotificationsActionTriggered(bool checked);
|
|
|
|
void disableShellIntegrationActionTriggered(bool);
|
2011-06-26 15:33:44 +02:00
|
|
|
void disableSlowStartupNotificationsActionTriggered(bool checked);
|
2011-05-21 13:07:17 +02:00
|
|
|
void disableSoundsActionTriggered(bool checked);
|
|
|
|
void disableUpdateReminderActionTriggered(bool checked);
|
|
|
|
void documentActionActivated(void);
|
|
|
|
void editMetaButtonClicked(void);
|
|
|
|
void encodeButtonClicked(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void fileDownButtonClicked(void);
|
|
|
|
void fileUpButtonClicked(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void findFileContextActionTriggered(void);
|
2011-08-05 21:52:43 +02:00
|
|
|
void forceStereoDownmixEnabledChanged(bool checked);
|
2010-11-06 23:04:47 +01:00
|
|
|
void gotoDesktopButtonClicked(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void gotoHomeFolderButtonClicked(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void gotoMusicFolderButtonClicked(void);
|
2010-11-08 21:47:35 +01:00
|
|
|
void handleDelayedFiles(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void importCueSheetActionTriggered(bool checked);
|
2011-06-04 22:43:14 +02:00
|
|
|
void initOutputFolderModel(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void languageActionActivated(QAction *action);
|
|
|
|
void languageFromFileActionActivated(bool checked);
|
|
|
|
void makeFolderButtonClicked(void);
|
|
|
|
void metaTagsEnabledChanged(void);
|
2011-01-22 22:19:20 +01:00
|
|
|
void neroAAC2PassChanged(bool checked);
|
2011-05-21 13:07:17 +02:00
|
|
|
void neroAACProfileChanged(int value);
|
2011-01-24 01:13:08 +01:00
|
|
|
void normalizationEnabledChanged(bool checked);
|
|
|
|
void normalizationMaxVolumeChanged(double volume);
|
2011-05-21 13:07:17 +02:00
|
|
|
void notifyOtherInstance(void);
|
|
|
|
void openFolderActionActivated(void);
|
|
|
|
void outputFolderContextMenu(const QPoint &pos);
|
|
|
|
void outputFolderViewClicked(const QModelIndex &index);
|
|
|
|
void outputFolderViewMoved(const QModelIndex &index);
|
|
|
|
void playlistEnabledChanged(void);
|
|
|
|
void prependRelativePathChanged(void);
|
|
|
|
void previewContextActionTriggered(void);
|
|
|
|
void removeFileButtonClicked(void);
|
2011-08-04 23:26:38 +02:00
|
|
|
void renameOutputEnabledChanged(bool checked);
|
|
|
|
void renameOutputPatternChanged(void);
|
|
|
|
void renameOutputPatternChanged(const QString &text);
|
2011-05-21 13:07:17 +02:00
|
|
|
void resetAdvancedOptionsButtonClicked(void);
|
|
|
|
void restoreCursor(void);
|
|
|
|
void samplingRateChanged(int value);
|
|
|
|
void saveToSourceFolderChanged(void);
|
|
|
|
void showDetailsButtonClicked(void);
|
|
|
|
void showDropBoxWidgetActionTriggered(bool checked);
|
|
|
|
void showFolderContextActionTriggered(void);
|
2011-08-05 02:33:32 +02:00
|
|
|
void showRenameMacros(const QString &text);
|
2011-05-21 13:07:17 +02:00
|
|
|
void sourceFilesContextMenu(const QPoint &pos);
|
|
|
|
void sourceModelChanged(void);
|
|
|
|
void styleActionActivated(QAction *action);
|
|
|
|
void tabActionActivated(QAction *action);
|
|
|
|
void tabPageChanged(int idx);
|
2011-01-26 20:16:46 +01:00
|
|
|
void toneAdjustBassChanged(double value);
|
|
|
|
void toneAdjustTrebleChanged(double value);
|
2011-02-09 23:36:17 +01:00
|
|
|
void toneAdjustTrebleReset(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
void updateBitrate(int value);
|
|
|
|
void updateEncoder(int id);
|
|
|
|
void updateLameAlgoQuality(int value);
|
2011-02-25 00:22:18 +01:00
|
|
|
void updateMaximumInstances(int value);
|
2011-05-21 13:07:17 +02:00
|
|
|
void updateRCMode(int id);
|
2011-02-25 22:03:39 +01:00
|
|
|
void useCustomTempFolderChanged(bool checked);
|
2011-05-21 13:07:17 +02:00
|
|
|
void visitHomepageActionActivated(void);
|
|
|
|
void windowShown(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
|
2010-11-08 19:29:36 +01:00
|
|
|
protected:
|
2011-05-21 13:07:17 +02:00
|
|
|
void changeEvent(QEvent *e);
|
|
|
|
void closeEvent(QCloseEvent *event);
|
2010-11-12 23:31:04 +01:00
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
void dropEvent(QDropEvent *event);
|
2010-11-24 21:00:59 +01:00
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
2011-05-21 13:07:17 +02:00
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
void showEvent(QShowEvent *event);
|
2010-11-08 19:29:36 +01:00
|
|
|
|
2010-11-06 23:04:47 +01:00
|
|
|
private:
|
2010-11-11 19:37:16 +01:00
|
|
|
void addFiles(const QStringList &files);
|
2011-06-11 17:18:30 +02:00
|
|
|
void addFolder(const QString &path, bool recursive = false, bool delayed = false);
|
2011-02-18 00:53:36 +01:00
|
|
|
bool checkForUpdates(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
bool installWMADecoder(void);
|
|
|
|
|
2010-11-19 21:11:54 +01:00
|
|
|
bool m_accepted;
|
2010-11-20 22:14:10 +01:00
|
|
|
bool m_firstTimeShown;
|
2011-06-04 22:43:14 +02:00
|
|
|
bool m_OutputFolderViewInitialized;
|
2011-05-21 13:07:17 +02:00
|
|
|
|
|
|
|
const bool m_neroEncoderAvailable;
|
|
|
|
|
2010-11-06 23:04:47 +01:00
|
|
|
WorkingBanner *m_banner;
|
2010-11-08 21:47:35 +01:00
|
|
|
QStringList *m_delayedFileList;
|
|
|
|
QTimer *m_delayedFileTimer;
|
2011-05-21 13:07:17 +02:00
|
|
|
DropBox *m_dropBox;
|
|
|
|
QLabel *m_dropNoteLabel;
|
|
|
|
FileListModel *m_fileListModel;
|
|
|
|
QFileSystemModelEx *m_fileSystemModel;
|
|
|
|
MessageHandlerThread *m_messageHandler;
|
2010-11-10 19:44:51 +01:00
|
|
|
AudioFileModel *m_metaData;
|
|
|
|
MetaInfoModel *m_metaInfoModel;
|
2011-05-21 13:07:17 +02:00
|
|
|
QMenu *m_outputFolderContextMenu;
|
2010-11-12 19:02:01 +01:00
|
|
|
SettingsModel *m_settings;
|
2010-11-25 20:41:59 +01:00
|
|
|
QMenu *m_sourceFilesContextMenu;
|
2011-05-21 13:07:17 +02:00
|
|
|
|
|
|
|
QAction *m_findFileContextAction;
|
|
|
|
QAction *m_previewContextAction;
|
|
|
|
QAction *m_showDetailsContextAction;
|
|
|
|
QAction *m_showFolderContextAction;
|
|
|
|
QActionGroup *m_languageActionGroup;
|
|
|
|
QActionGroup *m_styleActionGroup;
|
|
|
|
QActionGroup *m_tabActionGroup;
|
|
|
|
QButtonGroup *m_encoderButtonGroup;
|
|
|
|
QButtonGroup *m_modeButtonGroup;
|
2010-11-06 23:04:47 +01:00
|
|
|
};
|