Files
calyp/source/plaYUVerApp.h
T
2014-02-03 23:59:53 +00:00

154 lines
3.3 KiB
C++

/* This file is a part of plaYUVerApp project
* Copyright (C) 2014 by plaYUVerApp developers
*
* 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.
*/
/**
* \file plaYUVerApp.h
* \brief Main definition of the plaYUVerApp app
*/
#ifndef __PLAYUVERAPP_H__
#define __PLAYUVERAPP_H__
#include "config.h"
#include <QMainWindow>
#include "TypeDef.h"
class QAction;
class QMenu;
class QMdiArea;
class QMdiSubWindow;
class QSignalMapper;
namespace plaYUVer
{
class SubWindowHandle;
class plaYUVerApp: public QMainWindow
{
Q_OBJECT
public:
plaYUVerApp();
protected:
Void closeEvent( QCloseEvent *event );
private slots:
//! File functions
void open();
void save();
//! Playing functions
void play();
void pause();
void stop();
void playEvent();
//! View functions
void zoomIn();
void zoomOut();
void normalSize();
void zoomToFit();
//! Show a message box with some information about the plaYUVerApp App
void about();
void updateMenus();
void updateWindowMenu();
/*
* Drag and drop functions
*/
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
SubWindowHandle *createImageInterface();
void addImageInterface( SubWindowHandle *child );
void setActiveImageInterface( QWidget *window );
private:
Void createActions();
Void createMenus();
Void createToolBars();
Void createStatusBar();
Void readSettings();
Void writeSettings();
SubWindowHandle *activeImageInterface();
QMdiSubWindow *findImageInterface( const QString &fileName );
/**
* Scale the image by a given factor
* @param factor factor of scale. Ex: 1.2 scale the image up by 20% and
* 0.8 scale the image down by 25%
*/
Void scaleImage( Double factor );
QString m_cLastOpenPath;
QTimer *playingTimer;
QMdiArea *mdiArea;
QSignalMapper *windowMapper;
QMenu *fileMenu;
QMenu *viewMenu;
QMenu *windowMenu;
QMenu *helpMenu;
QToolBar *fileToolBar;
QToolBar *viewToolBar;
QToolBar *videoToolBar;
QAction *openAct;
QAction *saveAct;
QAction *exitAct;
QAction *closeAct;
QAction *closeAllAct;
QAction *zoomInAct;
QAction *zoomOutAct;
QAction *normalSizeAct;
QAction *zoomToFitAct;
QAction *tileAct;
QAction *cascadeAct;
QAction *nextAct;
QAction *previousAct;
QAction *separatorAct;
// Video actions.
QAction *actionVideoPlay;
QAction *actionVideoPause;
QAction *actionVideoStop;
QAction *actionVideoBackward;
QAction *actionVideoForward;
QAction *actionVideoLoop;
QAction *actionVideoLock;
QAction *actionVideoInterlace;
QAction *actionVideoCenter;
QAction *aboutAct;
QAction *aboutQtAct;
};
} // NAMESPACE
#endif // __PLAYUVERAPP_H__