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 @@ -1,22 +1,29 @@ /* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ -#pragma once - -#include "Swift/Controllers/UIInterfaces/FileTransferListWidget.h" +/* + * Copyright (c) 2015 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ -#include "QtTabbable.h" +#pragma once #include <QCloseEvent> +#include <QPushButton> #include <QShowEvent> #include <QTreeView> +#include <Swift/Controllers/UIInterfaces/FileTransferListWidget.h> + +#include <Swift/QtUI/QtTabbable.h> + namespace Swift { class FileTransferOverview; class QtFileTransferListItemModel; class QtFileTransferListWidget : public QtTabbable, public FileTransferListWidget { @@ -33,15 +40,20 @@ public: virtual std::string getID() const; private: virtual void closeEvent(QCloseEvent* event); virtual void showEvent(QShowEvent* event); + void handleFileTransferListChanged(); + +private slots: + void clearInactiveTransfers(); private: QTreeView* treeView; QtFileTransferListItemModel* itemModel; FileTransferOverview* fileTransferOverview; + QPushButton* clearFinished; }; } |