Warning, file /network/ktp-contact-list/context-menu.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 Contact list context menu 0003 Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Lesser General Public 0007 License as published by the Free Software Foundation; either 0008 version 2.1 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Lesser General Public License for more details. 0014 0015 You should have received a copy of the GNU Lesser General Public 0016 License along with this library; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0018 */ 0019 0020 #ifndef CONTEXT_MENU_H 0021 #define CONTEXT_MENU_H 0022 0023 #include <QObject> 0024 #include <QPersistentModelIndex> 0025 #include <QStringList> 0026 0027 #include <TelepathyQt/Types> 0028 0029 #include "contact-list-widget.h" 0030 0031 class AccountsModel; 0032 class QMenu; 0033 class QAction; 0034 0035 class ContextMenu : public QObject 0036 { 0037 Q_OBJECT 0038 public: 0039 explicit ContextMenu(ContactListWidget *mainWidget); 0040 virtual ~ContextMenu(); 0041 0042 QMenu* groupContextMenu(const QModelIndex &index); 0043 QMenu* contactContextMenu(const QModelIndex &index); 0044 void setAccountManager(const Tp::AccountManagerPtr &accountManager); 0045 0046 private Q_SLOTS: 0047 void onAddContactToGroupTriggered(); 0048 void onBlockContactTriggered(); 0049 void onStartTextChatTriggered(); 0050 void onStartAudioChatTriggered(); 0051 void onStartVideoChatTriggered(); 0052 void onStartFileTransferTriggered(); 0053 void onStartDesktopSharingTriggered(); 0054 void onOpenLogViewerTriggered(); 0055 void onUnblockContactTriggered(); 0056 void onRemoveContactFromGroupTriggered(); 0057 void onCreateNewGroupTriggered(); 0058 void onRenameGroupTriggered(); 0059 void onDeleteGroupTriggered(); 0060 void onShowInfoTriggered(); 0061 void onDeleteContactTriggered(); 0062 void onOpenLinkTriggered(QAction *action); /** triggered from custom contact menu when user clicks contact link */ 0063 void onRerequestAuthorization(); 0064 void onResendAuthorization(); 0065 void onNotificationConfigureTriggered(); 0066 0067 private: 0068 ContactListWidget *m_mainWidget; 0069 QPersistentModelIndex m_currentIndex; 0070 Tp::AccountManagerPtr m_accountManager; 0071 }; 0072 0073 #endif // CONTEXT_MENU_H 0074 0075 class QTreeView;