Those are unneeded now
This commit is contained in:
		
					parent
					
						
							
								a23962e9a3
							
						
					
				
			
			
				commit
				
					
						b05ba203be
					
				
			
		
					 2 changed files with 0 additions and 161 deletions
				
			
		| 
						 | 
				
			
			@ -1,83 +0,0 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2014 Luca Beltrame <lbeltrame@kde.org>
 | 
			
		||||
 *
 | 
			
		||||
 * 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "danbooruclientview.h"
 | 
			
		||||
 | 
			
		||||
// Own
 | 
			
		||||
 | 
			
		||||
#include "model/danboorupostmodel.h"
 | 
			
		||||
#include "model/danboorupostdelegate.h"
 | 
			
		||||
 | 
			
		||||
// Qt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// KDE
 | 
			
		||||
 | 
			
		||||
#include <KRun>
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
| 
						 | 
				
			
			@ -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 <QWidget>
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue