Run astyle-kdelibs on the source
This commit is contained in:
parent
4b85d63d68
commit
39aac8c95b
22 changed files with 1227 additions and 1264 deletions
|
@ -17,8 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "danbooruclientview.h"
|
||||
|
||||
// Own
|
||||
|
@ -35,54 +33,53 @@
|
|||
#include <KRun>
|
||||
#include <KFileDialog>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruClientView::DanbooruClientView(QWidget * parent): QWidget(parent),
|
||||
m_model(new DanbooruPostModel(this)),
|
||||
m_delegate(0),
|
||||
m_service(0),
|
||||
m_timer(0)
|
||||
{
|
||||
setupUi(this);
|
||||
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_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->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);
|
||||
m_listView->setModel(m_model);
|
||||
m_listView->setItemDelegate(m_delegate);
|
||||
|
||||
// signal-slot connections
|
||||
// signal-slot connections
|
||||
|
||||
connect(m_delegate, &DanbooruPostDelegate::postDownloadRequested, this, &DanbooruClientView::slotHandleDownload);
|
||||
connect(m_delegate, &DanbooruPostDelegate::postViewRequested, this, &DanbooruClientView::slotHandleView);
|
||||
// connect(m_listView, SIGNAL(clicked(const QModelIndex&)), parent(),
|
||||
// SLOT(displayInfo(const QModelIndex&));
|
||||
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()
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue