projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version for release 0.14-rc2
[quassel.git]
/
src
/
uisupport
/
toolbaractionprovider.h
diff --git
a/src/uisupport/toolbaractionprovider.h
b/src/uisupport/toolbaractionprovider.h
index
59661d0
..
9d63b79
100644
(file)
--- a/
src/uisupport/toolbaractionprovider.h
+++ b/
src/uisupport/toolbaractionprovider.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-
09 by the Quassel Project
*
+ * Copyright (C) 2005-
2020 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-15,43
+15,55
@@
* 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., *
* 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., *
- * 5
9 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
***************************************************************************/
***************************************************************************/
-#ifndef TOOLBARACTIONPROVIDER_H_
-#define TOOLBARACTIONPROVIDER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include "networkmodelcontroller.h"
class QToolBar;
#include "networkmodelcontroller.h"
class QToolBar;
-class ToolBarActionProvider : public NetworkModelController {
- Q_OBJECT
+class UISUPPORT_EXPORT ToolBarActionProvider : public NetworkModelController
+{
+ Q_OBJECT
public:
public:
- ToolBarActionProvider(QObject *parent = 0);
- virtual ~ToolBarActionProvider();
+ ToolBarActionProvider(QObject* parent = nullptr);
- enum ToolBarType {
- NetworkToolBar,
- ChatViewToolBar,
- NickToolBar
- };
+ enum ToolBarType
+ {
+ MainToolBar,
+ ChatViewToolBar,
+ NickToolBar
+ };
-
void addActions(QToolBar
*, ToolBarType type);
+
void addActions(QToolBar
*, ToolBarType type);
-private slots:
- void networkCreated(NetworkId id);
- void networkRemoved(NetworkId id);
- void networkUpdated(const Network *net = 0);
- void connectOrDisconnectNet();
+public slots:
+ void disconnectedFromCore() override;
+ void onCurrentBufferChanged(const QModelIndex&);
+ void onNickSelectionChanged(const QModelIndexList&);
- //void currentBufferChanged(BufferId id);
+protected:
+ void handleNetworkAction(ActionType, QAction*) override;
+ void handleBufferAction(ActionType, QAction*) override;
+ void handleNickAction(ActionType, QAction*) override;
+ void handleGeneralAction(ActionType, QAction*) override;
+private slots:
+ void networkCreated(NetworkId id);
+ void networkRemoved(NetworkId id);
+ void networkUpdated(const Network* net = nullptr);
+ void connectOrDisconnectNet();
+
+ void updateStates();
private:
private:
- QMenu *_networksConnectMenu, *_networksDisconnectMenu;
- QHash<NetworkId, Action *> _networkActions;
+ QMenu *_networksConnectMenu, *_networksDisconnectMenu;
+ QHash<NetworkId, Action*> _networkActions;
+ QModelIndex _currentBuffer;
+ QModelIndexList _selectedNicks;
};
};
-
-#endif