summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-30 14:50:49 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-01 15:54:29 -0700
commit4b520a8fbc08136d2050fc39b80766725f650fac (patch)
treea9ea5d863ecacc4c76062d3a916bf5eb69dc5470 /qt-ui
parent1c34c831a4bd51a94d953828ea08ab0db3373049 (diff)
downloadsubsurface-4b520a8fbc08136d2050fc39b80766725f650fac.tar.gz
Add a new widget on the main tab: Pictures.
Currently this does nothing, but since "dive photos" can also mean photos that were taken during the trip to the dive, some of them will not be visible on the profile. this currently shows nothing, because I didn't work out the Model bits yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divepicturewidget.cpp2
-rw-r--r--qt-ui/divepicturewidget.h4
-rw-r--r--qt-ui/maintab.ui25
3 files changed, 23 insertions, 8 deletions
diff --git a/qt-ui/divepicturewidget.cpp b/qt-ui/divepicturewidget.cpp
index aea415725..a74bba0e6 100644
--- a/qt-ui/divepicturewidget.cpp
+++ b/qt-ui/divepicturewidget.cpp
@@ -20,7 +20,7 @@ int DivePictureModel::rowCount(const QModelIndex &parent) const
}
-DivePictureView::DivePictureView(QWidget *parent): QListView(parent)
+DivePictureWidget::DivePictureWidget(QWidget *parent): QListView(parent)
{
}
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index 260d3caa7..7761db32b 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -16,10 +16,10 @@ class DivePictureDelegate : QStyledItemDelegate {
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
};
-class DivePictureView : public QListView{
+class DivePictureWidget : public QListView{
Q_OBJECT
public:
- DivePictureView(QWidget *parent);
+ DivePictureWidget(QWidget *parent);
};
class DivePictureThumbnailThread : public QThread {
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 276c7922f..31ed1309d 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -38,7 +38,7 @@
<x>0</x>
<y>0</y>
<width>662</width>
- <height>644</height>
+ <height>649</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@@ -157,7 +157,7 @@
</widget>
</item>
<item row="8" column="1">
- <widget class="TagWidget" name="buddy">
+ <widget class="TagWidget" name="buddy">
<property name="readOnly">
<bool>false</bool>
</property>
@@ -290,7 +290,7 @@
<x>0</x>
<y>0</y>
<width>662</width>
- <height>644</height>
+ <height>649</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_5">
@@ -370,7 +370,7 @@
<x>0</x>
<y>0</y>
<width>662</width>
- <height>644</height>
+ <height>649</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_6">
@@ -680,7 +680,7 @@
<x>0</x>
<y>0</y>
<width>662</width>
- <height>644</height>
+ <height>649</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_7">
@@ -813,6 +813,16 @@
</item>
</layout>
</widget>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Photos</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="DivePictureWidget" name="listView"/>
+ </item>
+ </layout>
+ </widget>
</widget>
<customwidgets>
<customwidget>
@@ -844,6 +854,11 @@
<extends>QPlainTextEdit</extends>
<header>qt-ui/tagwidget.h</header>
</customwidget>
+ <customwidget>
+ <class>DivePictureWidget</class>
+ <extends>QListView</extends>
+ <header>divepicturewidget.h</header>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>