OSDN Git Service

Added menu entry for the User's Manual + improved code for opening document links.
[lamexp/LameXP.git] / src / Dialog_MainWindow.h
index 4c46f7a..1f95df2 100644 (file)
@@ -1,11 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // 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.
+// (at your option) any later version, but always including the *additional*
+// restrictions defined in the "License.txt" file.
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,6 +27,7 @@
 //Class declarations
 class AbstractEncoder;
 class AudioFileModel;
+class AudioFileModel_MetaInfo;
 class CustomEventFilter;
 class DropBox;
 class FileListModel;
@@ -36,22 +38,31 @@ class QButtonGroup;
 class QFileSystemModelEx;
 class QLabel;
 class QMenu;
+class QUrl;
 class QModelIndex;
 class SettingsModel;
 class WorkingBanner;
+class lamexp_icon_t;
 
 //UIC forward declartion
-namespace Ui {
+namespace Ui
+{
        class MainWindow;
 }
 
+//IPC forward declartion
+namespace MUtils
+{
+       class IPCChannel;
+}
+
 //MainWindow class
 class MainWindow: public QMainWindow
 {
        Q_OBJECT
 
 public:
-       MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent = 0);
+       MainWindow(MUtils::IPCChannel *const ipcChannel, FileListModel *const fileListModel, AudioFileModel_MetaInfo *const metaInfo, SettingsModel *const settingsModel, QWidget *const parent = 0);
        ~MainWindow(void);
 
        bool isAccepted() { return m_accepted; }
@@ -81,6 +92,7 @@ private slots:
        void clearMetaButtonClicked(void);
        void closeButtonClicked(void);
        void compressionTabEventOccurred(QWidget*, QEvent*);
+       void cornerWidgetEventOccurred(QWidget *sender, QEvent *event);
        void customParamsChanged(void);
        void customParamsHelpRequested(QWidget *obj, QEvent *event);
        void customTempFolderChanged(const QString &text);
@@ -103,6 +115,7 @@ private slots:
        void gotoMusicFolderButtonClicked(void);
        void goUpFolderContextActionTriggered(void);
        void handleDelayedFiles(void);
+       void handleDroppedFiles(void);
        void hibernateComputerActionTriggered(bool checked);
        void importCueSheetActionTriggered(bool checked);
        void importCsvContextActionTriggered(void);
@@ -153,7 +166,7 @@ private slots:
        void sourceModelChanged(void);
        void styleActionActivated(QAction *action);
        void tabActionActivated(QAction *action);
-       void tabPageChanged(int idx);
+       void tabPageChanged(int idx, const bool silent = false);
        void toneAdjustBassChanged(double value);
        void toneAdjustTrebleChanged(double value);
        void toneAdjustTrebleReset(void);
@@ -186,20 +199,15 @@ private:
        bool checkForUpdates(void);
        void initializeTranslation(void);
        void refreshFavorites(void);
-       int getCurrentRCMode(int encoder);
-       int getCurrentQuality(int encoder);
-       int getCurrentBitrate(int encoder);
+       void openDocumentLink(QAction *const action);
        
        bool m_accepted;
        bool m_firstTimeShown;
        uint m_outputFolderViewInitCounter;
        bool m_outputFolderViewCentering;
 
-       const bool m_neroEncoderAvailable;
-       const bool m_fhgEncoderAvailable;
-       const bool m_qaacEncoderAvailable;
-
        WorkingBanner *m_banner;
+       QList<QUrl> *m_droppedFileList;
        QStringList *m_delayedFileList;
        QTimer *m_delayedFileTimer;
        DropBox *m_dropBox;
@@ -207,7 +215,7 @@ private:
        FileListModel *m_fileListModel;
        QFileSystemModelEx *m_fileSystemModel;
        MessageHandlerThread *m_messageHandler;
-       AudioFileModel *m_metaData;
+       AudioFileModel_MetaInfo *const m_metaData;
        MetaInfoModel *m_metaInfoModel;
        QMenu *m_outputFolderContextMenu;
        SettingsModel *m_settings;
@@ -231,6 +239,7 @@ private:
        QButtonGroup *m_modeButtonGroup;
        QButtonGroup *m_overwriteButtonGroup;
 
+       CustomEventFilter *m_evenFilterCornerWidget;
        CustomEventFilter *m_evenFilterCustumParamsHelp;
        CustomEventFilter *m_evenFilterOutputFolderMouse;
        CustomEventFilter *m_evenFilterOutputFolderView;