[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:57:23 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=8a35f42
The following commit has been merged in the master branch:
commit 8a35f42e7aa3744c74a4e48682732808a84206da
Author: George Goldberg <grundleborg at googlemail.com>
Date: Wed Jul 22 22:15:44 2009 +0000
Add a method to set the parameters of the ParametersEditWidget and create a stub delegate for displaying the widgets in the item view for autogenerated account editing UIs.
svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1001328
---
src/CMakeLists.txt | 1 +
...otocol-item.cpp => parameter-edit-delegate.cpp} | 38 +++++++++++++++-------
...ter-edit-widget.h => parameter-edit-delegate.h} | 18 +++++-----
src/parameter-edit-widget.cpp | 8 +++++
src/parameter-edit-widget.h | 4 +++
src/parameter-edit-widget.ui | 2 +-
6 files changed, 50 insertions(+), 21 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 28f9f4b..36a82db 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,7 @@ set (telepathy_accounts_kcm_SRCS
connection-manager-item.cpp
protocol-item.cpp
parameter-edit-widget.cpp
+ parameter-edit-delegate.cpp
)
kde4_add_ui_files (telepathy_accounts_kcm_SRCS
diff --git a/src/protocol-item.cpp b/src/parameter-edit-delegate.cpp
similarity index 54%
copy from src/protocol-item.cpp
copy to src/parameter-edit-delegate.cpp
index 3162bae..62d7590 100644
--- a/src/protocol-item.cpp
+++ b/src/parameter-edit-delegate.cpp
@@ -18,33 +18,47 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "protocol-item.h"
-
-#include "connection-manager-item.h"
+#include "parameter-edit-delegate.h"
#include <KDebug>
-ProtocolItem::ProtocolItem(const QString &protocol, ConnectionManagerItem *parent)
- : QObject(parent),
- m_protocol(protocol)
+ParameterEditDelegate::ParameterEditDelegate(QAbstractItemView *itemView, QObject *parent)
+ : KWidgetItemDelegate(itemView, parent)
+{
+ kDebug();
+
+ // TODO: Implement me!
+}
+
+ParameterEditDelegate::~ParameterEditDelegate()
{
- kDebug() << "Creating new ProtocolItem with cmItem: " << parent << " and protocol;" << protocol;
+ kDebug();
// TODO: Implement me!
}
-ProtocolItem::~ProtocolItem()
+
+QList<QWidget*> ParameterEditDelegate::createItemWidgets() const
{
kDebug();
- // TODO: Implement me...
+ // TODO: Implement me!
+
+ return QList<QWidget*>();
}
-QString ProtocolItem::protocol() const
+void ParameterEditDelegate::updateItemWidgets(const QList<QWidget*> widgets,
+ const QStyleOptionViewItem &option,
+ const QPersistentModelIndex &index) const
{
- return m_protocol;
+ kDebug();
+
+ // TODO: Implement me!
+ Q_UNUSED(widgets);
+ Q_UNUSED(option);
+ Q_UNUSED(index);
}
-#include "protocol-item.moc"
+#include "parameter-edit-delegate.moc"
diff --git a/src/parameter-edit-widget.h b/src/parameter-edit-delegate.h
similarity index 61%
copy from src/parameter-edit-widget.h
copy to src/parameter-edit-delegate.h
index d4f8c0a..cfd434b 100644
--- a/src/parameter-edit-widget.h
+++ b/src/parameter-edit-delegate.h
@@ -18,22 +18,24 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_WIDGET_H
-#define TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_WIDGET_H
+#ifndef TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_DELEGATE_H
+#define TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_DELEGATE_H
-#include <QtGui/QWidget>
+#include <KWidgetItemDelegate>
-class ParameterEditWidget : public QWidget
+class ParameterEditDelegate : public KWidgetItemDelegate
{
Q_OBJECT
public:
- explicit ParameterEditWidget(QWidget *parent = 0);
- ~ParameterEditWidget();
+ explicit ParameterEditDelegate(QAbstractItemView *itemView, QObject *parent = 0);
+ virtual ~ParameterEditDelegate();
protected:
- class Private;
- Private * const d;
+ virtual QList<QWidget*> createItemWidgets() const;
+ virtual void updateItemWidgets(const QList<QWidget*> widgets,
+ const QStyleOptionViewItem &option,
+ const QPersistentModelIndex &index) const;
};
diff --git a/src/parameter-edit-widget.cpp b/src/parameter-edit-widget.cpp
index bb5a298..cb905b3 100644
--- a/src/parameter-edit-widget.cpp
+++ b/src/parameter-edit-widget.cpp
@@ -34,6 +34,7 @@ public:
}
Ui::ParameterEditWidget *ui;
+ Tp::ProtocolParameterList parameters;
};
ParameterEditWidget::ParameterEditWidget(QWidget *parent)
@@ -54,3 +55,10 @@ ParameterEditWidget::~ParameterEditWidget()
delete d;
}
+void ParameterEditWidget::setParameters(const Tp::ProtocolParameterList ¶meters)
+{
+ d->parameters = parameters;
+
+ // TODO: Generate the UI
+}
+
diff --git a/src/parameter-edit-widget.h b/src/parameter-edit-widget.h
index d4f8c0a..ea77471 100644
--- a/src/parameter-edit-widget.h
+++ b/src/parameter-edit-widget.h
@@ -23,6 +23,8 @@
#include <QtGui/QWidget>
+#include <TelepathyQt4/ConnectionManager>
+
class ParameterEditWidget : public QWidget
{
Q_OBJECT
@@ -31,6 +33,8 @@ public:
explicit ParameterEditWidget(QWidget *parent = 0);
~ParameterEditWidget();
+ void setParameters(const Tp::ProtocolParameterList ¶meters);
+
protected:
class Private;
Private * const d;
diff --git a/src/parameter-edit-widget.ui b/src/parameter-edit-widget.ui
index 1cf104d..341bae6 100644
--- a/src/parameter-edit-widget.ui
+++ b/src/parameter-edit-widget.ui
@@ -15,7 +15,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QListView" name="parameterEditWidget"/>
+ <widget class="QListView" name="parameterListView"/>
</item>
</layout>
</widget>
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list