aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.ui364
-rw-r--r--qt-ui/mainwindow.cpp7
2 files changed, 188 insertions, 183 deletions
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 0f46d91a5..7edbf5837 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -14,8 +14,185 @@
<string>TabWidget</string>
</property>
<property name="currentIndex">
- <number>2</number>
+ <number>0</number>
</property>
+ <widget class="QWidget" name="notesTab">
+ <attribute name="title">
+ <string>Dive Notes</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Location</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QLineEdit" name="location"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Divemaster</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Buddy</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLineEdit" name="divemaster"/>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="buddy"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>Rating</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="label_19">
+ <property name="text">
+ <string>Suit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="suit"/>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Notes</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0" colspan="2">
+ <widget class="QTextEdit" name="notes"/>
+ </item>
+ <item row="5" column="0">
+ <widget class="StarWidget" name="widget" native="true"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="equipmentTab">
+ <attribute name="title">
+ <string>Equipment</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <widget class="QSplitter" name="splitter_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Cylinders</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QTableView" name="cylinders"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="editCylinder">
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addCylinder">
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="delCylinder">
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>Weight</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QTableView" name="weights"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="pushButton_4">
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton_5">
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton_6">
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
<widget class="QWidget" name="infoTab">
<attribute name="title">
<string>Dive Info</string>
@@ -307,183 +484,6 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="notesTab">
- <attribute name="title">
- <string>Dive Notes</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Location</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" colspan="2">
- <widget class="QLineEdit" name="location"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Divemaster</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Buddy</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLineEdit" name="divemaster"/>
- </item>
- <item row="3" column="1">
- <widget class="QLineEdit" name="buddy"/>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>Rating</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QLabel" name="label_19">
- <property name="text">
- <string>Suit</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLineEdit" name="ratting"/>
- </item>
- <item row="5" column="1">
- <widget class="QLineEdit" name="suit"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Notes</string>
- </property>
- </widget>
- </item>
- <item row="7" column="0" colspan="2">
- <widget class="QTextEdit" name="notes"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="equipmentTab">
- <attribute name="title">
- <string>Equipment</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="0" column="0">
- <widget class="QSplitter" name="splitter_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Cylinders</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QTableView" name="cylinders"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QPushButton" name="editCylinder">
- <property name="text">
- <string>Edit</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="addCylinder">
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="delCylinder">
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Weight</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QTableView" name="weights"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QPushButton" name="pushButton_4">
- <property name="text">
- <string>Edit</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_5">
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_6">
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
<widget class="QWidget" name="statisticsTab">
<attribute name="title">
<string>Stats</string>
@@ -805,6 +805,14 @@
</layout>
</widget>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>StarWidget</class>
+ <extends>QWidget</extends>
+ <header>starwidget.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index adfb3c74a..b0b56a4e7 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -26,12 +26,9 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()),
{
ui->setupUi(this);
ui->ListWidget->setModel(model);
- this->setWindowIcon(QIcon(":subsurface-icon"));
+ setWindowIcon(QIcon(":subsurface-icon"));
// Just to test the star widgets, can be safely removed.
- StarWidget *star = new StarWidget(0);
- star->setMaximumStars(10);
- star->setCurrentStars(3);
- star->show();
+
}
void MainWindow::on_actionNew_triggered()