2010-11-06 23:04:47 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LameXP - Audio Encoder Front-End
|
2012-01-02 00:52:27 +01:00
|
|
|
// Copyright (C) 2004-2012 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);
|
2011-08-08 20:26:30 +02:00
|
|
|
void addFavoriteFolderActionTriggered(void);
|
2011-06-11 17:18:30 +02:00
|
|
|
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);
|
2012-03-28 02:21:34 +02:00
|
|
|
void centerOutputFolderModel(void);
|
2012-03-29 19:08:33 +02:00
|
|
|
void centerOutputFolderModel_doAsync(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
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);
|
2012-01-04 03:23:07 +01:00
|
|
|
void exportCsvContextActionTriggered(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-08-08 20:26:30 +02:00
|
|
|
void gotoFavoriteFolder(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-10-22 01:13:28 +02:00
|
|
|
void hibernateComputerActionTriggered(bool checked);
|
2011-05-21 13:07:17 +02:00
|
|
|
void importCueSheetActionTriggered(bool checked);
|
2012-01-04 21:10:33 +01:00
|
|
|
void importCsvContextActionTriggered(void);
|
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-10-06 23:55:42 +02:00
|
|
|
void normalizationModeChanged(int mode);
|
2011-05-21 13:07:17 +02:00
|
|
|
void notifyOtherInstance(void);
|
|
|
|
void openFolderActionActivated(void);
|
|
|
|
void outputFolderContextMenu(const QPoint &pos);
|
2012-03-29 01:32:47 +02:00
|
|
|
void outputFolderDirectoryLoaded(const QString &path);
|
2012-03-26 22:02:11 +02:00
|
|
|
void outputFolderEditFinished(void);
|
2012-03-29 01:32:47 +02:00
|
|
|
void outputFolderItemExpanded(const QModelIndex &item);
|
2012-03-29 03:22:24 +02:00
|
|
|
void outputFolderRowsInserted(const QModelIndex &parent, int start, int end);
|
2011-05-21 13:07:17 +02:00
|
|
|
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);
|
2011-09-18 02:01:45 +02:00
|
|
|
void showAnnounceBox(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
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);
|
2011-08-23 17:01:11 +02:00
|
|
|
void sourceFilesScrollbarMoved(int);
|
2011-05-21 13:07:17 +02:00
|
|
|
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-12-29 14:42:20 +01:00
|
|
|
virtual void changeEvent(QEvent *e);
|
|
|
|
virtual void closeEvent(QCloseEvent *event);
|
|
|
|
virtual void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
virtual void dropEvent(QDropEvent *event);
|
|
|
|
virtual bool eventFilter(QObject *obj, QEvent *event);
|
|
|
|
virtual void resizeEvent(QResizeEvent *event);
|
|
|
|
virtual void showEvent(QShowEvent *event);
|
|
|
|
virtual bool event(QEvent *e);
|
|
|
|
virtual bool winEvent(MSG *message, long *result);
|
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-08-08 20:26:30 +02:00
|
|
|
void refreshFavorites(void);
|
2011-05-21 13:07:17 +02:00
|
|
|
|
2010-11-19 21:11:54 +01:00
|
|
|
bool m_accepted;
|
2010-11-20 22:14:10 +01:00
|
|
|
bool m_firstTimeShown;
|
2012-03-29 01:32:47 +02:00
|
|
|
bool m_outputFolderViewInitialized;
|
|
|
|
bool m_outputFolderViewCentering;
|
2011-05-21 13:07:17 +02:00
|
|
|
|
|
|
|
const bool m_neroEncoderAvailable;
|
2011-08-19 15:27:58 +02:00
|
|
|
const bool m_fhgEncoderAvailable;
|
2011-11-21 01:22:41 +01:00
|
|
|
const bool m_qaacEncoderAvailable;
|
2011-05-21 13:07:17 +02:00
|
|
|
|
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-08-08 20:26:30 +02:00
|
|
|
QMenu *m_outputFolderFavoritesMenu;
|
2011-05-21 13:07:17 +02:00
|
|
|
|
|
|
|
QAction *m_findFileContextAction;
|
|
|
|
QAction *m_previewContextAction;
|
|
|
|
QAction *m_showDetailsContextAction;
|
|
|
|
QAction *m_showFolderContextAction;
|
2011-08-08 20:26:30 +02:00
|
|
|
QAction *m_addFavoriteFolderAction;
|
2012-01-04 03:23:07 +01:00
|
|
|
QAction *m_exportCsvContextAction;
|
2012-01-04 21:10:33 +01:00
|
|
|
QAction *m_importCsvContextAction;
|
2011-05-21 13:07:17 +02:00
|
|
|
QActionGroup *m_languageActionGroup;
|
|
|
|
QActionGroup *m_styleActionGroup;
|
|
|
|
QActionGroup *m_tabActionGroup;
|
|
|
|
QButtonGroup *m_encoderButtonGroup;
|
|
|
|
QButtonGroup *m_modeButtonGroup;
|
2010-11-06 23:04:47 +01:00
|
|
|
};
|