diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelistview.cpp | 8 | ||||
-rw-r--r-- | qt-ui/divelistview.h | 1 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 6 | ||||
-rw-r--r-- | qt-ui/maintab.ui | 351 |
4 files changed, 183 insertions, 183 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index cbbf35152..d6f52c646 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -826,9 +826,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) popup.addAction(tr("Shift times"), this, SLOT(shiftTimes())); popup.addAction(tr("Load images"), this, SLOT(loadImages())); } - if (prefs.facebook.user_id) { - popup.addAction(tr("Publish on Facebook"), this, SLOT(publishFacebook())); - } // "collapse all" really closes all trips, // "collapse" keeps the trip with the selected dive open @@ -842,11 +839,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) event->accept(); } -void DiveListView::publishFacebook() -{ - FacebookManager *fb = FacebookManager::instance(); - fb->sendDive(1); -} void DiveListView::shiftTimes() { diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index c7f1ef775..a6522fa9a 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -51,7 +51,6 @@ slots: void renumberDives(); void shiftTimes(); void loadImages(); - void publishFacebook(); static QString lastUsedImageDir(); signals: diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index cd85418a8..6edc5fa8e 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -16,6 +16,7 @@ #include "qthelper.h" #include "display.h" #include "divepicturewidget.h" +#include "socialnetworks.h" #include <QLabel> #include <QCompleter> @@ -185,6 +186,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.photosView->addAction(deletePhoto); ui.photosView->setSelectionMode(QAbstractItemView::SingleSelection); connect(deletePhoto, SIGNAL(triggered(bool)), this, SLOT(removeSelectedPhotos())); + + FacebookManager *fb = FacebookManager::instance(); + connect(fb, &FacebookManager::justLoggedIn, ui.facebookPublish, &QPushButton::show); + connect(fb, &FacebookManager::justLoggedOut, ui.facebookPublish, &QPushButton::hide); + ui.facebookPublish->setVisible(fb->loggedIn()); } MainTab::~MainTab() diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index 3450224ac..9551ed511 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>690</width> - <height>720</height> + <width>443</width> + <height>815</height> </rect> </property> <property name="currentIndex"> @@ -37,34 +37,26 @@ <rect> <x>0</x> <y>0</y> - <width>670</width> - <height>649</height> + <width>421</width> + <height>751</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_2"> - <property name="leftMargin"> - <number>2</number> - </property> - <property name="topMargin"> - <number>1</number> - </property> - <property name="rightMargin"> - <number>2</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <property name="spacing"> - <number>2</number> - </property> - <item row="5" column="0"> - <widget class="QLabel" name="CoordinatedLabel"> + <item row="0" column="0"> + <widget class="QLabel" name="label_2"> <property name="text"> - <string>Coordinates</string> + <string>Date</string> </property> </widget> </item> - <item row="1" column="2"> + <item row="0" column="1"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Time</string> + </property> + </widget> + </item> + <item row="0" column="2"> <layout class="QHBoxLayout" name="temperatureLabels"> <item> <widget class="QLabel" name="airTempLabel"> @@ -82,14 +74,30 @@ </item> </layout> </item> - <item row="13" column="0"> - <widget class="QLabel" name="NotesLabel"> - <property name="text"> - <string>Notes</string> + <item row="1" column="0"> + <widget class="QDateEdit" name="dateEdit"> + <property name="calendarPopup"> + <bool>true</bool> + </property> + <property name="timeSpec"> + <enum>Qt::UTC</enum> </property> </widget> </item> - <item row="2" column="2"> + <item row="1" column="1"> + <widget class="QTimeEdit" name="timeEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="timeSpec"> + <enum>Qt::UTC</enum> + </property> + </widget> + </item> + <item row="1" column="2"> <layout class="QHBoxLayout" name="airWaterTempLayout"> <item> <widget class="QLineEdit" name="airtemp"> @@ -107,109 +115,49 @@ </item> </layout> </item> - <item row="4" column="0" colspan="3"> - <widget class="QLineEdit" name="location"> - <property name="readOnly"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="14" column="0" colspan="3"> - <widget class="QTextEdit" name="notes"> - <property name="readOnly"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="9" column="2"> - <widget class="QLabel" name="SuitLabel"> - <property name="text"> - <string>Suit</string> - </property> - </widget> - </item> - <item row="3" column="0"> + <item row="2" column="0"> <widget class="QLabel" name="LocationLabel"> <property name="text"> <string>Location</string> </property> </widget> </item> - <item row="8" column="2"> - <widget class="TagWidget" name="buddy"> - <property name="readOnly"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="7" column="2"> - <widget class="QLabel" name="BuddyLabel"> + <item row="4" column="0"> + <widget class="QLabel" name="CoordinatedLabel"> <property name="text"> - <string>Buddy</string> - </property> - </widget> - </item> - <item row="6" column="0" colspan="3"> - <widget class="QLineEdit" name="coordinates"> - <property name="readOnly"> - <bool>false</bool> + <string>Coordinates</string> </property> </widget> </item> - <item row="7" column="0"> + <item row="6" column="0"> <widget class="QLabel" name="DivemasterLabel"> <property name="text"> <string>Divemaster</string> </property> </widget> </item> - <item row="10" column="2"> - <widget class="QLineEdit" name="suit"> - <property name="readOnly"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="11" column="0"> - <widget class="QLabel" name="TagLabel"> + <item row="6" column="2"> + <widget class="QLabel" name="BuddyLabel"> <property name="text"> - <string>Tags</string> + <string>Buddy</string> </property> </widget> </item> - <item row="12" column="0" colspan="3"> - <widget class="TagWidget" name="tagWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <property name="lineWrapMode"> - <enum>QPlainTextEdit::NoWrap</enum> + <item row="7" column="0" colspan="2"> + <widget class="TagWidget" name="divemaster"> + <property name="readOnly"> + <bool>false</bool> </property> </widget> </item> - <item row="8" column="0" colspan="2"> - <widget class="TagWidget" name="divemaster"> + <item row="7" column="2"> + <widget class="TagWidget" name="buddy"> <property name="readOnly"> <bool>false</bool> </property> </widget> </item> - <item row="9" column="0" colspan="2"> + <item row="8" column="0" colspan="2"> <layout class="QHBoxLayout" name="ratingVisibilityLabels"> <item> <widget class="QLabel" name="RatingLabel"> @@ -239,7 +187,35 @@ </item> </layout> </item> - <item row="10" column="0" colspan="2"> + <item row="8" column="2"> + <widget class="QLabel" name="SuitLabel"> + <property name="text"> + <string>Suit</string> + </property> + </widget> + </item> + <item row="9" column="2"> + <widget class="QLineEdit" name="suit"> + <property name="readOnly"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="10" column="0"> + <widget class="QLabel" name="TagLabel"> + <property name="text"> + <string>Tags</string> + </property> + </widget> + </item> + <item row="12" column="0"> + <widget class="QLabel" name="NotesLabel"> + <property name="text"> + <string>Notes</string> + </property> + </widget> + </item> + <item row="9" column="0" colspan="2"> <layout class="QHBoxLayout" name="ratingVisibilityWidgets"> <item> <widget class="StarWidget" name="rating" native="true"> @@ -269,43 +245,104 @@ </item> </layout> </item> - <item row="1" column="1"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Time</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QTimeEdit" name="timeEdit"> + <item row="11" column="0" colspan="3"> + <widget class="TagWidget" name="tagWidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="timeSpec"> - <enum>Qt::UTC</enum> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="lineWrapMode"> + <enum>QPlainTextEdit::NoWrap</enum> </property> </widget> </item> - <item row="2" column="0"> - <widget class="QDateEdit" name="dateEdit"> - <property name="calendarPopup"> - <bool>true</bool> - </property> - <property name="timeSpec"> - <enum>Qt::UTC</enum> + <item row="3" column="0" colspan="3"> + <widget class="QLineEdit" name="location"> + <property name="readOnly"> + <bool>false</bool> </property> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Date</string> + <item row="5" column="0" colspan="3"> + <widget class="QLineEdit" name="coordinates"> + <property name="readOnly"> + <bool>false</bool> </property> </widget> </item> + <item row="13" column="0" colspan="3"> + <layout class="QHBoxLayout" name="horizontalLayout_16"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QTextEdit" name="notes"> + <property name="readOnly"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="socialNetworks" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="margin"> + <number>0</number> + </property> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="facebookPublish"> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../subsurface.qrc"> + <normaloff>:/facebook</normaloff>:/facebook</iconset> + </property> + <property name="iconSize"> + <size> + <width>32</width> + <height>32</height> + </size> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> </layout> </widget> </widget> @@ -336,21 +373,12 @@ <rect> <x>0</x> <y>0</y> - <width>100</width> - <height>30</height> + <width>421</width> + <height>751</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_5"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> + <property name="margin"> <number>0</number> </property> <property name="spacing"> @@ -362,16 +390,7 @@ <property name="spacing"> <number>0</number> </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> + <property name="margin"> <number>0</number> </property> <item> @@ -416,21 +435,12 @@ <rect> <x>0</x> <y>0</y> - <width>316</width> - <height>330</height> + <width>421</width> + <height>751</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_6"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> + <property name="margin"> <number>0</number> </property> <property name="spacing"> @@ -745,21 +755,12 @@ <rect> <x>0</x> <y>0</y> - <width>319</width> - <height>188</height> + <width>421</width> + <height>751</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_7"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> + <property name="margin"> <number>0</number> </property> <property name="spacing"> @@ -1024,6 +1025,8 @@ <tabstop>tagWidget</tabstop> <tabstop>notes</tabstop> </tabstops> - <resources/> + <resources> + <include location="../subsurface.qrc"/> + </resources> <connections/> </ui> |