Added the photo viewer application to the application module
authorGokul Kartha <everyourgokul@gmail.com>
Wed, 17 Nov 2010 20:13:40 +0000 (22:13 +0200)
committerGokul Kartha <everyourgokul@gmail.com>
Wed, 17 Nov 2010 20:13:40 +0000 (22:13 +0200)
src/app/viewer/main.cpp [new file with mode: 0644]
src/app/viewer/photoviewer.cpp [new file with mode: 0644]
src/app/viewer/photoviewer.h [new file with mode: 0644]
src/app/viewer/viewer.pro [new file with mode: 0644]

diff --git a/src/app/viewer/main.cpp b/src/app/viewer/main.cpp
new file mode 100644 (file)
index 0000000..028e750
--- /dev/null
@@ -0,0 +1,10 @@
+#include<QApplication>
+#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 (file)
index 0000000..307b37a
--- /dev/null
@@ -0,0 +1,18 @@
+#include "photoviewer.h"
+#include <QCoreApplication>
+
+#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 (file)
index 0000000..a4e338c
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef PHOTOVIEWER_H
+#define PHOTOVIEWER_H
+
+#include <QMainWindow>
+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 (file)
index 0000000..c01584f
--- /dev/null
@@ -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