From 9e5dd48bc63a3fda6de34f183d810bdb00288986 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 15 Feb 2015 01:00:37 +0100 Subject: [PATCH] Some test code to see if pool download is working --- src/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 469c3d8..024ebd7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -93,6 +94,7 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent) ctxt->setContextProperty("danbooruModel", m_model); ctxt->setContextProperty("danbooruService", m_service); m_view->setSource(QUrl::fromLocalFile(qmlViewPath)); + m_view->rootObject()->setProperty("poolMode", QVariant(false)); QVector boardsList = { QUrl("http://konachan.com"), QUrl("https://yande.re") }; @@ -151,6 +153,14 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent) } ); + connect(m_tableView, &QTableView::doubleClicked, [this](QModelIndex index) { + auto pool = m_poolModel->poolAt(index.row()); + m_model->clear(); + m_view->rootObject()->setProperty("poolMode", QVariant(true)); + m_service->getPool(pool->id()); + + }); + } DanbooruMainWindow::~DanbooruMainWindow()