[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:48 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=e5b56e8

The following commit has been merged in the master branch:
commit e5b56e8e21f784d15d88e4f47e6e34040ae6cf1a
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Wed Oct 3 00:01:59 2012 +0100

    Add a widget to show a combo of all accounts
---
 KTp/Widgets/CMakeLists.txt                         |  2 +
 .../accounts-combo-box.cpp}                        | 43 +++++++++++++---------
 .../accounts-combo-box.h}                          | 34 ++++++++---------
 3 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/KTp/Widgets/CMakeLists.txt b/KTp/Widgets/CMakeLists.txt
index 708c8b0..5bed94a 100644
--- a/KTp/Widgets/CMakeLists.txt
+++ b/KTp/Widgets/CMakeLists.txt
@@ -8,6 +8,7 @@ set (ktp_widgets_private_SRCS
     add-contact-dialog.cpp
     join-chat-room-dialog.cpp
     notificationconfigdialog.cpp
+    accounts-combo-box.cpp
 )
 
 set (ktp_widgets_private_HDRS
@@ -16,6 +17,7 @@ set (ktp_widgets_private_HDRS
      add-contact-dialog.h
      join-chat-room-dialog.h
      notificationconfigdialog.h
+     accounts-combo-box.h
 )
 
 kde4_add_ui_files (ktp_widgets_private_SRCS
diff --git a/KTp/pending-wallet.h b/KTp/Widgets/accounts-combo-box.cpp
similarity index 54%
copy from KTp/pending-wallet.h
copy to KTp/Widgets/accounts-combo-box.cpp
index 9ef86d7..b504500 100644
--- a/KTp/pending-wallet.h
+++ b/KTp/Widgets/accounts-combo-box.cpp
@@ -17,29 +17,38 @@
  */
 
 
-#ifndef PENDINGWALLETOPERATION_H
-#define PENDINGWALLETOPERATION_H
+#include "accounts-combo-box.h"
 
-#include <TelepathyQt/PendingOperation>
+#include <TelepathyQt/AccountManager>
+#include <TelepathyQt/Account>
 
-#include "wallet-interface.h"
-#include <KTp/ktp-export.h>
+#include <KTp/Models/accounts-list-model.h>
 
-namespace KTp
-{
-class PendingWalletPrivate;
 
-class KTP_EXPORT PendingWallet : public Tp::PendingOperation
+class KTp::AccountsComboBox::Private
 {
-    Q_OBJECT
 public:
-    friend class WalletInterface;
-    KTp::WalletInterface *walletInterface() const;
-private:
-    PendingWallet(KTp::WalletInterface *wallet);
-    virtual ~PendingWallet();
-    KTp::PendingWalletPrivate *d;
+    AccountsListModel *model;
 };
 
+KTp::AccountsComboBox::AccountsComboBox(QWidget *parent) :
+    QComboBox(parent),
+    d(new KTp::AccountsComboBox::Private())
+{
+    d->model = new AccountsListModel(this);
+    setModel(d->model);
+}
+
+void KTp::AccountsComboBox::setAccountManager(const Tp::AccountManager &accountManager)
+{
+    //    d->model->settAccountManager(accountManager);
+}
+
+Tp::AccountPtr KTp::AccountsComboBox::currentAccount()
+{
+    return itemData(currentIndex(), AccountsListModel::AccountRole).value<Tp::AccountPtr>();
 }
-#endif // PENDINGWALLETOPERATION_H
+
+
+
+
diff --git a/KTp/pending-wallet.h b/KTp/Widgets/accounts-combo-box.h
similarity index 63%
copy from KTp/pending-wallet.h
copy to KTp/Widgets/accounts-combo-box.h
index 9ef86d7..b3ba55e 100644
--- a/KTp/pending-wallet.h
+++ b/KTp/Widgets/accounts-combo-box.h
@@ -17,29 +17,29 @@
  */
 
 
-#ifndef PENDINGWALLETOPERATION_H
-#define PENDINGWALLETOPERATION_H
+#ifndef ACCOUNTSCOMBOBOX_H
+#define ACCOUNTSCOMBOBOX_H
 
-#include <TelepathyQt/PendingOperation>
+#include <QComboBox>
+#include <TelepathyQt/Types>
 
-#include "wallet-interface.h"
-#include <KTp/ktp-export.h>
+namespace KTp {
 
-namespace KTp
-{
-class PendingWalletPrivate;
-
-class KTP_EXPORT PendingWallet : public Tp::PendingOperation
+class AccountsComboBox : public QComboBox
 {
     Q_OBJECT
+    Q_DISABLE_COPY(AccountsComboBox)
+public:
+    explicit AccountsComboBox(QWidget *parent = 0);
+
 public:
-    friend class WalletInterface;
-    KTp::WalletInterface *walletInterface() const;
+    void setAccountManager(const Tp::AccountManager &accountManager);
+    Tp::AccountPtr currentAccount();
+
 private:
-    PendingWallet(KTp::WalletInterface *wallet);
-    virtual ~PendingWallet();
-    KTp::PendingWalletPrivate *d;
+    class Private;
+    Private * const d;
 };
-
 }
-#endif // PENDINGWALLETOPERATION_H
+
+#endif // ACCOUNTSCOMBOBOX_H

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list