aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp17
-rw-r--r--qt-ui/maintab.ui28
2 files changed, 32 insertions, 13 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index dff005774..fd760445b 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -186,6 +186,15 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.socialNetworks->setVisible(false);
#endif
+ ui.waitingSpinner->setRoundness(70.0);
+ ui.waitingSpinner->setMinimumTrailOpacity(15.0);
+ ui.waitingSpinner->setTrailFadePercentage(70.0);
+ ui.waitingSpinner->setNumberOfLines(8);
+ ui.waitingSpinner->setLineLength(5);
+ ui.waitingSpinner->setLineWidth(3);
+ ui.waitingSpinner->setInnerRadius(5);
+ ui.waitingSpinner->setRevolutionsPerSecond(1);
+
acceptingEdit = false;
}
@@ -202,12 +211,14 @@ MainTab::~MainTab()
void MainTab::enableGeoLoockupEdition()
{
- setEnabled(true);
+ ui.waitingSpinner->stop();
+ ui.manageDiveSite->show();
}
void MainTab::disableGeoLoockupEdition()
{
- setDisabled(true);
+ ui.waitingSpinner->start();
+ ui.manageDiveSite->hide();
}
void MainTab::prepareDiveSiteEdit() {
@@ -407,7 +418,7 @@ void MainTab::updateDiveInfo(bool clear)
// don't execute this while adding / planning a dive
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE || MainWindow::instance()->graphics()->isPlanner())
return;
- if (!isEnabled() && !clear && !ReverseGeoLoockupThread::instance()->isRunning())
+ if (!isEnabled() && !clear )
setEnabled(true);
if (isEnabled() && clear)
setEnabled(false);
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index bfa93b5b5..da8cabecb 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -22,8 +22,7 @@
<number>0</number>
</property>
<item row="2" column="1">
- <widget class="KMessageWidget" name="diveNotesMessage" native="true">
- </widget>
+ <widget class="KMessageWidget" name="diveNotesMessage" native="true"/>
</item>
<item row="3" column="1">
<widget class="QScrollArea" name="scrollArea">
@@ -41,8 +40,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>753</height>
+ <width>417</width>
+ <height>744</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -142,6 +141,9 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QtWaitingSpinner" name="waitingSpinner" native="true"/>
+ </item>
</layout>
</item>
<item>
@@ -385,8 +387,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>68</width>
- <height>40</height>
+ <width>98</width>
+ <height>55</height>
</rect>
</property>
<layout class="QGridLayout" name="equipmentTabScrollAreaLayout">
@@ -441,8 +443,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>363</height>
+ <width>330</width>
+ <height>334</height>
</rect>
</property>
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
@@ -758,8 +760,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>446</width>
- <height>215</height>
+ <width>328</width>
+ <height>208</height>
</rect>
</property>
<layout class="QGridLayout" name="statsScrollAreaLayout">
@@ -1009,6 +1011,12 @@
<extends>QListView</extends>
<header>divepicturewidget.h</header>
</customwidget>
+ <customwidget>
+ <class>QtWaitingSpinner</class>
+ <extends>QWidget</extends>
+ <header>qtwaitingspinner.h</header>
+ <container>1</container>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>dateEdit</tabstop>