summaryrefslogtreecommitdiffstats
path: root/seriestreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2011-08-22 16:31:05 +0200
committerArno <am@disconnect.de>2011-08-22 16:31:05 +0200
commitf427305bb038ab3af27fb8a1a17827732c3713f3 (patch)
treee1f505f9ce23aeaecedb7a3815e35c37ca06ffc8 /seriestreewidget.cpp
parent6ccb1884dd9e9a57f7b25239097951d77103d331 (diff)
downloadSheMov-f427305bb038ab3af27fb8a1a17827732c3713f3.tar.gz
SheMov-f427305bb038ab3af27fb8a1a17827732c3713f3.tar.bz2
SheMov-f427305bb038ab3af27fb8a1a17827732c3713f3.zip
First draft of PropertiesDialog
Kinda mock-up of new PropertiesDialog. The caption label works, though for some reason I can't set a background image via Stylesheets. It also shows the files belonging to the SeriesPart.
Diffstat (limited to 'seriestreewidget.cpp')
-rw-r--r--seriestreewidget.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/seriestreewidget.cpp b/seriestreewidget.cpp
index 17b9a90..7259157 100644
--- a/seriestreewidget.cpp
+++ b/seriestreewidget.cpp
@@ -44,6 +44,7 @@
#include "filestreemodel.h"
#include "helper.h"
#include "hoverwindow.h"
+#include "propertiesdialog.h"
SeriesTreeWidget::SeriesTreeWidget(QWidget *parent) : QWidget(parent){
//filter bar
@@ -349,9 +350,14 @@ void SeriesTreeWidget::expandItems(const QStringList &items){
void SeriesTreeWidget::editItem(){
QModelIndex current = mView->selectionModel()->currentIndex();
- QModelIndex real = mProxy->mapToSource(current);
+ if(current.data(SeriesTreeModel::TypeRole).toInt() == SeriesTreeModel::Part){
+ PropertiesDialog dlg(this);
+ dlg.populate(current.data(SeriesTreeModel::SeriesPartIdRole).toInt());
+ dlg.exec();
+ }
+ /*QModelIndex real = mProxy->mapToSource(current);
EditSeriesDialog dlg(real, this);
- dlg.exec();
+ dlg.exec();*/
}
void SeriesTreeWidget::producerFinished(QStringListModel *model){