Commit e7592415 authored by Julien Wintz's avatar Julien Wintz
Browse files

Adding view manager example.

parent fba2626e
......@@ -4,9 +4,9 @@
## Copyright (C) 2008 - Julien Wintz, Inria.
## Created: Mon Mar 9 21:06:43 2009 (+0100)
## Version: $Id$
## Last-Updated: Sun May 6 18:58:31 2012 (+0200)
## By: tkloczko
## Update #: 83
## Last-Updated: Wed May 16 09:44:16 2012 (+0200)
## By: Julien Wintz
## Update #: 84
######################################################################
##
### Commentary:
......@@ -56,6 +56,7 @@ add_subdirectory(dtkSettingsEditor)
add_subdirectory(dtkFinder)
add_subdirectory(dtkAboutPlugin)
add_subdirectory(dtkFlowLayout)
add_subdirectory(dtkViewManager)
## #################################################################
## dtkVr examples
......
### CMakeLists.txt ---
##
## Author: Julien Wintz
## Copyright (C) 2008-2011 - Julien Wintz, Inria.
## Created: Wed May 16 09:41:33 2012 (+0200)
## Version: $Id$
## Last-Updated: Wed May 16 09:41:52 2012 (+0200)
## By: Julien Wintz
## Update #: 3
######################################################################
##
### Commentary:
##
######################################################################
##
### Change log:
##
######################################################################
project(dtkViewManager)
## #################################################################
## Sources
## #################################################################
set(${PROJECT_NAME}_HEADERS_MOC
tstMainWindow.h)
set(${PROJECT_NAME}_SOURCES
tstMainWindow.cpp
main.cpp)
## #################################################################
## Build rules
## #################################################################
qt4_wrap_cpp(${PROJECT_NAME}_SOURCES_MOC ${${PROJECT_NAME}_HEADERS_MOC})
add_executable(${PROJECT_NAME} MACOSX_BUNDLE
${${PROJECT_NAME}_SOURCES_MOC}
${${PROJECT_NAME}_SOURCES})
target_link_libraries(${PROJECT_NAME}
${QT_LIBRARIES}
dtkCore
dtkGui)
/* main.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:42:04 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:48:36 2012 (+0200)
* By: Julien Wintz
* Update #: 7
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include <QtGui>
#include "tstMainWindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
tstMainWindow w;
w.resize(800, 600);
w.show();
w.raise();
return a.exec();
}
/* tstMainWindow.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:43:15 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:43:53 2012 (+0200)
* By: Julien Wintz
* Update #: 7
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "tstMainWindow.h"
#include <dtkGui/dtkViewManager.h>
class tstMainWindowPrivate
{
public:
dtkViewManager *manager;
};
tstMainWindow::tstMainWindow(QWidget *parent) : QMainWindow(parent), d(new tstMainWindowPrivate)
{
d->manager = new dtkViewManager(this);
this->setCentralWidget(d->manager);
this->setWindowTitle("dtk view manager example");
}
tstMainWindow::~tstMainWindow(void)
{
delete d;
d = NULL;
}
/* tstMainWindow.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:42:45 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:43:09 2012 (+0200)
* By: Julien Wintz
* Update #: 5
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef TSTMAINWINDOW_H
#define TSTMAINWINDOW_H
#include <QtGui/QMainWindow>
class tstMainWindowPrivate;
class tstMainWindow : public QMainWindow
{
Q_OBJECT
public:
tstMainWindow(QWidget *parent = 0);
~tstMainWindow(void);
private:
tstMainWindowPrivate *d;
};
#endif
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:38:08 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:38:11 2012 (+0200)
* Last-Updated: Wed May 16 09:46:37 2012 (+0200)
* By: Julien Wintz
* Update #: 2
* Update #: 4
*/
/* Commentary:
......@@ -20,6 +20,8 @@
#ifndef DTKVIEWLAYOUT_H
#define DTKVIEWLAYOUT_H
#include "dtkGuiExport.h"
#include <QtGui>
class dtkViewLayoutPrivate;
......@@ -36,4 +38,4 @@ private:
dtkViewLayoutPrivate *d;
};
#endif // DTKVIEWLAYOUT_H
#endif
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:38:35 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:38:39 2012 (+0200)
* Last-Updated: Wed May 16 09:46:54 2012 (+0200)
* By: Julien Wintz
* Update #: 2
* Update #: 3
*/
/* Commentary:
......@@ -20,7 +20,9 @@
#ifndef DTKVIEWLAYOUTITEM_H
#define DTKVIEWLAYOUTITEM_H
#include <QFrame>
#include "dtkGuiExport.h"
#include <QtGui/QFrame>
class dtkViewLayout;
class dtkViewLayoutItemPrivate;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:38:55 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:38:58 2012 (+0200)
* Last-Updated: Wed May 16 09:46:15 2012 (+0200)
* By: Julien Wintz
* Update #: 2
* Update #: 4
*/
/* Commentary:
......@@ -20,11 +20,13 @@
#ifndef DTKVIEWLIST_H
#define DTKVIEWLIST_H
#include "dtkGuiExport.h"
#include <QtGui>
class dtkViewListPrivate;
class dtkViewList : public QListWidget
class DTKGUI_EXPORT dtkViewList : public QListWidget
{
Q_OBJECT
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed May 16 09:37:32 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed May 16 09:37:36 2012 (+0200)
* Last-Updated: Wed May 16 09:45:54 2012 (+0200)
* By: Julien Wintz
* Update #: 2
* Update #: 7
*/
/* Commentary:
......@@ -20,11 +20,13 @@
#ifndef DTKVIEWMANAGER_H
#define DTKVIEWMANAGER_H
#include <QFrame>
#include "dtkGuiExport.h"
#include <QtGui/QFrame>
class dtkViewManagerPrivate;
class dtkViewManager : public QFrame
class DTKGUI_EXPORT dtkViewManager : public QFrame
{
Q_OBJECT
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment