SilentEye 0.4.1

mainwindow.h

Go to the documentation of this file.
00001 //  This file is part of SilentEye.
00002 //
00003 //  SilentEye is free software: you can redistribute it and/or modify
00004 //  it under the terms of the GNU General Public License as published by
00005 //  the Free Software Foundation, either version 3 of the License, or
00006 //  (at your option) any later version.
00007 //
00008 //  SilentEye is distributed in the hope that it will be useful,
00009 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 //  GNU General Public License for more details.
00012 //
00013 //  You should have received a copy of the GNU General Public License
00014 //  along with SilentEye. If not, see <http://www.gnu.org/licenses/>.
00015 
00016 #ifndef MAIN_WINDOW_H
00017 #define MAIN_WINDOW_H
00018 
00019 #include <QtGui>
00020 #include "ui_mainwindow.h"
00021 
00022 #include "aboutdialog.h"
00023 #include "encodedialog.h"
00024 #include "propertydialog.h"
00025 #include "preferencedialog.h"
00026 #include "updatedialog.h"
00027 #include "decodedialog.h"
00028 #include "mediawidget.h"
00029 
00030 using namespace SilentEyeFramework;
00031 
00033 namespace SilentEye {
00034 
00036     class MainWindow : public QMainWindow, public Ui::MainWindow
00037     {
00038         Q_OBJECT;
00039 
00040     private:
00041         EncodeDialog encodeDialog;
00042         PropertyDialog propertyDialog;
00043         DecodeDialog decodeDialog;
00044         PreferenceDialog preferenceDialog;
00045         AboutDialog aboutDialog;
00046         UpdateDialog updateDialog;
00047 
00048         QMenu* contextMenu;
00049         QPushButton* closeTabButton;
00050 
00051         QMap<QString, QPointer<Media> > m_mediaMap;
00052         bool m_hasMediaLoaded;
00053 
00054         QPointer<QSound> m_currentSound;
00055 
00056         QPointer<Logger> m_logger;
00057     public:
00058         MainWindow(QString url = "", QWidget *parent = 0);
00059         ~MainWindow();
00060 
00061     private:
00062         void connectSignals();
00063         void setEnabledImageActions(const bool value);
00064         QPointer<Media> currentMedia();
00065         void closeTabByPath(QString);
00066 
00067     private slots:
00068         void dragEnterEvent(QDragEnterEvent*);
00069         void dropEvent(QDropEvent*);
00070         void closeCurrentTab();
00071         void addMediaTab(QPointer<Media>);
00072 
00073         void paste();
00074         void copy();
00075         void execDecodeDialog();
00076         void execEncodeDialog();
00077         void execPropertyDialog();
00078         void execUpdateDialog();
00079 
00080         void newMedia(QString);
00081         void openFile();
00082 
00083         void playMedia();
00084         void stopMedia();
00085     };
00086 }
00087 
00088 #endif