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:
|
2010-11-08 19:29:36 +01:00
|
|
|
void windowShown(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void aboutButtonClicked(void);
|
|
|
|
void encodeButtonClicked(void);
|
2010-11-19 21:11:54 +01:00
|
|
|
void closeButtonClicked(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void addFilesButtonClicked(void);
|
|
|
|
void clearFilesButtonClicked(void);
|
|
|
|
void removeFileButtonClicked(void);
|
|
|
|
void fileDownButtonClicked(void);
|
|
|
|
void fileUpButtonClicked(void);
|
2010-11-10 19:44:51 +01:00
|
|
|
void showDetailsButtonClicked(void);
|
2010-11-06 23:04:47 +01:00
|
|
|
void tabPageChanged(int idx);
|
|
|
|
void tabActionActivated(QAction *action);
|
2010-11-08 00:24:54 +01:00
|
|
|
void styleActionActivated(QAction *action);
|
2010-12-28 03:57:48 +01:00
|
|
|
void languageActionActivated(QAction *action);
|
2011-01-06 00:53:52 +01:00
|
|
|
void languageFromFileActionActivated(bool checked);
|
2010-11-06 23:04:47 +01:00
|
|
|
void outputFolderViewClicked(const QModelIndex &index);
|
2010-12-27 18:31:21 +01:00
|
|
|
void outputFolderViewMoved(const QModelIndex &index);
|
2010-11-06 23:04:47 +01:00
|
|
|
void makeFolderButtonClicked(void);
|
|
|
|
void gotoHomeFolderButtonClicked(void);
|
|
|
|
void gotoDesktopButtonClicked(void);
|
|
|
|
void gotoMusicFolderButtonClicked(void);
|
|
|
|
void checkUpdatesActionActivated(void);
|
|
|
|
void visitHomepageActionActivated(void);
|
|
|
|
void openFolderActionActivated(void);
|
2010-11-08 21:47:35 +01:00
|
|
|
void notifyOtherInstance(void);
|
|
|
|
void addFileDelayed(const QString &filePath);
|
|
|
|
void handleDelayedFiles(void);
|
2010-11-10 19:44:51 +01:00
|
|
|
void editMetaButtonClicked(void);
|
|
|
|
void clearMetaButtonClicked(void);
|
2010-11-15 04:42:06 +01:00
|
|
|
void updateEncoder(int id);
|
|
|
|
void updateRCMode(int id);
|
2010-11-11 22:58:02 +01:00
|
|
|
void updateBitrate(int value);
|
2011-01-21 19:14:11 +01:00
|
|
|
void updateLameAlgoQuality(int value);
|
2011-01-21 21:41:50 +01:00
|
|
|
void bitrateManagementEnabledChanged(bool checked);
|
|
|
|
void bitrateManagementMinChanged(int value);
|
|
|
|
void bitrateManagementMaxChanged(int value);
|
2011-01-22 22:19:20 +01:00
|
|
|
void samplingRateChanged(int value);
|
|
|
|
void channelModeChanged(int value);
|
|
|
|
void neroAACProfileChanged(int value);
|
|
|
|
void neroAAC2PassChanged(bool checked);
|
2011-01-24 01:13:08 +01:00
|
|
|
void normalizationEnabledChanged(bool checked);
|
|
|
|
void normalizationMaxVolumeChanged(double volume);
|
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);
|
|
|
|
void customParamsChanged(void);
|
|
|
|
void resetAdvancedOptionsButtonClicked(void);
|
2010-11-21 21:51:41 +01:00
|
|
|
void sourceModelChanged(void);
|
2010-11-20 19:16:04 +01:00
|
|
|
void metaTagsEnabledChanged(void);
|
2010-11-20 22:14:10 +01:00
|
|
|
void playlistEnabledChanged(void);
|
2010-11-21 21:51:41 +01:00
|
|
|
void saveToSourceFolderChanged(void);
|
2010-12-14 01:25:13 +01:00
|
|
|
void prependRelativePathChanged(void);
|
2010-11-24 21:00:59 +01:00
|
|
|
void restoreCursor(void);
|
2010-11-25 20:41:59 +01:00
|
|
|
void sourceFilesContextMenu(const QPoint &pos);
|
|
|
|
void previewContextActionTriggered(void);
|
|
|
|
void findFileContextActionTriggered(void);
|
2010-11-29 20:36:27 +01:00
|
|
|
void disableUpdateReminderActionTriggered(bool checked);
|
|
|
|
void disableSoundsActionTriggered(bool checked);
|
2010-12-05 23:11:03 +01:00
|
|
|
void outputFolderContextMenu(const QPoint &pos);
|
|
|
|
void showFolderContextActionTriggered(void);
|
2010-12-12 01:49:07 +01:00
|
|
|
void installWMADecoderActionTriggered(bool checked);
|
2010-12-19 21:23:43 +01:00
|
|
|
void disableNeroAacNotificationsActionTriggered(bool checked);
|
|
|
|
void disableWmaDecoderNotificationsActionTriggered(bool checked);
|
2010-12-22 01:01:01 +01:00
|
|
|
void showDropBoxWidgetActionTriggered(bool checked);
|
2011-01-29 00:40:29 +01:00
|
|
|
void disableShellIntegrationActionTriggered(bool);
|
2010-11-06 23:04:47 +01:00
|
|
|
|
2010-11-08 19:29:36 +01:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
2010-11-12 23:31:04 +01:00
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
void dropEvent(QDropEvent *event);
|
2010-11-19 21:11:54 +01:00
|
|
|
void closeEvent(QCloseEvent *event);
|
2010-11-20 02:14:22 +01:00
|
|
|
void resizeEvent(QResizeEvent *event);
|
2010-11-24 21:00:59 +01:00
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
2010-12-30 17:34:19 +01:00
|
|
|
void changeEvent(QEvent *e);
|
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-01-29 00:40:29 +01:00
|
|
|
void installWMADecoder(void);
|
2010-11-11 19:37:16 +01:00
|
|
|
|
2010-11-19 21:11:54 +01:00
|
|
|
bool m_accepted;
|
2010-11-20 22:14:10 +01:00
|
|
|
bool m_firstTimeShown;
|
2010-11-06 23:04:47 +01:00
|
|
|
FileListModel *m_fileListModel;
|
2010-11-25 01:23:48 +01:00
|
|
|
QFileSystemModelEx *m_fileSystemModel;
|
2010-11-06 23:04:47 +01:00
|
|
|
QActionGroup *m_tabActionGroup;
|
2010-11-08 00:24:54 +01:00
|
|
|
QActionGroup *m_styleActionGroup;
|
2010-12-28 03:57:48 +01:00
|
|
|
QActionGroup *m_languageActionGroup;
|
2010-11-15 04:42:06 +01:00
|
|
|
QButtonGroup *m_encoderButtonGroup;
|
|
|
|
QButtonGroup *m_modeButtonGroup;
|
2010-12-28 21:26:16 +01:00
|
|
|
QAction *m_showDetailsContextAction;
|
|
|
|
QAction *m_previewContextAction;
|
|
|
|
QAction *m_findFileContextAction;
|
|
|
|
QAction *m_showFolderContextAction;
|
2010-11-06 23:04:47 +01:00
|
|
|
WorkingBanner *m_banner;
|
2010-11-08 19:29:36 +01:00
|
|
|
MessageHandlerThread *m_messageHandler;
|
2010-11-08 21:47:35 +01:00
|
|
|
QStringList *m_delayedFileList;
|
|
|
|
QTimer *m_delayedFileTimer;
|
2010-11-10 19:44:51 +01:00
|
|
|
AudioFileModel *m_metaData;
|
|
|
|
MetaInfoModel *m_metaInfoModel;
|
2010-11-12 19:02:01 +01:00
|
|
|
SettingsModel *m_settings;
|
2010-11-20 02:14:22 +01:00
|
|
|
QLabel *m_dropNoteLabel;
|
2010-11-25 20:41:59 +01:00
|
|
|
QMenu *m_sourceFilesContextMenu;
|
2010-12-05 23:11:03 +01:00
|
|
|
QMenu *m_outputFolderContextMenu;
|
2010-12-22 01:01:01 +01:00
|
|
|
DropBox *m_dropBox;
|
2010-11-06 23:04:47 +01:00
|
|
|
};
|