File indexing completed on 2023-11-26 08:16:46
0001 /* 0002 * Contact Chooser Dialog 0003 * 0004 * Copyright (C) 2011 David Edmundson <kde@davidedmundson.co.uk> 0005 * Copyright (C) 2012 Daniele E. Domenichelli <daniele.domenichelli@gmail.com> 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Lesser General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2.1 of the License, or (at your option) any later version. 0011 * 0012 * This library is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Lesser General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Lesser General Public 0018 * License along with this library; if not, write to the Free Software 0019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0020 */ 0021 0022 0023 #ifndef CONTACT_GRID_DIALOG_H 0024 #define CONTACT_GRID_DIALOG_H 0025 0026 #include <QDialog> 0027 #include <TelepathyQt/Types> 0028 #include <TelepathyQt/AccountManager> 0029 #include <TelepathyQt/Account> 0030 #include <TelepathyQt/Contact> 0031 #include <KTp/ktpcommoninternals_export.h> 0032 0033 namespace Tp { 0034 class PendingOperation; 0035 } 0036 0037 class ContactsModel; 0038 class QTcpSocket; 0039 0040 namespace KTp { 0041 class ContactGridWidget; 0042 class ContactsFilterModel; 0043 0044 class KTPCOMMONINTERNALS_EXPORT ContactGridDialog : public QDialog 0045 { 0046 Q_OBJECT 0047 Q_DISABLE_COPY(ContactGridDialog) 0048 0049 public: 0050 ContactGridDialog(QWidget *parent); 0051 ~ContactGridDialog() override; 0052 0053 virtual KTp::ContactsFilterModel* filter() const; 0054 0055 virtual Tp::AccountPtr account(); 0056 virtual Tp::ContactPtr contact(); 0057 0058 private: 0059 class Private; 0060 Private * const d; 0061 0062 Q_PRIVATE_SLOT(d, void _k_onAccountManagerReady()); 0063 Q_PRIVATE_SLOT(d, void _k_onSelectionChanged()); 0064 }; 0065 0066 } // namespace KTp 0067 0068 #endif // CONTACT_GRID_DIALOG_H