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>
This commit is contained in:
Tomaz Canabrava 2014-05-30 14:50:49 -03:00 committed by Dirk Hohndel
parent 1c34c831a4
commit 4b520a8fbc
3 changed files with 23 additions and 8 deletions

View file

@ -20,7 +20,7 @@ int DivePictureModel::rowCount(const QModelIndex &parent) const
}
DivePictureView::DivePictureView(QWidget *parent): QListView(parent)
DivePictureWidget::DivePictureWidget(QWidget *parent): QListView(parent)
{
}

View file

@ -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 {

View file

@ -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>