summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-06-17 20:40:41 (GMT)
committerTobias Markmann <tm@ayena.de>2015-07-10 14:56:43 (GMT)
commitb54aa689ffc6bec7987c193e28c641d2f0f73236 (patch)
treead9984fc3f9633e21fe0ff5ef8728f6d420ca07f /Swift/QtUI/QtFileTransferListItemModel.h
parent7af21fdd59af3b3112cff69996301605859af84c (diff)
downloadswift-b54aa689ffc6bec7987c193e28c641d2f0f73236.zip
swift-b54aa689ffc6bec7987c193e28c641d2f0f73236.tar.bz2
Implement logic behind 'Clear all' button
The 'Clear all' button in the file transfer overview window was only present in the UI, without any logic behind. That's fixed now. Test-Information: Send a file in between two Swift instances. Verified that the button is enabled/disabled at appropriate times and works as expected if pressed. Change-Id: Ib92621cba479683ade8d815ce5ace9768449a499
Diffstat (limited to 'Swift/QtUI/QtFileTransferListItemModel.h')
-rw-r--r--Swift/QtUI/QtFileTransferListItemModel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtFileTransferListItemModel.h b/Swift/QtUI/QtFileTransferListItemModel.h
index 28f13f8..64cdca4 100644
--- a/Swift/QtUI/QtFileTransferListItemModel.h
+++ b/Swift/QtUI/QtFileTransferListItemModel.h
@@ -2,10 +2,16 @@
2 * Copyright (c) 2011 Tobias Markmann 2 * Copyright (c) 2011 Tobias Markmann
3 * Licensed under the simplified BSD license. 3 * Licensed under the simplified BSD license.
4 * See Documentation/Licenses/BSD-simplified.txt for more information. 4 * See Documentation/Licenses/BSD-simplified.txt for more information.
5 */ 5 */
6 6
7/*
8 * Copyright (c) 2015 Isode Limited.
9 * All rights reserved.
10 * See the COPYING file for more information.
11 */
12
7#pragma once 13#pragma once
8 14
9#include <QAbstractItemModel> 15#include <QAbstractItemModel>
10 16
11namespace Swift { 17namespace Swift {
@@ -15,10 +21,11 @@ class FileTransferOverview;
15 21
16class QtFileTransferListItemModel : public QAbstractItemModel { 22class QtFileTransferListItemModel : public QAbstractItemModel {
17 Q_OBJECT 23 Q_OBJECT
18public: 24public:
19 explicit QtFileTransferListItemModel(QObject *parent = 0); 25 explicit QtFileTransferListItemModel(QObject *parent = 0);
26 virtual ~QtFileTransferListItemModel();
20 27
21 void setFileTransferOverview(FileTransferOverview*); 28 void setFileTransferOverview(FileTransferOverview*);
22 29
23 QVariant headerData(int section, Qt::Orientation orientation, int role) const; 30 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
24 int columnCount(const QModelIndex &parent) const; 31 int columnCount(const QModelIndex &parent) const;
@@ -37,10 +44,11 @@ private:
37 NoOfColumns 44 NoOfColumns
38 }; 45 };
39 46
40private: 47private:
41 void handleNewFileTransferController(FileTransferController*); 48 void handleNewFileTransferController(FileTransferController*);
49 void handleFileTransferListChanged();
42 void handleStateChange(int index); 50 void handleStateChange(int index);
43 void handleProgressChange(int index); 51 void handleProgressChange(int index);
44 52
45signals: 53signals:
46 54