[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepimlibs/akregator_port] krss: Move remaining UI classes to akregator.
From: Frank Osterfeld <frank.osterfeld () kdab ! com>
Date: 2012-03-31 15:16:24
Message-ID: 20120331151624.7B4AFA60C9 () git ! kde ! org
[Download RAW message or body]
Git commit 0c4dee5cef106cb6311d760656fdf419be161eff by Frank Osterfeld.
Committed on 24/02/2012 at 16:25.
Pushed by osterfeld into branch 'akregator_port'.
Move remaining UI classes to akregator.
Delete now obsolete netfeedcreatedialog.
M +0 -8 krss/CMakeLists.txt
D +0 -97 krss/ui/feedpropertiesdialog.cpp
D +0 -56 krss/ui/feedpropertiesdialog.h
D +0 -342 krss/ui/feedpropertiesdialog.ui
D +0 -66 krss/ui/netfeedcreatedialog.cpp
D +0 -51 krss/ui/netfeedcreatedialog.h
D +0 -62 krss/ui/netfeedcreatedialog.ui
http://commits.kde.org/kdepimlibs/0c4dee5cef106cb6311d760656fdf419be161eff
diff --git a/krss/CMakeLists.txt b/krss/CMakeLists.txt
index 5395d84..1cd3239 100644
--- a/krss/CMakeLists.txt
+++ b/krss/CMakeLists.txt
@@ -22,8 +22,6 @@ set(krss_LIB_SRCS
feedcollection.cpp
helper.cpp
feeditemmodel.cpp
-# ui stuff
- ui/feedpropertiesdialog.cpp
)
if(KRSS_ENABLE_PROTOBUF_SERIALIZER)
@@ -68,16 +66,10 @@ set(krss_LIB_HDRS
rssitem.h #TODO review if rssitem.h should be private
)
-set(krss_UI_LIB_HDRS
- ui/feedpropertiesdialog.h
-)
-
set(krss_PRIVATE_LIB_HDRS
rssitemserializer.h
)
-kde4_add_ui_files(krss_LIB_SRCS ui/netfeedcreatedialog.ui \
ui/feedpropertiesdialog.ui)
-
kde4_add_library(krss ${LIBRARY_TYPE} ${krss_LIB_SRCS})
if(KRSS_ENABLE_PROTOBUF_SERIALIZER)
diff --git a/krss/ui/feedpropertiesdialog.cpp b/krss/ui/feedpropertiesdialog.cpp
deleted file mode 100644
index dcc80c7..0000000
--- a/krss/ui/feedpropertiesdialog.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- Copyright (C) 2008 Dmitry Ivanov <vonami@gmail.com>
-
- 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 2 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 "feedpropertiesdialog.h"
-#include "ui_feedpropertiesdialog.h"
-
-#include <KLocale>
-
-using namespace KRss;
-
-namespace KRss {
-
-class FeedPropertiesDialogPrivate
-{
-public:
-
- Ui::FeedPropertiesDialog m_ui;
-};
-
-} // namespace KRss
-
-FeedPropertiesDialog::FeedPropertiesDialog( QWidget *parent )
- : KDialog( parent ), d( new FeedPropertiesDialogPrivate() )
-{
- QWidget *widget = new QWidget( this );
- d->m_ui.setupUi( widget );
-
- connect( d->m_ui.updateCheck, SIGNAL( toggled( bool ) ),
- d->m_ui.updateLabel, SLOT( setEnabled( bool ) ) );
- connect( d->m_ui.updateCheck, SIGNAL( toggled( bool ) ),
- d->m_ui.updateInput, SLOT( setEnabled( bool ) ) );
-
- setMainWidget( widget );
- setCaption( i18n( "Feed Properties" ) );
- setButtons( KDialog::Ok | KDialog::Cancel );
-}
-
-FeedPropertiesDialog::~FeedPropertiesDialog()
-{
- delete d;
-}
-
-QString FeedPropertiesDialog::feedTitle() const
-{
- return d->m_ui.feedTitleEdit->text();
-}
-
-void FeedPropertiesDialog::setFeedTitle( const QString &feedTitle )
-{
- d->m_ui.feedTitleEdit->setText( feedTitle );
-}
-
-QString FeedPropertiesDialog::url() const
-{
- return d->m_ui.urlEdit->text();
-}
-
-void FeedPropertiesDialog::setUrl( const QString &url )
-{
- d->m_ui.urlEdit->setText( url );
-}
-
-bool FeedPropertiesDialog::hasCustomFetchInterval() const
-{
- return d->m_ui.updateCheck->isChecked();
-}
-
-void FeedPropertiesDialog::setCustomFetchInterval( bool enable )
-{
- d->m_ui.updateCheck->setChecked( enable );
-}
-
-int FeedPropertiesDialog::fetchInterval() const
-{
- return d->m_ui.updateInput->value();
-}
-
-void FeedPropertiesDialog::setFetchInterval( int minutes )
-{
- return d->m_ui.updateInput->setValue( minutes );
-}
-
-#include "feedpropertiesdialog.moc"
diff --git a/krss/ui/feedpropertiesdialog.h b/krss/ui/feedpropertiesdialog.h
deleted file mode 100644
index 0449769..0000000
--- a/krss/ui/feedpropertiesdialog.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Copyright (C) 2008 Dmitry Ivanov <vonami@gmail.com>
-
- 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 2 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 KRSS_FEEDPROPERTIESDIALOG_H
-#define KRSS_FEEDPROPERTIESDIALOG_H
-
-#include "krss/krss_export.h"
-
-#include <KDialog>
-
-namespace KRss {
-
-class FeedPropertiesDialogPrivate;
-
-class KRSS_EXPORT FeedPropertiesDialog : public KDialog
-{
- Q_OBJECT
-
-public:
-
- explicit FeedPropertiesDialog( QWidget *parent = 0 );
- ~FeedPropertiesDialog();
-
- QString feedTitle() const;
- void setFeedTitle( const QString &feedTitle );
- QString url() const;
- void setUrl( const QString &url );
-
- bool hasCustomFetchInterval() const;
- void setCustomFetchInterval( bool enable );
- int fetchInterval() const;
- void setFetchInterval( int minutes );
-
-private:
-
- Q_DISABLE_COPY( FeedPropertiesDialog )
- FeedPropertiesDialogPrivate * const d;
-};
-
-} // namespace KRss
-
-#endif // KRSS_FEEDPROPERTIESDIALOG_H
diff --git a/krss/ui/feedpropertiesdialog.ui b/krss/ui/feedpropertiesdialog.ui
deleted file mode 100644
index 92ce0b6..0000000
--- a/krss/ui/feedpropertiesdialog.ui
+++ /dev/null
@@ -1,342 +0,0 @@
-<ui version="4.0" >
- <class>FeedPropertiesDialog</class>
- <widget class="QWidget" name="FeedPropertiesDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>409</width>
- <height>212</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>Feed Properties</string>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTabWidget" name="tabWidget" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="generalTab" >
- <attribute name="title" >
- <string>&General</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="updateCheck" >
- <property name="text" >
- <string>U&se a custom update interval</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="sizeConstraint" >
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="updateLabel" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>Update &every:</string>
- </property>
- <property name="buddy" >
- <cstring>updateInput</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="updateInput" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="label" >
- <string/>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- <property name="referencePoint" >
- <number>0</number>
- </property>
- <property name="suffix" >
- <string> minutes</string>
- </property>
- <property name="specialValueText" >
- <string>Never</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="0" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QLabel" name="urlLabel" >
- <property name="text" >
- <string>&URL:</string>
- </property>
- <property name="buddy" >
- <cstring>urlEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="feedTitleLabel" >
- <property name="text" >
- <string>&Title:</string>
- </property>
- <property name="buddy" >
- <cstring>feedTitleEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="KLineEdit" name="feedTitleEdit" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" >
- <string>Display name of RSS column</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="KLineEdit" name="urlEdit" />
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="archiveTab" >
- <attribute name="title" >
- <string>Ar&chive</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QRadioButton" name="globalDefaultRadio" >
- <property name="text" >
- <string>&Use default settings</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <widget class="QRadioButton" name="limitArticleNumberRadio" >
- <property name="text" >
- <string>Limit archi&ve to:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntSpinBox" name="maxArticleNumberSpin" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="specialValueText" >
- <string>1 article</string>
- </property>
- <property name="suffix" >
- <string> articles</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <widget class="QRadioButton" name="limitArticleAgeRadio" >
- <property name="text" >
- <string>&Delete articles older than:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntSpinBox" name="maxArticleAgeSpin" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="specialValueText" >
- <string>1 day</string>
- </property>
- <property name="suffix" >
- <string> days</string>
- </property>
- <property name="value" >
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>99</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="0" >
- <widget class="QRadioButton" name="keepAllArticlesRadio" >
- <property name="text" >
- <string>&Keep all articles</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
- <customwidgets>
- <customwidget>
- <class>KIntNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
- <customwidget>
- <class>KIntSpinBox</class>
- <extends>QSpinBox</extends>
- <header>knuminput.h</header>
- </customwidget>
- <customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/krss/ui/netfeedcreatedialog.cpp b/krss/ui/netfeedcreatedialog.cpp
deleted file mode 100644
index 1623642..0000000
--- a/krss/ui/netfeedcreatedialog.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (C) 2008 Dmitry Ivanov <vonami@gmail.com>
-
- 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 2 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 "netfeedcreatedialog.h"
-
-#include <KLocale>
-
-#include <QtCore/QListIterator>
-
-using namespace KRss;
-
-NetFeedCreateDialog::NetFeedCreateDialog( QWidget *parent )
- : KDialog( parent )
-{
- QWidget *widget = new QWidget( this );
- ui.setupUi( widget );
-
- setMainWidget( widget );
- setCaption( i18n( "New feed" ) );
- setButtons( KDialog::Ok | KDialog::Cancel );
-}
-
-NetFeedCreateDialog::~NetFeedCreateDialog()
-{
-}
-
-void NetFeedCreateDialog::setResourceDescriptions( const QList<QPair<QString, \
QString> > &resourceDescriptions )
-{
- // for some unknown reason Q_FOREACH doesn't compile
- QListIterator<QPair<QString, QString> > it_description( resourceDescriptions );
- while ( it_description.hasNext() ) {
- QPair<QString, QString> description = it_description.next();
- ui.resourceCombo->addItem( description.second, description.first );
- }
-}
-
-QString NetFeedCreateDialog::url() const
-{
- return ui.urlEdit->text();
-}
-
-QString NetFeedCreateDialog::resourceIdentifier() const
-{
- return ui.resourceCombo->itemData( ui.resourceCombo->currentIndex() \
).toString();
-}
-
-QSize NetFeedCreateDialog::sizeHint() const
-{
- return QSize( 342, 72 );
-}
-
-#include "netfeedcreatedialog.moc"
diff --git a/krss/ui/netfeedcreatedialog.h b/krss/ui/netfeedcreatedialog.h
deleted file mode 100644
index 70753ce..0000000
--- a/krss/ui/netfeedcreatedialog.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- Copyright (C) 2008 Dmitry Ivanov <vonami@gmail.com>
-
- 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 2 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 KRSS_NETFEEDCREATEDIALOG_H
-#define KRSS_NETFEEDCREATEDIALOG_H
-
-#include "krss/krss_export.h"
-#include "ui_netfeedcreatedialog.h"
-
-#include <KDialog>
-
-namespace KRss {
-
-class KRSS_EXPORT NetFeedCreateDialog : public KDialog
-{
- Q_OBJECT
-
-public:
-
- explicit NetFeedCreateDialog( QWidget *parent = 0 );
- ~NetFeedCreateDialog();
-
- void setResourceDescriptions( const QList<QPair<QString, QString> > \
&resourceDescriptions );
-
- QString url() const;
- QString resourceIdentifier() const;
-
- QSize sizeHint() const;
-
-private:
-
- Ui::NetFeedCreateDialog ui;
-};
-
-} // namespace KRss
-
-#endif // KRSS_NETFEEDCREATEDIALOG_H
diff --git a/krss/ui/netfeedcreatedialog.ui b/krss/ui/netfeedcreatedialog.ui
deleted file mode 100644
index 0f90e1b..0000000
--- a/krss/ui/netfeedcreatedialog.ui
+++ /dev/null
@@ -1,62 +0,0 @@
-<ui version="4.0" >
- <class>NetFeedCreateDialog</class>
- <widget class="QWidget" name="NetFeedCreateDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>342</width>
- <height>72</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QFormLayout" name="formLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="urlLabel" >
- <property name="text" >
- <string>Feed url</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="KLineEdit" name="urlEdit" >
- <property name="clickMessage" >
- <string/>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="resourceLabel" >
- <property name="text" >
- <string>Resource</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="KComboBox" name="resourceCombo" />
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic