Skip to content
Snippets Groups Projects
Commit fe37e887 authored by Oliver Bock's avatar Oliver Bock
Browse files

Initial steps taken

* First rough GUI layout
* Added widget for OpenGL context
* Using dedicated working directories
* Adjusted .gitignore
parent bae697e3
No related branches found
No related tags found
No related merge requests found
# patterns
*~
ui_*.h
# files
.project
......@@ -10,5 +9,7 @@ PulsatingScience
# folders
debug/
release/
\ No newline at end of file
.moc/
.ui/
.rcc/
.obj/
\ No newline at end of file
......@@ -22,8 +22,14 @@ TARGET = PulsatingScience
QT += core \
gui \
opengl
HEADERS += src/pulsatingscience.h
SOURCES += src/pulsatingscience.cpp \
HEADERS += src/pulsaranimationwidget.h \
src/pulsatingscience.h
SOURCES += src/pulsaranimationwidget.cpp \
src/pulsatingscience.cpp \
src/main.cpp
FORMS += src/pulsatingscience.ui
RESOURCES += src/pulsatingscience.qrc
UI_DIR = src/.ui
RCC_DIR = src/.rcc
MOC_DIR = src/.moc
OBJECTS_DIR = src/.obj
\ No newline at end of file
/******************************************************************************
* Copyright (C) 2008 by Oliver Bock *
* oliver.bock[AT]aei.mpg.de *
* *
* This file is part of PulsatingScience. *
* *
* PulsatingScience 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, version 3 of the License. *
* *
* PulsatingScience 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 PulsatingScience. If not, see <http://www.gnu.org/licenses/>. *
* *
******************************************************************************/
#include "pulsaranimationwidget.h"
PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : QGLWidget(parent)
{
}
PulsarAnimationWidget::~PulsarAnimationWidget()
{
}
void PulsarAnimationWidget::initializeGL()
{
}
void PulsarAnimationWidget::resizeGL(int w, int h)
{
}
void PulsarAnimationWidget::paintGL() {
}
/******************************************************************************
* Copyright (C) 2008 by Oliver Bock *
* oliver.bock[AT]aei.mpg.de *
* *
* This file is part of PulsatingScience. *
* *
* PulsatingScience 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, version 3 of the License. *
* *
* PulsatingScience 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 PulsatingScience. If not, see <http://www.gnu.org/licenses/>. *
* *
******************************************************************************/
#ifndef PULSARANIMATIONWIDGET_H_
#define PULSARANIMATIONWIDGET_H_
#include <QGLWidget>
class PulsarAnimationWidget : public QGLWidget
{
Q_OBJECT
public:
PulsarAnimationWidget(QWidget *parent);
virtual ~PulsarAnimationWidget();
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
};
#endif /* PULSARANIMATIONWIDGET_H_ */
......@@ -23,6 +23,7 @@
PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
ui.menuView->addAction(ui.dockAnimControl->toggleViewAction());
}
PulsatingScience::~PulsatingScience()
......
<RCC>
<qresource prefix="icons" >
<file>resources/control-pause.png</file>
<file>resources/control-quit.png</file>
<file>resources/control-run.png</file>
<file>resources/control-stop.png</file>
<file>resources/help-about.png</file>
<file>resources/help-help.png</file>
<file>resources/help-website.png</file>
<file>resources/aei-icon48.png</file>
</qresource>
</RCC>
......@@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<width>550</width>
<height>600</height>
</rect>
</property>
......@@ -16,21 +16,178 @@
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/aei-icon48.png</normaloff>:/icons/resources/aei-icon48.png</iconset>
</property>
<widget class="QWidget" name="centralwidget" />
<widget class="QMenuBar" name="menubar" >
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="PulsarAnimationWidget" native="1" name="widget" />
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar" />
<widget class="QDockWidget" name="dockAnimControl" >
<property name="features" >
<set>QDockWidget::AllDockWidgetFeatures</set>
</property>
<property name="windowTitle" >
<string>Animation Control</string>
</property>
<attribute name="dockWidgetArea" >
<number>8</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents" >
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Spin Frequency:</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sliderSpinFrequency" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLCDNumber" name="lcdSpinFrequency" />
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<width>550</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuView" >
<property name="title" >
<string>View</string>
</property>
</widget>
<widget class="QStatusBar" name="statusbar" />
<widget class="QMenu" name="menuHelp" >
<property name="title" >
<string>Help</string>
</property>
<addaction name="actionHelp" />
<addaction name="actionWebsite" />
<addaction name="separator" />
<addaction name="actionAbout" />
</widget>
<widget class="QMenu" name="menuControl" >
<property name="title" >
<string>Control</string>
</property>
<addaction name="actionRun" />
<addaction name="actionPause" />
<addaction name="actionStop" />
<addaction name="separator" />
<addaction name="actionQuit" />
</widget>
<addaction name="menuControl" />
<addaction name="menuView" />
<addaction name="menuHelp" />
</widget>
<action name="actionWebsite" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/help-website.png</normaloff>:/icons/resources/help-website.png</iconset>
</property>
<property name="text" >
<string>Website</string>
</property>
</action>
<action name="actionAbout" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/help-about.png</normaloff>:/icons/resources/help-about.png</iconset>
</property>
<property name="text" >
<string>About</string>
</property>
</action>
<action name="actionQuit" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/control-quit.png</normaloff>:/icons/resources/control-quit.png</iconset>
</property>
<property name="text" >
<string>Quit</string>
</property>
</action>
<action name="actionRun" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/control-run.png</normaloff>:/icons/resources/control-run.png</iconset>
</property>
<property name="text" >
<string>Run</string>
</property>
</action>
<action name="actionStop" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/control-stop.png</normaloff>:/icons/resources/control-stop.png</iconset>
</property>
<property name="text" >
<string>Stop</string>
</property>
</action>
<action name="actionPause" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/control-pause.png</normaloff>:/icons/resources/control-pause.png</iconset>
</property>
<property name="text" >
<string>Pause</string>
</property>
</action>
<action name="actionHelp" >
<property name="icon" >
<iconset resource="pulsatingscience.qrc" >
<normaloff>:/icons/resources/help-help.png</normaloff>:/icons/resources/help-help.png</iconset>
</property>
<property name="text" >
<string>Help</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>PulsarAnimationWidget</class>
<extends>QWidget</extends>
<header>src/pulsaranimationwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="pulsatingscience.qrc" />
</resources>
<connections/>
<connections>
<connection>
<sender>actionQuit</sender>
<signal>activated()</signal>
<receiver>PulsatingScienceClass</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>274</x>
<y>299</y>
</hint>
</hints>
</connection>
</connections>
</ui>
src/resources/control-pause.png

248 B

src/resources/control-quit.png

2.3 KiB

src/resources/control-run.png

328 B

src/resources/control-stop.png

204 B

src/resources/help-about.png

1.4 KiB

src/resources/help-help.png

2.4 KiB

src/resources/help-website.png

2.43 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment