Some test code to see if pool download is working
This commit is contained in:
		
					parent
					
						
							
								21360fbe2f
							
						
					
				
			
			
				commit
				
					
						9e5dd48bc6
					
				
			
		
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -28,6 +28,7 @@
 | 
			
		|||
#include <QUrl>
 | 
			
		||||
#include <QDebug>
 | 
			
		||||
#include <QDockWidget>
 | 
			
		||||
#include <QQuickItem>
 | 
			
		||||
 | 
			
		||||
#include <kactioncollection.h>
 | 
			
		||||
#include <KStandardAction>
 | 
			
		||||
| 
						 | 
				
			
			@ -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<QUrl> 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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue