File indexing completed on 2023-11-26 04:55:36
0001 /* 0002 Class that auto configures link-local xmpp account 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 0021 #ifndef SALUT_ENABLER_H 0022 #define SALUT_ENABLER_H 0023 0024 #include <QtCore/QObject> 0025 0026 #include <TelepathyQt/Types> 0027 #include <KMessageWidget> 0028 0029 class QFrame; 0030 class QWidget; 0031 0032 namespace Tp { 0033 class PendingOperation; 0034 } 0035 0036 class SalutEnabler : public QObject 0037 { 0038 Q_OBJECT 0039 public: 0040 explicit SalutEnabler(const Tp::AccountManagerPtr accountManager, QObject *parent = 0); 0041 virtual ~SalutEnabler(); 0042 0043 QFrame *frameWidget(QWidget *parent); 0044 0045 Q_SIGNALS: 0046 void userInfoReady(); 0047 void done(); 0048 void cancelled(); 0049 void feedbackMessage(const QString &text, const QString &comment, KMessageWidget::MessageType); 0050 0051 public Q_SLOTS: 0052 void onUserAccepted(); 0053 void onUserWantingChanges(); 0054 void onUserCancelled(); 0055 void onDialogAccepted(const QString &displayName, const QVariantMap &values); 0056 0057 private Q_SLOTS: 0058 void onAccountCreated(Tp::PendingOperation *op); 0059 void onConnectionManagerReady(Tp::PendingOperation *op); 0060 void onProfileManagerReady(Tp::PendingOperation *op); 0061 0062 private: 0063 class Private; 0064 Private * const d; 0065 }; 0066 0067 #endif // SALUT_ENABLER_H