From b05ba203beebc2b262d14a8ede57aacbf1e796c2 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 8 Feb 2015 10:16:36 +0100 Subject: [PATCH] Those are unneeded now --- src/danbooruclientview.cpp | 83 -------------------------------------- src/danbooruclientview.h | 78 ----------------------------------- 2 files changed, 161 deletions(-) delete mode 100644 src/danbooruclientview.cpp delete mode 100644 src/danbooruclientview.h diff --git a/src/danbooruclientview.cpp b/src/danbooruclientview.cpp deleted file mode 100644 index f76adcb..0000000 --- a/src/danbooruclientview.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2014 Luca Beltrame - * - * This file is part of Danbooru Client. - * - * Danbooru Client is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version version of the License, or - * (at your option) any later version. - * - * Danbooru Client is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Danbooru Client. If not, see . - */ - -#include "danbooruclientview.h" - -// Own - -#include "model/danboorupostmodel.h" -#include "model/danboorupostdelegate.h" - -// Qt - - -// KDE - -#include - -namespace Danbooru -{ - -DanbooruClientView::DanbooruClientView(QWidget *parent): QWidget(parent), - m_model(new DanbooruPostModel(this)), - m_delegate(0), - m_service(0), - m_timer(0) -{ - setupUi(this); - - m_delegate = new DanbooruPostDelegate(m_listView); - - m_listView->setFlow(QListView::LeftToRight); - m_listView->setResizeMode(QListView::Adjust); - m_listView->setWrapping(true); - m_listView->setViewMode(QListView::IconMode); - m_listView->setGridSize(QSize(256, 256)); - - m_listView->setModel(m_model); - m_listView->setItemDelegate(m_delegate); - - // signal-slot connections - - connect(m_delegate, &DanbooruPostDelegate::postDownloadRequested, this, &DanbooruClientView::slotHandleDownload); - connect(m_delegate, &DanbooruPostDelegate::postViewRequested, this, &DanbooruClientView::slotHandleView); -// connect(m_listView, SIGNAL(clicked(QModelIndex)), parent(), -// SLOT(displayInfo(QModelIndex)); - -} - -DanbooruClientView::~DanbooruClientView() -{ - -} - -void DanbooruClientView::slotHandleDownload(QUrl url) -{ - // TODO - Q_UNUSED(url) -} - -void DanbooruClientView::slotHandleView(QUrl url) -{ - KRun *runViewer = new KRun(url, this /*window*/, true /*showProgressInfo*/, - "" /*asn*/); - runViewer->setAutoDelete(true); -} - -} // namespace Danbooru diff --git a/src/danbooruclientview.h b/src/danbooruclientview.h deleted file mode 100644 index a4c3f43..0000000 --- a/src/danbooruclientview.h +++ /dev/null @@ -1,78 +0,0 @@ -/*************************************************************************** - * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -#ifndef DANBOORU_CLIENTVIEW_H -#define DANBOORU_CLIENTVIEW_H - -#include "ui_danbooruclientview.h" - -#include "kurl.h" - -#include - -class QTimer; - -namespace Danbooru -{ - -class DanbooruPostModel; -class DanbooruPostDelegate; -class DanbooruService; - -/** - * This is the main view class for danbooru_client. Most of the non-menu, - * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go - * here. - * - * @short Main view - * @author %{AUTHOR} <%{EMAIL}> - * @version %{VERSION} - */ - -class DanbooruClientView : public QWidget, public Ui::DanbooruClientView -{ - Q_OBJECT - -public: - /** - * Default constructor - */ - DanbooruClientView(QWidget *parent = 0); - - /** - * Destructor - */ - virtual ~DanbooruClientView(); - -private Q_SLOTS: - void slotHandleDownload(QUrl); - void slotHandleView(QUrl); - -private: - DanbooruPostModel *m_model; - DanbooruPostDelegate *m_delegate; - DanbooruService *m_service; - - QTimer *m_timer; - -}; - -} // namespace Danbooru - -#endif // danbooru_clientVIEW_H