From c6e6721b459b12489812b882e88c8a29704d8e20 Mon Sep 17 00:00:00 2001 From: Gokul Kartha Date: Wed, 17 Nov 2010 22:13:40 +0200 Subject: [PATCH] Added the photo viewer application to the application module --- src/app/viewer/main.cpp | 10 ++++++++++ src/app/viewer/photoviewer.cpp | 18 ++++++++++++++++++ src/app/viewer/photoviewer.h | 20 ++++++++++++++++++++ src/app/viewer/viewer.pro | 16 ++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 src/app/viewer/main.cpp create mode 100644 src/app/viewer/photoviewer.cpp create mode 100644 src/app/viewer/photoviewer.h create mode 100644 src/app/viewer/viewer.pro diff --git a/src/app/viewer/main.cpp b/src/app/viewer/main.cpp new file mode 100644 index 0000000..028e750 --- /dev/null +++ b/src/app/viewer/main.cpp @@ -0,0 +1,10 @@ +#include +#include "photoviewer.h" +int main(int argc,char **argv) +{ + QApplication app(argc,argv); + PhotoViewer window; + window.resize(600,480); + window.show(); + return app.exec(); +} diff --git a/src/app/viewer/photoviewer.cpp b/src/app/viewer/photoviewer.cpp new file mode 100644 index 0000000..307b37a --- /dev/null +++ b/src/app/viewer/photoviewer.cpp @@ -0,0 +1,18 @@ +#include "photoviewer.h" +#include + +#include "workspace.h" +PhotoViewer::PhotoViewer(QWidget *parent) : + QMainWindow(parent) +{ + mWorkspace=new Workspace(); + setCentralWidget(mWorkspace); + processCommandLineArgs(); + +} +//temporary implementaion +void PhotoViewer::processCommandLineArgs() +{ + mWorkspace->loadImage(qApp->arguments()[1]); +} + diff --git a/src/app/viewer/photoviewer.h b/src/app/viewer/photoviewer.h new file mode 100644 index 0000000..a4e338c --- /dev/null +++ b/src/app/viewer/photoviewer.h @@ -0,0 +1,20 @@ +#ifndef PHOTOVIEWER_H +#define PHOTOVIEWER_H + +#include +class Workspace; +class PhotoViewer : public QMainWindow +{ + Q_OBJECT +public: + explicit PhotoViewer(QWidget *parent = 0); +private: + Workspace *mWorkspace; + void processCommandLineArgs(); +signals: + +public slots: + +}; + +#endif // PHOTOVIEWER_H diff --git a/src/app/viewer/viewer.pro b/src/app/viewer/viewer.pro new file mode 100644 index 0000000..c01584f --- /dev/null +++ b/src/app/viewer/viewer.pro @@ -0,0 +1,16 @@ +###################################################################### +# Automatically generated by qmake (2.01a) Tue Nov 16 21:47:22 2010 +###################################################################### + +TEMPLATE = app +TARGET = ../../../bin/photoviewer +DEPENDPATH +=. ../../core/baseui ../../core/utils +INCLUDEPATH +=. ../../core/baseui ../../core/utils +LIBS+=-L../../../libs/ -lPEBaseui \ + -L../../../libs/ -lPEUtils +# Input +SOURCES += main.cpp \ + photoviewer.cpp + +HEADERS += \ + photoviewer.h -- 1.7.9.5