From f427305bb038ab3af27fb8a1a17827732c3713f3 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 22 Aug 2011 16:31:05 +0200 Subject: 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. --- seriestreewidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'seriestreewidget.cpp') 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){ -- cgit v1.2.3-70-g09d2