[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:59:05 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=93bee7f

The following commit has been merged in the master branch:
commit 93bee7fb27624763f8d25efbb857867c4d9d25d1
Author: Lasath Fernando <kde at lasath.org>
Date:   Thu Feb 10 19:26:09 2011 +1100

    I added a Haze Yahoo plugin. At the moment it does not have an advanced options widget, I'll add that later.
---
 haze/haze-yahoo-account.cpp                        | 66 ++++++++++++++++++++++
 .../idle-account-ui.h => haze/haze-yahoo-account.h | 27 +++++----
 haze/yahoo-main-options-widget.cpp                 | 61 ++++++++++++++++++++
 haze/yahoo-main-options-widget.h                   | 43 ++++++++++++++
 ...ions-widget.ui => yahoo-main-options-widget.ui} | 17 ++++--
 5 files changed, 197 insertions(+), 17 deletions(-)

diff --git a/haze/haze-yahoo-account.cpp b/haze/haze-yahoo-account.cpp
new file mode 100644
index 0000000..e8737ec
--- /dev/null
+++ b/haze/haze-yahoo-account.cpp
@@ -0,0 +1,66 @@
+/*
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "haze-yahoo-account.h"
+#include <KDebug>
+
+class HazeYahooAccount::Private
+{
+public:
+    Private()
+    {
+        kDebug();
+    }
+};
+
+HazeYahooAccount::HazeYahooAccount(QObject* parent)
+  : AbstractAccountUi(parent), d(new Private)
+{
+    kDebug();
+
+    // only these two parameters are supported at the moment,
+    // I'll add more once I determine which are important
+    registerSupportedParameter("account", QVariant::String);
+    registerSupportedParameter("password", QVariant::String);
+}
+
+HazeYahooAccount::~HazeYahooAccount()
+{
+  kDebug();
+  
+  delete d;
+}
+
+bool HazeYahooAccount::hasAdvancedOptionsWidget() const
+{
+    return false;
+}
+
+AbstractAccountParametersWidget* HazeYahooAccount::mainOptionsWidget(ParameterEditModel* model, QWidget* parent) const
+{
+  return new YahooMainOptionsWidget(model,parent);
+}
+
+AbstractAccountParametersWidget* HazeYahooAccount::advancedOptionsWidget(ParameterEditModel* model, QWidget* parent) const
+{
+//     return AbstractAccountUi::advancedOptionsWidget(model, parent);
+  return NULL;
+//   return new YahooMainOptionsWidget(model,parent);
+
+}
diff --git a/idle/idle-account-ui.h b/haze/haze-yahoo-account.h
similarity index 64%
copy from idle/idle-account-ui.h
copy to haze/haze-yahoo-account.h
index fa65167..3d1299c 100644
--- a/idle/idle-account-ui.h
+++ b/haze/haze-yahoo-account.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2011 Lasse Liehu <lliehu at kolumbus.fi>
+ * Copyright (C) 2011 Lasath Fernando <kde at lasath.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,33 +18,36 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_UI_H
-#define KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_UI_H
+#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_YAHOO_ACCOUNT_UI_H
+#define KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_YAHOO_ACCOUNT_UI_H
 
 #include <KCMTelepathyAccounts/AbstractAccountUi>
 
-class IdleAccountUi : public AbstractAccountUi
+#include "yahoo-main-options-widget.h"
+
+class HazeYahooAccount : public AbstractAccountUi
 {
     Q_OBJECT
 
 public:
-    explicit IdleAccountUi(QObject *parent = 0);
-    virtual ~IdleAccountUi();
+    explicit HazeYahooAccount(QObject *parent = 0);
+    virtual ~HazeYahooAccount();
 
     virtual AbstractAccountParametersWidget
-              *mainOptionsWidget(ParameterEditModel *model,
-                                 QWidget *parent = 0) const;
+    *mainOptionsWidget(ParameterEditModel *model,
+                       QWidget *parent = 0) const;
     virtual bool hasAdvancedOptionsWidget() const;
     virtual AbstractAccountParametersWidget
-              *advancedOptionsWidget(ParameterEditModel *model,
-                                     QWidget *parent = 0) const;
+    *advancedOptionsWidget(ParameterEditModel *model,
+                           QWidget *parent = 0) const;
+
 private:
-    Q_DISABLE_COPY(IdleAccountUi);
+    Q_DISABLE_COPY(HazeYahooAccount);
 
     class Private;
     Private * const d;
-};
 
+};
 
 #endif // header guard
 
diff --git a/haze/yahoo-main-options-widget.cpp b/haze/yahoo-main-options-widget.cpp
new file mode 100644
index 0000000..179eaba
--- /dev/null
+++ b/haze/yahoo-main-options-widget.cpp
@@ -0,0 +1,61 @@
+/*
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "yahoo-main-options-widget.h"
+
+#include <KDebug>
+
+class YahooMainOptionsWidget::Private
+{
+public:
+  
+  Ui::YahooMainOptionsWidget* ui;
+  
+    Private()
+      : ui(NULL)
+    {
+        kDebug();
+    }
+    
+    ~Private()
+    {
+      delete ui;
+    }
+};
+
+YahooMainOptionsWidget::YahooMainOptionsWidget(ParameterEditModel* model, QWidget* parent)
+  : AbstractAccountParametersWidget(model, parent), d(new Private)
+{
+  kDebug();
+  
+  //setup the Ui
+  d->ui = new Ui::YahooMainOptionsWidget;
+  d->ui->setupUi(this);
+  
+  //map the widgets to their data
+  handleParameter("account", QVariant::String, d->ui->accountLineEdit, d->ui->accountLabel);
+  handleParameter("password", QVariant::String, d->ui->passwordLineEdit, d->ui->passwordLabel);
+}
+
+YahooMainOptionsWidget::~YahooMainOptionsWidget()
+{
+  kDebug();
+  
+  delete d;
+}
diff --git a/haze/yahoo-main-options-widget.h b/haze/yahoo-main-options-widget.h
new file mode 100644
index 0000000..39618f9
--- /dev/null
+++ b/haze/yahoo-main-options-widget.h
@@ -0,0 +1,43 @@
+/*
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef HAZE_YAHOO_ACCOUNT_H
+#define HAZE_YAHOO_ACCOUNT_H
+
+#include "ui_yahoo-main-options-widget.h"
+
+#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
+
+class YahooMainOptionsWidget
+  : public AbstractAccountParametersWidget
+{
+  Q_OBJECT
+  
+  public:
+    YahooMainOptionsWidget(ParameterEditModel* model, QWidget* parent = 0);
+    virtual ~YahooMainOptionsWidget();
+    
+private:
+  Q_DISABLE_COPY(YahooMainOptionsWidget);
+  
+  class Private;
+    Private * const d;
+};
+
+#endif // HAZE_YAHOO_ACCOUNT_H
diff --git a/haze/icq-main-options-widget.ui b/haze/yahoo-main-options-widget.ui
similarity index 79%
copy from haze/icq-main-options-widget.ui
copy to haze/yahoo-main-options-widget.ui
index 32c8c77..47aba2b 100644
--- a/haze/icq-main-options-widget.ui
+++ b/haze/yahoo-main-options-widget.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>IcqMainOptionsWidget</class>
- <widget class="QWidget" name="IcqMainOptionsWidget">
+ <class>YahooMainOptionsWidget</class>
+ <widget class="QWidget" name="YahooMainOptionsWidget">
   <property name="geometry">
    <rect>
     <x>0</x>
@@ -31,17 +31,24 @@
      <item row="0" column="0">
       <widget class="QLabel" name="accountLabel">
        <property name="text">
-        <string>UIN:</string>
+        <string>Username</string>
        </property>
       </widget>
      </item>
      <item row="0" column="1">
-      <widget class="KLineEdit" name="accountLineEdit"/>
+      <widget class="KLineEdit" name="accountLineEdit">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="clickMessage">
+        <string>example at yahoo.com</string>
+       </property>
+      </widget>
      </item>
      <item row="1" column="0">
       <widget class="QLabel" name="passwordLabel">
        <property name="text">
-        <string>Password:</string>
+        <string>Password</string>
        </property>
       </widget>
      </item>

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list