From ba712c3b5420ed461b8b7a1fdd14849e622ae974 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 7 Apr 2013 15:20:43 -0700 Subject: Start creating the Qt UI This is based on several commits from Tomaz - mingled together and mildly extended by Dirk (mostly Makefile hacking). All Qt UI related stuff should eventually move into the qt-ui directory. So the Makefile rules for moc and uic have been adjusted accordingly. The MainWindow class has been moved into its own file in qt-ui (but just with a placeholder, the existing class has simply been ifdef'ed out in qt-gui.cpp for the moment). We still have a couple of Qt things in qt-gui.cpp in the main directory... all this needs to move into the qt-ui directory and be built with separate .h files. Right now we have the one-off Makefile rule to create the qt-gui.moc file from the qt-gui.cpp file. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 10 + qt-ui/maintab.h | 20 ++ qt-ui/maintab.ui | 810 ++++++++++++++++++++++++++++++++++++++++++++++++ qt-ui/mainwindow.cpp | 11 + qt-ui/mainwindow.h | 24 ++ qt-ui/mainwindow.ui | 297 ++++++++++++++++++ qt-ui/plotareascene.cpp | 0 qt-ui/plotareascene.h | 0 8 files changed, 1172 insertions(+) create mode 100644 qt-ui/maintab.cpp create mode 100644 qt-ui/maintab.h create mode 100644 qt-ui/maintab.ui create mode 100644 qt-ui/mainwindow.cpp create mode 100644 qt-ui/mainwindow.h create mode 100644 qt-ui/mainwindow.ui create mode 100644 qt-ui/plotareascene.cpp create mode 100644 qt-ui/plotareascene.h (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp new file mode 100644 index 000000000..4569958c8 --- /dev/null +++ b/qt-ui/maintab.cpp @@ -0,0 +1,10 @@ +#include "maintab.h" +#include "ui_maintab.h" + +MainTab::MainTab(QWidget *parent) : QTabWidget(parent), + ui(new Ui::MainTab()) +{ + ui->setupUi(this); +} + +#include "maintab.moc" diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h new file mode 100644 index 000000000..40904ab12 --- /dev/null +++ b/qt-ui/maintab.h @@ -0,0 +1,20 @@ +#ifndef MAINTAB_H +#define MAINTAB_H + +#include + +namespace Ui +{ + class MainTab; +} + +class MainTab : public QTabWidget +{ + Q_OBJECT +public: + MainTab(QWidget *parent); +private: + Ui::MainTab *ui; +}; + +#endif \ No newline at end of file diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui new file mode 100644 index 000000000..a0aec4358 --- /dev/null +++ b/qt-ui/maintab.ui @@ -0,0 +1,810 @@ + + + MainTab + + + + 0 + 0 + 400 + 320 + + + + TabWidget + + + 0 + + + + Dive Info + + + + + + + + + 75 + true + + + + SAC: + + + + + + + + 75 + true + + + + OTU: + + + + + + + + 75 + true + + + + 0²/He: + + + + + + + + 75 + true + + + + Gas Used: + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + + 10 + + + + + + 75 + true + + + + Dive Time: + + + + + + + + 75 + true + + + + Surf Interv: + + + + + + + + 75 + true + + + + Avg Depth: + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Air Press: + + + + + + + + 75 + true + + + + Max Depth: + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Air Temp: + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Visibility: + + + + + + + + 75 + true + + + + Water Temp: + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Date: + + + + + + + + + Qt::Vertical + + + + 20 + 112 + + + + + + + + + Dive Notes + + + + + + Location + + + + + + + + + + Divemaster + + + + + + + Buddy + + + + + + + + + + + + + Rating + + + + + + + Suit + + + + + + + + + + + + + Notes + + + + + + + + + + + Equipment + + + + + + Qt::Vertical + + + + Cylinders + + + + + + + + + + + Edit + + + + + + + Add + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Delete + + + + + + + + + + Weight + + + + + + + + + + + Edit + + + + + + + Add + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Delete + + + + + + + + + + + + + + Stats + + + + + + 10 + + + + + + 75 + true + + + + Max Depth + + + + + + + + 75 + true + + + + Min Depth + + + + + + + + 75 + true + + + + Avg Depth + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Max SAC + + + + + + + + 75 + true + + + + Min SAC + + + + + + + + 75 + true + + + + Avg SAC + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + + 10 + + + 0 + + + + + + 75 + true + + + + Dives + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + + 75 + true + + + + Max Temp + + + + + + + + 75 + true + + + + Min Temp + + + + + + + + 75 + true + + + + Avg Temp + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + 75 + true + + + + Total Time + + + + + + + + 75 + true + + + + Avg Time + + + + + + + + 75 + true + + + + Longest Dive + + + + + + + + 75 + true + + + + Shortest Dive + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + + + Qt::Vertical + + + + 20 + 85 + + + + + + + + + + diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp new file mode 100644 index 000000000..851d1aa1c --- /dev/null +++ b/qt-ui/mainwindow.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include + +MainWindow::MainWindow() : ui(new Ui::MainWindow()) +{ + ui->setupUi(this); +} + +#include "mainwindow.moc" diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h new file mode 100644 index 000000000..9e15e58b4 --- /dev/null +++ b/qt-ui/mainwindow.h @@ -0,0 +1,24 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui +{ + class MainWindow; +} + +class DiveInfo; +class DiveNotes; +class Stats; +class Equipment; + +class MainWindow : public QMainWindow{ + Q_OBJECT +public: + MainWindow(); +private: + Ui::MainWindow *ui; +}; + +#endif \ No newline at end of file diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui new file mode 100644 index 000000000..b99d10222 --- /dev/null +++ b/qt-ui/mainwindow.ui @@ -0,0 +1,297 @@ + + + MainWindow + + + + 0 + 0 + 763 + 548 + + + + MainWindow + + + + + + + Qt::Vertical + + + + Qt::Horizontal + + + + + + + + + + + Qt::Horizontal + + + + + + + + + 0 + 0 + 763 + 19 + + + + + File + + + + + + + + + + + + + + + + + + + Log + + + + + + + + + + + + + + + View + + + + + + + + + + + Filter + + + + + + Planner + + + + + + Help + + + + + + + + + + + + + + New + + + Ctrl+N + + + + + Open + + + Ctrl+O + + + + + Save + + + Ctrl+S + + + + + Save as + + + Ctrl+Shift+S + + + + + Close + + + Ctrl+W + + + + + Import Files + + + Ctrl+I + + + + + Export UDDF + + + + + Print + + + Ctrl+P + + + + + Preferences + + + + + Quit + + + Ctrl+Q + + + + + Download from Dive computer + + + + + Download from Web Service + + + + + Edit Device Names + + + + + Add Dive + + + + + Renumber + + + + + Auto Group + + + + + Toggle Zoom + + + + + Yearly Statistics + + + + + List + + + + + Profile + + + + + Info + + + + + Tree + + + + + Prev DC + + + + + Next DC + + + + + Select Events + + + + + Input Plan + + + + + About Subsurface + + + + + User Manual + + + + + + MainTab + QWidget +
maintab.h
+ 1 +
+
+ + +
diff --git a/qt-ui/plotareascene.cpp b/qt-ui/plotareascene.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/qt-ui/plotareascene.h b/qt-ui/plotareascene.h new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3-70-g09d2