Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
864e68a3
Commit
864e68a3
authored
Sep 30, 2009
by
schurade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] first commit for work on the GUI
parent
f04bf412
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
489 additions
and
172 deletions
+489
-172
.hgignore
.hgignore
+3
-1
src/gui/WGUI.h
src/gui/WGUI.h
+0
-9
src/gui/icons/WIcons.h
src/gui/icons/WIcons.h
+0
-1
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+57
-109
src/gui/qt4/WMainWindow.h
src/gui/qt4/WMainWindow.h
+15
-21
src/gui/qt4/WQtDatasetBrowser.cpp
src/gui/qt4/WQtDatasetBrowser.cpp
+76
-0
src/gui/qt4/WQtDatasetBrowser.h
src/gui/qt4/WQtDatasetBrowser.h
+81
-0
src/gui/qt4/WQtDatasetTreeItem.cpp
src/gui/qt4/WQtDatasetTreeItem.cpp
+34
-0
src/gui/qt4/WQtDatasetTreeItem.h
src/gui/qt4/WQtDatasetTreeItem.h
+42
-0
src/gui/qt4/WQtRibbonMenu.cpp
src/gui/qt4/WQtRibbonMenu.cpp
+87
-0
src/gui/qt4/WQtRibbonMenu.h
src/gui/qt4/WQtRibbonMenu.h
+22
-21
src/gui/qt4/WQtSubjectTreeItem.cpp
src/gui/qt4/WQtSubjectTreeItem.cpp
+13
-10
src/gui/qt4/WQtSubjectTreeItem.h
src/gui/qt4/WQtSubjectTreeItem.h
+49
-0
src/kernel/WKernel.cpp
src/kernel/WKernel.cpp
+5
-0
src/kernel/WKernel.h
src/kernel/WKernel.h
+5
-0
No files found.
.hgignore
View file @
864e68a3
...
...
@@ -23,4 +23,6 @@ syntax: glob
syntax: regexp
^Debug$
syntax: glob
.settings
\ No newline at end of file
.settings
syntax: glob
Release
\ No newline at end of file
src/gui/WGUI.h
View file @
864e68a3
...
...
@@ -39,15 +39,6 @@ public:
* Default destructor.
*/
virtual
~
WGUI
();
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabled
* \param enable true iff gui should be enabled
*/
virtual
void
setEnabled
(
bool
enable
)
=
0
;
};
/**
...
...
src/gui/icons/WIcons.h
View file @
864e68a3
...
...
@@ -28,7 +28,6 @@
/**
* This file is provided to allow to get access to all used icons by one include.
*/
#include "logoIcon.xpm"
#include "disc.xpm"
#include "fileopen.xpm"
#include "quit.xpm"
...
...
src/gui/qt4/WMainWindow.cpp
View file @
864e68a3
...
...
@@ -28,13 +28,19 @@
#include <QtGui/QDockWidget>
#include <QtGui/QFileDialog>
#include <QtGui/QSlider>
#include <QtGui/QVBoxLayout>
#include "WMainWindow.h"
#include "WQtGLWidget.h"
#include "WQtRibbonMenu.h"
#include "WQt
Pipeline
Browser.h"
#include "WQt
Dataset
Browser.h"
#include "../../kernel/WKernel.h"
#include "../icons/
WIcons.h
"
#include "../icons/
logoIcon.xpm
"
WMainWindow
::~
WMainWindow
()
{
...
...
@@ -42,149 +48,85 @@ WMainWindow::~WMainWindow()
m_glWidgets
.
clear
();
}
void
WMainWindow
::
addDockableGLWidget
(
QMainWindow
*
MainWindow
)
{
QDockWidget
*
dockWidget
=
new
QDockWidget
(
"Graphics Display"
);
dockWidget
->
setAllowedAreas
(
Qt
::
LeftDockWidgetArea
|
Qt
::
RightDockWidgetArea
);
boost
::
shared_ptr
<
WQtGLWidget
>
widget
=
boost
::
shared_ptr
<
WQtGLWidget
>
(
new
WQtGLWidget
(
dockWidget
)
);
// TODO(all): add some way to remove QtGLWidgets on destruction to delete QtGLWidget
m_glWidgets
.
push_back
(
widget
);
dockWidget
->
setWidget
(
widget
.
get
()
);
MainWindow
->
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
dockWidget
);
}
void
WMainWindow
::
connectSlots
(
QMainWindow
*
MainWindow
)
{
QObject
::
connect
(
m_
actionExit
,
SIGNAL
(
activat
ed
()
),
MainWindow
,
SLOT
(
close
()
)
);
QObject
::
connect
(
m_
actionLoad
,
SIGNAL
(
activat
ed
()
),
this
,
SLOT
(
load
()
)
);
QObject
::
connect
(
m_
toolBar
->
getQuitButton
(),
SIGNAL
(
press
ed
()
),
MainWindow
,
SLOT
(
close
()
)
);
QObject
::
connect
(
m_
toolBar
->
getLoadButton
(),
SIGNAL
(
press
ed
()
),
this
,
SLOT
(
load
()
)
);
QMetaObject
::
connectSlotsByName
(
MainWindow
);
}
void
WMainWindow
::
setupGUI
(
QMainWindow
*
MainWindow
)
{
QIcon
mainWindowIcon
;
QIcon
quitIcon
;
QIcon
saveIcon
;
QIcon
loadIcon
;
QIcon
aboutIcon
;
mainWindowIcon
.
addPixmap
(
QPixmap
(
logoIcon_xpm
)
);
quitIcon
.
addPixmap
(
QPixmap
(
quit_xpm
)
);
saveIcon
.
addPixmap
(
QPixmap
(
disc_xpm
)
);
loadIcon
.
addPixmap
(
QPixmap
(
fileopen_xpm
)
);
aboutIcon
.
addPixmap
(
QPixmap
(
logoIcon_xpm
)
);
m_mainWindowIcon
.
addPixmap
(
QPixmap
(
logoIcon_xpm
)
);
if
(
MainWindow
->
objectName
().
isEmpty
()
)
{
MainWindow
->
setObjectName
(
QString
::
fromUtf8
(
"MainWindow"
)
);
}
MainWindow
->
resize
(
946
,
632
);
MainWindow
->
setWindowIcon
(
mainWindowIcon
);
m_actionLoad
=
new
QAction
(
MainWindow
);
m_actionLoad
->
setObjectName
(
QString
::
fromUtf8
(
"actionLoad"
)
);
m_actionLoad
->
setIcon
(
loadIcon
);
m_actionLoad
->
setText
(
QApplication
::
translate
(
"MainWindow"
,
"Load"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionLoad
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+L"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionSave
=
new
QAction
(
MainWindow
);
m_actionSave
->
setObjectName
(
QString
::
fromUtf8
(
"actionSave"
)
);
m_actionSave
->
setIcon
(
saveIcon
);
m_actionSave
->
setText
(
QApplication
::
translate
(
"MainWindow"
,
"Save"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionPreferences
=
new
QAction
(
MainWindow
);
m_actionPreferences
->
setObjectName
(
QString
::
fromUtf8
(
"actionPreferences"
)
);
m_actionPreferences
->
setText
(
QApplication
::
translate
(
"MainWindow"
,
"Preferences"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionExit
=
new
QAction
(
MainWindow
);
m_actionExit
->
setObjectName
(
QString
::
fromUtf8
(
"actionExit"
)
);
m_actionExit
->
setIcon
(
quitIcon
);
m_actionExit
->
setText
(
QApplication
::
translate
(
"MainWindow"
,
"E&xit"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionExit
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+Q"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_actionAbout_OpenWalnut
=
new
QAction
(
MainWindow
);
m_actionAbout_OpenWalnut
->
setObjectName
(
QString
::
fromUtf8
(
"actionAbout_OpenWalnut"
)
);
m_actionAbout_OpenWalnut
->
setIcon
(
aboutIcon
);
m_actionAbout_OpenWalnut
->
setText
(
QApplication
::
translate
(
"MainWindow"
,
"About OpenWalnut"
,
0
,
QApplication
::
UnicodeUTF8
)
);
MainWindow
->
setWindowIcon
(
m_mainWindowIcon
);
m_centralwidget
=
new
QWidget
(
MainWindow
);
m_centralwidget
->
setObjectName
(
QString
::
fromUtf8
(
"centralwidget"
)
);
MainWindow
->
setCentralWidget
(
m_centralwidget
);
m_menubar
=
new
QMenuBar
(
MainWindow
);
m_menubar
->
setObjectName
(
QString
::
fromUtf8
(
"menubar"
)
);
m_menubar
->
setGeometry
(
QRect
(
0
,
0
,
946
,
24
)
);
m_menuFile
=
new
QMenu
(
m_menubar
);
m_menuFile
->
setObjectName
(
QString
::
fromUtf8
(
"menuFile"
)
);
m_menuHelp
=
new
QMenu
(
m_menubar
);
m_menuHelp
->
setObjectName
(
QString
::
fromUtf8
(
"menuHelp"
)
);
MainWindow
->
setMenuBar
(
m_menubar
);
m_toolBar
=
new
QToolBar
(
MainWindow
);
m_toolBar
->
setObjectName
(
QString
::
fromUtf8
(
"toolBar"
)
);
m_toolBar
->
addAction
(
m_actionSave
);
m_toolBar
->
addAction
(
m_actionLoad
);
m_toolBar
->
addSeparator
();
m_toolBar
->
addAction
(
m_actionAbout_OpenWalnut
);
m_toolBar
=
new
WQtRibbonMenu
(
MainWindow
);
MainWindow
->
addToolBar
(
Qt
::
TopToolBarArea
,
m_toolBar
);
m_statusBar
=
new
QStatusBar
(
MainWindow
);
m_statusBar
->
setObjectName
(
QString
::
fromUtf8
(
"statusBar"
)
);
m_statusBar
->
showMessage
(
"No status message yet."
);
MainWindow
->
setStatusBar
(
m_statusBar
);
m_menubar
->
addAction
(
m_menuFile
->
menuAction
()
);
m_menubar
->
addAction
(
m_menuHelp
->
menuAction
()
);
m_menuFile
->
addAction
(
m_actionLoad
);
m_menuFile
->
addAction
(
m_actionSave
);
m_menuFile
->
addSeparator
();
m_menuFile
->
addAction
(
m_actionPreferences
);
m_menuFile
->
addSeparator
();
m_menuFile
->
addAction
(
m_actionExit
);
m_menuFile
->
setTitle
(
QApplication
::
translate
(
"MainWindow"
,
"&File"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_menuHelp
->
addAction
(
m_actionAbout_OpenWalnut
);
m_menuHelp
->
setTitle
(
QApplication
::
translate
(
"MainWindow"
,
"&Help"
,
0
,
QApplication
::
UnicodeUTF8
)
);
boost
::
shared_ptr
<
WQtGLWidget
>
widget
=
boost
::
shared_ptr
<
WQtGLWidget
>
(
new
WQtGLWidget
(
MainWindow
)
);
m_glWidgets
.
push_back
(
widget
);
MainWindow
->
setCentralWidget
(
widget
.
get
()
);
// initially 3 views
add
DockableGLWidget
(
MainWindow
);
add
DockableGLWidget
(
MainWindow
);
add
DockableGLWidget
(
MainWindow
);
add
NavigationGLWidget
(
MainWindow
,
QString
(
"axial"
)
);
add
NavigationGLWidget
(
MainWindow
,
QString
(
"coronal"
)
);
add
NavigationGLWidget
(
MainWindow
,
QString
(
"sagittal"
)
);
m_pipelineBrowser
=
new
WQtPipelineBrowser
();
MainWindow
->
addDockWidget
(
Qt
::
RightDockWidgetArea
,
m_pipelineBrowser
);
m_datasetBrowser
=
new
WQtDatasetBrowser
();
MainWindow
->
addDockWidget
(
Qt
::
RightDockWidgetArea
,
m_datasetBrowser
);
m_datasetBrowser
->
addSubject
(
"subject1"
);
m_datasetBrowser
->
addDataset
(
0
,
"mr188_t1"
);
m_datasetBrowser
->
addDataset
(
0
,
"mr188_evec"
);
MainWindow
->
setWindowTitle
(
QApplication
::
translate
(
"MainWindow"
,
"OpenWalnut"
,
0
,
QApplication
::
UnicodeUTF8
)
);
m_toolBar
->
setWindowTitle
(
QApplication
::
translate
(
"MainWindow"
,
"toolBar"
,
0
,
QApplication
::
UnicodeUTF8
)
);
connectSlots
(
MainWindow
);
}
void
WMainWindow
::
setEnabled
(
bool
/* enable */
)
QSlider
*
WMainWindow
::
addNavigationGLWidget
(
QMainWindow
*
MainWindow
,
QString
title
)
{
// TODO(wiebel): implement here
QDockWidget
*
dockWidget
=
new
QDockWidget
(
title
);
dockWidget
->
setAllowedAreas
(
Qt
::
LeftDockWidgetArea
|
Qt
::
RightDockWidgetArea
);
dockWidget
->
setFeatures
(
QDockWidget
::
DockWidgetMovable
|
QDockWidget
::
DockWidgetFloatable
);
QSlider
*
slider
=
new
QSlider
(
Qt
::
Horizontal
);
QWidget
*
panel
=
new
QWidget
(
dockWidget
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
();
boost
::
shared_ptr
<
WQtGLWidget
>
widget
=
boost
::
shared_ptr
<
WQtGLWidget
>
(
new
WQtGLWidget
(
panel
)
);
// TODO(all): add some way to remove QtGLWidgets on destruction to delete QtGLWidget
m_glWidgets
.
push_back
(
widget
);
layout
->
addWidget
(
widget
.
get
()
);
layout
->
addWidget
(
slider
);
panel
->
setLayout
(
layout
);
dockWidget
->
setWidget
(
panel
);
MainWindow
->
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
dockWidget
);
return
slider
;
}
void
WMainWindow
::
load
()
{
std
::
cout
<<
"test output: load function"
<<
std
::
endl
;
...
...
@@ -214,3 +156,9 @@ void WMainWindow::load()
WKernel
::
getRunningKernel
()
->
doLoadDataSets
(
stdFileNames
);
}
WQtDatasetBrowser
*
WMainWindow
::
getDatasetBrowser
()
{
return
m_datasetBrowser
;
}
src/gui/qt4/WMainWindow.h
View file @
864e68a3
...
...
@@ -36,6 +36,8 @@
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QSlider>
#include <QtGui/QStatusBar>
#include <QtGui/QToolBar>
#include <QtGui/QWidget>
...
...
@@ -44,7 +46,8 @@
// forward declarations
class
WQtGLWidget
;
class
WQtPipelineBrowser
;
class
WQtDatasetBrowser
;
class
WQtRibbonMenu
;
/**
* This class contains the main window and the layout
...
...
@@ -63,44 +66,35 @@ public:
void
setupGUI
(
QMainWindow
*
MainWindow
);
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabeld
* \param enable true iff gui should be enabled
*/
void
setEnabled
(
bool
enable
);
/**
* Destructor.
*/
virtual
~
WMainWindow
();
/**
*
*/
WQtDatasetBrowser
*
getDatasetBrowser
();
private:
/**
* Helper routine for adding new docks with GL content
*/
void
addDockableGLWidget
(
QMainWindow
*
MainWindow
);
QSlider
*
addNavigationGLWidget
(
QMainWindow
*
MainWindow
,
QString
title
);
/**
* Connects some signals with some slots
*/
void
connectSlots
(
QMainWindow
*
MainWindow
);
QAction
*
m_actionLoad
;
QAction
*
m_actionSave
;
QAction
*
m_actionPreferences
;
QAction
*
m_actionExit
;
QAction
*
m_actionAbout_OpenWalnut
;
QIcon
m_mainWindowIcon
;
QWidget
*
m_centralwidget
;
QMenuBar
*
m_menubar
;
QMenu
*
m_menuFile
;
QMenu
*
m_menuHelp
;
QStatusBar
*
m_statusBar
;
QToolBar
*
m_toolBar
;
WQtRibbonMenu
*
m_toolBar
;
std
::
list
<
boost
::
shared_ptr
<
WQtGLWidget
>
>
m_glWidgets
;
WQt
PipelineBrowser
*
m_pipeline
Browser
;
WQt
DatasetBrowser
*
m_dataset
Browser
;
private
slots
:
...
...
src/gui/qt4/WQtDatasetBrowser.cpp
0 → 100644
View file @
864e68a3
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include <string>
#include "WQtDatasetBrowser.h"
WQtDatasetBrowser
::
WQtDatasetBrowser
(
QWidget
*
parent
)
:
QDockWidget
(
parent
)
{
m_panel
=
new
QWidget
(
this
);
m_treeWidget
=
new
QTreeWidget
(
m_panel
);
m_treeWidget
->
setHeaderLabel
(
QString
(
"Dataset Browser"
)
);
m_tabWidget
=
new
QTabWidget
(
m_panel
);
m_tab1
=
new
QWidget
();
m_tab2
=
new
QWidget
();
m_tab3
=
new
QWidget
();
m_tabWidget
->
addTab
(
m_tab1
,
QString
(
"tab1"
)
);
m_tabWidget
->
addTab
(
m_tab2
,
QString
(
"tab2"
)
);
m_tabWidget
->
addTab
(
m_tab3
,
QString
(
"tab3"
)
);
m_layout
=
new
QVBoxLayout
();
m_layout
->
addWidget
(
m_treeWidget
);
m_layout
->
addWidget
(
m_tabWidget
);
m_panel
->
setLayout
(
m_layout
);
this
->
setAllowedAreas
(
Qt
::
LeftDockWidgetArea
|
Qt
::
RightDockWidgetArea
);
this
->
setFeatures
(
QDockWidget
::
DockWidgetMovable
|
QDockWidget
::
DockWidgetFloatable
);
this
->
setWidget
(
m_panel
);
}
WQtDatasetBrowser
::~
WQtDatasetBrowser
()
{
}
WQtSubjectTreeItem
*
WQtDatasetBrowser
::
addSubject
(
std
::
string
name
)
{
WQtSubjectTreeItem
*
subject
=
new
WQtSubjectTreeItem
(
m_treeWidget
);
subject
->
setText
(
0
,
QString
(
name
.
c_str
()
)
);
return
subject
;
}
WQtDatasetTreeItem
*
WQtDatasetBrowser
::
addDataset
(
int
subjectId
,
std
::
string
name
)
{
WQtSubjectTreeItem
*
subject
=
(
WQtSubjectTreeItem
*
)
m_treeWidget
->
topLevelItem
(
subjectId
);
return
subject
->
addDatasetItem
(
name
);
}
src/gui/qt4/WQtDatasetBrowser.h
0 → 100644
View file @
864e68a3
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WQTDATASETBROWSER_H
#define WQTDATASETBROWSER_H
#include <string>
#include <QtGui/QDockWidget>
#include <QtGui/QTabWidget>
#include <QtGui/QTreeWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include "WQtSubjectTreeItem.h"
/**
* TODO(schurade): Document this!
*/
class
WQtDatasetBrowser
:
public
QDockWidget
{
public:
/**
* Default constructor.
*
* \param parent Parent widget.
*
* \return
*/
explicit
WQtDatasetBrowser
(
QWidget
*
parent
=
0
);
/**
* Destructor.
*/
virtual
~
WQtDatasetBrowser
();
/**
*
*/
WQtSubjectTreeItem
*
addSubject
(
std
::
string
name
);
/**
*
*/
WQtDatasetTreeItem
*
addDataset
(
int
subjectId
,
std
::
string
name
);
protected:
private:
QTreeWidget
*
m_treeWidget
;
QTabWidget
*
m_tabWidget
;
QWidget
*
m_tab1
;
QWidget
*
m_tab2
;
QWidget
*
m_tab3
;
QWidget
*
m_panel
;
QVBoxLayout
*
m_layout
;
};
#endif // WQTDATASETBROWSER_H
src/gui/qt4/WQtDatasetTreeItem.cpp
0 → 100644
View file @
864e68a3
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WQtDatasetTreeItem.h"
WQtDatasetTreeItem
::
WQtDatasetTreeItem
(
QTreeWidgetItem
*
parent
)
:
QTreeWidgetItem
(
parent
)
{
}
WQtDatasetTreeItem
::~
WQtDatasetTreeItem
()
{
}
src/gui/qt4/WQtDatasetTreeItem.h
0 → 100644
View file @
864e68a3
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WQTDATASETTREEITEM_H
#define WQTDATASETTREEITEM_H
#include <QtGui/QTreeWidgetItem>
/**
* TODO(schurade): Document this!
*/
class
WQtDatasetTreeItem
:
public
QTreeWidgetItem
{
public:
explicit
WQtDatasetTreeItem
(
QTreeWidgetItem
*
parent
);
virtual
~
WQtDatasetTreeItem
();
protected:
private:
};
#endif // WQTDATASETTREEITEM_H
src/gui/qt4/WQtRibbonMenu.cpp
0 → 100644
View file @
864e68a3
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include <QtGui/QPushButton>
#include <QtGui/QTabWidget>
#include <QtGui/QHBoxLayout>
#include "WQtRibbonMenu.h"
#include "../icons/WIcons.h"
WQtRibbonMenu
::
WQtRibbonMenu
(
QWidget
*
parent
)
:
QToolBar
(
parent
)
{
setup
();
}
WQtRibbonMenu
::~
WQtRibbonMenu
()
{
}
void
WQtRibbonMenu
::
setup
()
{
m_quitIcon
.
addPixmap
(
QPixmap
(
quit_xpm
)
);
m_saveIcon
.
addPixmap
(
QPixmap
(
disc_xpm
)
);
m_loadIcon
.
addPixmap
(
QPixmap
(
fileopen_xpm
)
);
QWidget
*
filePage
=
new
QWidget
();
QWidget
*
modulPage
=
new
QWidget
();
QWidget
*
helpPage
=
new
QWidget
();
m_loadButton
=
new
QPushButton
(
m_loadIcon
,
QString
(
"load"
)
);
m_saveButton
=
new
QPushButton
(
m_saveIcon
,
QString
(
"save"
)
);
m_quitButton
=
new
QPushButton
(
m_quitIcon
,
QString
(
"exit"
)
);
m_loadButton
->
setMaximumWidth
(
50
);
m_saveButton
->
setMaximumWidth
(
50
);
m_quitButton
->
setMaximumWidth
(
50
);
QHBoxLayout
*
filePageLayout
=
new
QHBoxLayout
();
filePageLayout
->
addWidget
(
m_loadButton
);
filePageLayout
->
addWidget
(
m_saveButton
);
filePageLayout
->
addWidget
(
m_quitButton
);
filePageLayout
->
addStretch
();
filePage
->
setLayout
(
filePageLayout
);
QTabWidget
*
menuTabWidget
=
new
QTabWidget
();
menuTabWidget
->
addTab
(
filePage
,
QString
(
"File"
)
);
menuTabWidget
->
addTab
(
modulPage
,
QString
(
"Modul"
)
);
menuTabWidget
->
addTab
(
helpPage
,
QString
(
"Help"
)
);
this
->
addWidget
(
menuTabWidget
);
this
->
setAllowedAreas
(
Qt
::
TopToolBarArea
|
Qt
::
BottomToolBarArea
);
}