File indexing completed on 2023-12-03 08:28:38
0001 /* 0002 * Start chat dialog 0003 * 0004 * Copyright (C) 2013 Anant Kamath <kamathanant@gmail.com> 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Lesser General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2.1 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Lesser General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Lesser General Public 0017 * License along with this library; if not, write to the Free Software 0018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0019 */ 0020 0021 #ifndef STARTCHATDIALOG_H 0022 #define STARTCHATDIALOG_H 0023 0024 #include <QDialog> 0025 0026 #include <TelepathyQt/Types> 0027 0028 #include <KTp/ktpcommoninternals_export.h> 0029 0030 namespace Tp { 0031 class PendingOperation; 0032 } 0033 0034 namespace KTp 0035 { 0036 class KTPCOMMONINTERNALS_EXPORT StartChatDialog : public QDialog 0037 { 0038 Q_OBJECT 0039 0040 public: 0041 explicit StartChatDialog(const Tp::AccountManagerPtr &accountManager, QWidget *parent = nullptr); 0042 ~StartChatDialog() override; 0043 0044 void accept() override; 0045 0046 protected: 0047 void closeEvent(QCloseEvent *e) override; 0048 0049 private Q_SLOTS: 0050 KTPCOMMONINTERNALS_NO_EXPORT void _k_onStartChatFinished(Tp::PendingOperation *op); 0051 KTPCOMMONINTERNALS_NO_EXPORT void _k_onPendingContactFinished(Tp::PendingOperation *op); 0052 0053 private: 0054 KTPCOMMONINTERNALS_NO_EXPORT void setInProgress(bool inProgress); 0055 0056 struct Private; 0057 Private * const d; 0058 }; 0059 } 0060 0061 #endif // STARTCHATDIALOG_H