From 1fc4fba69fed8607d9b961086a88bcf362a482a5 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 4 Apr 2017 19:21:30 +0200 Subject: Break down MainTab into smaller classes Maintab is one of our most complex classes, and it's something I'm not actually proud of. But it currently works and the idea of splitting it was in my head for quite a while. This is the third or fourth tentative of splitting it, and this time I let the most complex part of it untouched, the Notes and Equipment tab are way too complex to untangle right now on my limited time. A new class 'TabBase' should be used for any new tab that we may create, and added on the MainTab (see the new lines on the MainTab constructor). Also, Extra Info, Information, Photos and Statistics where ported to this new way helping reduce the number of lines and functions on the MainTab quite a bit. Overall this is a step in the right direction for the future. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- desktop-widgets/maintab.ui | 1287 -------------------------------------------- 1 file changed, 1287 deletions(-) delete mode 100644 desktop-widgets/maintab.ui (limited to 'desktop-widgets/maintab.ui') diff --git a/desktop-widgets/maintab.ui b/desktop-widgets/maintab.ui deleted file mode 100644 index 4a6ed9807..000000000 --- a/desktop-widgets/maintab.ui +++ /dev/null @@ -1,1287 +0,0 @@ - - - MainTab - - - - 0 - 0 - 463 - 815 - - - - 0 - - - - Notes - - - General notes about the current selection - - - - 5 - - - 5 - - - 5 - - - 5 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - true - - - - - 0 - 0 - 445 - 726 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 5 - - - 5 - - - 8 - - - 0 - - - - - Duration - - - - - - - Date - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - Time - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - Air temp. - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - Water temp. - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - true - - - Qt::UTC - - - - - - - - 0 - 0 - - - - Qt::UTC - - - - - - - false - - - - - - - false - - - - - - - Depth - - - - - - - - - - - - - - - 0 - - - 5 - - - 5 - - - - - - - Location - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - - - Qt::RichText - - - - - - - - - 2 - - - - - - - - Edit dive site - - - ... - - - - :/geocode:/geocode - - - - - - - - - - - - - - - - - 5 - - - 5 - - - 5 - - - 0 - - - - - Divemaster - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - Buddy - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - false - - - - - - - false - - - - - - - - - 5 - - - 5 - - - 5 - - - 0 - - - - - - 0 - 0 - - - - Rating - - - - - - - - 0 - 0 - - - - Visibility - - - - - - - Suit - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - - - - - - 0 - 0 - - - - false - - - - - - - - - 5 - - - 0 - - - - - - - - Tags - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - Dive mode - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QPlainTextEdit::NoWrap - - - - - - - - - 0 - - - - - Notes - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - 0 - - - - - false - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - Equipment - - - Used equipment in the current selection - - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - true - - - - - 0 - 0 - 445 - 754 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 2 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - - - - - - - - - - - - - - - Info - - - Dive information - - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - true - - - - - 0 - 0 - 287 - 320 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 2 - - - - - Date - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Interval - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Gases used - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Gas consumed - - - - - - - - - Qt::AlignCenter - - - - - - - - - - SAC - - - - - - - - - Qt::AlignCenter - - - - - - - - - - CNS - - - - - - - - - Qt::AlignCenter - - - - - - - - - - OTU - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Max. depth - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Avg. depth - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Air pressure - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Air temp. - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Water temp. - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Dive time - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Salinity - - - - - - Qt::AlignCenter - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - - - - - Stats - - - Simple statistics about the selection - - - - 5 - - - 5 - - - 5 - - - 5 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - true - - - - - 0 - 0 - 297 - 187 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Depth - - - - - - - - - - - - Duration - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Temperature - - - - - - - - - - - - Total time - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Dives - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - SAC - - - - - - - - - - - - Gas consumption - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - Photos - - - All photos from the current selection - - - - 5 - - - 5 - - - 5 - - - 5 - - - - - QListView::IconMode - - - - - - - - Extra data - - - Adittional data from the dive computer - - - - 0 - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - - - - - KMessageWidget - QFrame -
desktop-widgets/kmessagewidget.h
- 1 -
- - StarWidget - QWidget -
desktop-widgets/starwidget.h
- 1 -
- - MinMaxAvgWidget - QWidget -
desktop-widgets/simplewidgets.h
- 1 -
- - TableView - QWidget -
desktop-widgets/tableview.h
- 1 -
- - TagWidget - QPlainTextEdit -
desktop-widgets/tagwidget.h
-
- - DivePictureWidget - QListView -
desktop-widgets/divepicturewidget.h
-
- - QtWaitingSpinner - QWidget -
desktop-widgets/qtwaitingspinner.h
- 1 -
- - DiveLocationLineEdit - QLineEdit -
desktop-widgets/locationinformation.h
-
-
- - dateEdit - timeEdit - airtemp - watertemp - divemaster - buddy - rating - visibility - suit - notes - - - - - -
-- cgit v1.2.3-70-g09d2