[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:57 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=5f6b13d
The following commit has been merged in the master branch:
commit 5f6b13d3bfa7ac044ae45cded329aacd5e5ce706
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Mon Sep 19 16:40:38 2011 +0100
Replace the ListView for salut with a checkbox when the account is not configured
---
src/kcm-telepathy-accounts.cpp | 16 ++++++-
src/kcm-telepathy-accounts.h | 1 +
src/main-widget.ui | 99 +++++++++++++++++++++++++++++++++++++++---
3 files changed, 110 insertions(+), 6 deletions(-)
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index 7e5192a..27c804f 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -87,7 +87,9 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
m_ui = new Ui::MainWidget;
m_ui->setupUi(this);
m_ui->salutListView->setHidden(true);
-
+ m_ui->salutEnableFrame->setHidden(true);
+ m_ui->salutEnableCheckbox->setIcon(KIcon("im-local-xmpp"));
+ m_ui->salutEnableCheckbox->setIconSize(QSize(32, 32));
m_accountsListModel = new AccountsListModel(this);
m_salutFilterModel = new QSortFilterProxyModel(this);
@@ -115,6 +117,9 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
int height = salutDelegate->sizeHint(QStyleOptionViewItem(), m_salutFilterModel->index(0,0)).height() + 4*2;
m_ui->salutListView->setMinimumHeight(height);
m_ui->salutListView->setMaximumHeight(height);
+ m_ui->salutEnableFrame->setMinimumHeight(height);
+ m_ui->salutEnableFrame->setMaximumHeight(height);
+
connect(accountsDelegate,
SIGNAL(itemChecked(QModelIndex, bool)),
@@ -149,6 +154,9 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
connect(m_accountsListModel,
SIGNAL(rowsRemoved(QModelIndex, int, int)),
SLOT(onModelDataChanged()));
+ connect(m_ui->salutEnableCheckbox,
+ SIGNAL(toggled(bool)),
+ SLOT(onSalutEnableButtonToggled(bool)));
}
KCMTelepathyAccounts::~KCMTelepathyAccounts()
@@ -296,6 +304,12 @@ void KCMTelepathyAccounts::onModelDataChanged()
{
bool salutEnabled = m_salutFilterModel->rowCount() == 0;
m_ui->salutListView->setHidden(salutEnabled);
+ m_ui->salutEnableFrame->setHidden(!salutEnabled);
+}
+
+void KCMTelepathyAccounts::onSalutEnableButtonToggled(bool checked)
+{
+ kDebug();
}
/////
diff --git a/src/kcm-telepathy-accounts.h b/src/kcm-telepathy-accounts.h
index b16589f..462ef71 100644
--- a/src/kcm-telepathy-accounts.h
+++ b/src/kcm-telepathy-accounts.h
@@ -64,6 +64,7 @@ private Q_SLOTS:
void onEditAccountClicked();
void onRemoveAccountClicked();
void onModelDataChanged();
+ void onSalutEnableButtonToggled(bool checked);
private:
Ui::MainWidget *m_ui;
diff --git a/src/main-widget.ui b/src/main-widget.ui
index 05c1947..68e773c 100644
--- a/src/main-widget.ui
+++ b/src/main-widget.ui
@@ -10,11 +10,100 @@
<height>404</height>
</rect>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QFrame" name="salutEnableFrame">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QCheckBox" name="salutEnableCheckbox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="salutEnableLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Enable local-xmpp</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="salutEnableStatusLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>50</weight>
+ <italic>true</italic>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>This is a place holder for a serious description</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
<item>
<widget class="QListView" name="salutListView">
<property name="maximumSize">
@@ -44,9 +133,9 @@
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list