diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-06-17 20:40:41 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-07-10 14:56:43 (GMT) |
| commit | b54aa689ffc6bec7987c193e28c641d2f0f73236 (patch) | |
| tree | ad9984fc3f9633e21fe0ff5ef8728f6d420ca07f /Swift/QtUI/QtFileTransferListWidget.h | |
| parent | 7af21fdd59af3b3112cff69996301605859af84c (diff) | |
| download | swift-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/QtFileTransferListWidget.h')
| -rw-r--r-- | Swift/QtUI/QtFileTransferListWidget.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Swift/QtUI/QtFileTransferListWidget.h b/Swift/QtUI/QtFileTransferListWidget.h index 8adc009..740eb15 100644 --- a/Swift/QtUI/QtFileTransferListWidget.h +++ b/Swift/QtUI/QtFileTransferListWidget.h | |||
| @@ -2,20 +2,27 @@ | |||
| 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 | #pragma once | 7 | /* |
| 8 | 8 | * Copyright (c) 2015 Isode Limited. | |
| 9 | #include "Swift/Controllers/UIInterfaces/FileTransferListWidget.h" | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | ||
| 11 | */ | ||
| 10 | 12 | ||
| 11 | #include "QtTabbable.h" | 13 | #pragma once |
| 12 | 14 | ||
| 13 | #include <QCloseEvent> | 15 | #include <QCloseEvent> |
| 16 | #include <QPushButton> | ||
| 14 | #include <QShowEvent> | 17 | #include <QShowEvent> |
| 15 | #include <QTreeView> | 18 | #include <QTreeView> |
| 16 | 19 | ||
| 20 | #include <Swift/Controllers/UIInterfaces/FileTransferListWidget.h> | ||
| 21 | |||
| 22 | #include <Swift/QtUI/QtTabbable.h> | ||
| 23 | |||
| 17 | namespace Swift { | 24 | namespace Swift { |
| 18 | 25 | ||
| 19 | class FileTransferOverview; | 26 | class FileTransferOverview; |
| 20 | class QtFileTransferListItemModel; | 27 | class QtFileTransferListItemModel; |
| 21 | 28 | ||
| @@ -34,14 +41,19 @@ public: | |||
| 34 | virtual std::string getID() const; | 41 | virtual std::string getID() const; |
| 35 | 42 | ||
| 36 | private: | 43 | private: |
| 37 | virtual void closeEvent(QCloseEvent* event); | 44 | virtual void closeEvent(QCloseEvent* event); |
| 38 | virtual void showEvent(QShowEvent* event); | 45 | virtual void showEvent(QShowEvent* event); |
| 46 | void handleFileTransferListChanged(); | ||
| 47 | |||
| 48 | private slots: | ||
| 49 | void clearInactiveTransfers(); | ||
| 39 | 50 | ||
| 40 | private: | 51 | private: |
| 41 | QTreeView* treeView; | 52 | QTreeView* treeView; |
| 42 | 53 | ||
| 43 | QtFileTransferListItemModel* itemModel; | 54 | QtFileTransferListItemModel* itemModel; |
| 44 | FileTransferOverview* fileTransferOverview; | 55 | FileTransferOverview* fileTransferOverview; |
| 56 | QPushButton* clearFinished; | ||
| 45 | }; | 57 | }; |
| 46 | 58 | ||
| 47 | } | 59 | } |
Swift