Author: tgoettlicher
Date: Thu Feb 7 12:58:39 2008
New Revision: 44232
URL: http://svn.opensuse.org/viewcvs/yast?rev=44232&view=rev
Log:
removed kde deps
Modified:
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.h
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/main.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.h
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.cpp?rev=44232&r1=44231&r2=44232&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.cpp (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.cpp Thu Feb 7 12:58:39 2008
@@ -59,7 +59,7 @@
};
KCMultiWidget::KCMultiWidget(QWidget *parent, Qt::WindowModality modality)
- : KPageDialog( parent ),
+ : QDialog( parent ),
d( new KCMultiWidgetPrivate )
{
InitKIconDialog(i18n("Configure"), modality);
@@ -89,6 +89,7 @@
inline void KCMultiWidget::init()
{
+#ifdef tg
// A bit hackish: KCMultiWidget inherits from KPageDialog, but it really is
// a widget...
setWindowFlags(Qt::Widget);
@@ -112,6 +113,7 @@
connect( this, SIGNAL(applyClicked()), this, SLOT(slotApply()) );
connect( this, SIGNAL(resetClicked()), this, SLOT(slotReset()) );
connect( this, SIGNAL(user1Clicked()), this, SLOT(slotClose()) );
+#endif
}
KCMultiWidget::~KCMultiWidget()
@@ -167,9 +169,11 @@
void KCMultiWidget::slotOk()
{
+#ifdef tg
emit okClicked();
apply();
accept();
+#endif
}
void KCMultiWidget::slotHelp()
@@ -194,6 +198,7 @@
void KCMultiWidget::clientChanged(bool state)
{
+#ifdef tg
//kDebug( 710 ) << state;
foreach( const CreatedModule &it, m_modules )
if( it.kcm->changed() ) {
@@ -203,6 +208,7 @@
}
enableButton( Apply, false );
enableButton( Reset, false);
+#endif
}
void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo)
@@ -294,6 +300,7 @@
KCModuleProxy* KCMultiWidget::currentModule()
{
+#ifdef tg
KPageWidgetItem *pageWidget = currentPage();
if ( pageWidget == 0 )
return 0;
@@ -302,6 +309,7 @@
KCModuleProxy *module = qobject_cast( scrollArea->widget() );
return module;
+#endif
}
void KCMultiWidget::applyOrRevert(KCModuleProxy * module)
@@ -325,6 +333,8 @@
#endif
}
+#ifdef tg
+
void KCMultiWidget::slotAboutToShow(KPageWidgetItem* current, KPageWidgetItem* before)
{
if( before != 0 ) {
@@ -336,9 +346,11 @@
QWidget* sendingWidget = current->widget();
slotAboutToShow(sendingWidget);
}
+#endif
void KCMultiWidget::slotAboutToShow(QWidget *page)
{
+#ifdef tg
QList objects = page->findChildren();
// add fall back
@@ -385,21 +397,24 @@
// } else {
// enableButton( User2, false );
// }
+#endif
+
}
void KCMultiWidget::rootExit()
{
- enableButton( User2, true);
+//tg enableButton( User2, true);
}
void KCMultiWidget::disableRModeButton()
{
- enableButton( User2, false );
- connect ( currentModule(), SIGNAL( childClosed() ), SLOT( rootExit() ) );
+//tg enableButton( User2, false );
+//tg connect ( currentModule(), SIGNAL( childClosed() ), SLOT( rootExit() ) );
+
}
void KCMultiWidget::slotCancel() {
- dialogClosed();
+//tg dialogClosed();
}
void KCMultiWidget::dialogClosed()
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.h?rev=44232&r1=44231&r2=44232&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.h (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmultiwidget.h Thu Feb 7 12:58:39 2008
@@ -26,9 +26,11 @@
// Qt
#include
#include
+#include <QDialog>
+
// KDE
-#include
+//#include
//#include
#include "yservice.h"
@@ -39,7 +41,8 @@
* @short A method that offers a KDialog containing arbitrary
* Control Modules.
*/
-class /*KUTILS_EXPORT*/ KCMultiWidget : public KPageDialog
+//class /*KUTILS_EXPORT*/ KCMultiWidget : public KPageDialog
+class /*KUTILS_EXPORT*/ KCMultiWidget : public QDialog
{
Q_OBJECT
@@ -172,7 +175,7 @@
void slotAboutToShow(QWidget *);
- void slotAboutToShow(KPageWidgetItem* current, KPageWidgetItem* before);
+// void slotAboutToShow(KPageWidgetItem* current, KPageWidgetItem* before);
void clientChanged(bool state);
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/main.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/main.cpp?rev=44232&r1=44231&r2=44232&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/main.cpp (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/main.cpp Thu Feb 7 12:58:39 2008
@@ -19,11 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <KAboutData>
-#include <KCmdLineArgs>
#include <QIcon>
-#include <KLocale>
-#include <KUniqueApplication>
+#include <QApplication>
#include "mainwindow.h"
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.cpp?rev=44232&r1=44231&r2=44232&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.cpp (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/mainwindow.cpp Thu Feb 7 12:58:39 2008
@@ -31,24 +31,24 @@
#include <QScrollArea>
#include <QStackedWidget>
-#include <KAboutApplicationDialog>
-#include <KActionCollection>
-#include <KCModuleInfo>
-#include <KCModuleProxy>
-#include <KDebug>
-#include <KDialog> // for spacing
-#include <KGlobalSettings>
-#include <KIconLoader>
-#include <KLineEdit>
-#include <KLocale>
-#include <KMenuBar>
+//#include <KAboutApplicationDialog>
+//#include <KActionCollection>
+//#include <KCModuleInfo>
+#include "kcmoduleproxy.h"
+//#include <KDebug>
+//#include <KDialog> // for spacing
+//#include <KGlobalSettings>
+//#include <KIconLoader>
+#include <QLineEdit>
+//#include <KLocale>
+//#include <KMenuBar>
//#include <KServiceTypeTrader>
-#include <KStandardAction>
-#include <KTabWidget>
-#include <KToggleAction>
-#include <KToggleToolBarAction>
-#include <KToolBarSpacerAction>
-#include
+//#include <KStandardAction>
+//#include <KTabWidget>
+//#include <KToggleAction>
+//#include <KToggleToolBarAction>
+//#include <KToolBarSpacerAction>
+#include "kcategorizedsortfilterproxymodel.h"
#include "kcategorizedview.h"
#include "kcategorydrawer.h"
@@ -59,6 +59,7 @@
#include "yservice.h"
#include <iostream>
+#include <QAction>
Q_DECLARE_METATYPE(MenuItem *)
@@ -201,12 +202,12 @@
QString space;
space.fill( ' ', depth * 2 );
- kDebug() << space << "Looking for children in '" << parent->name << "'";
+// kDebug() << space << "Looking for children in '" << parent->name << "'";
for (int i = 0; i < categories.size(); ++i) {
YService::Ptr entry = categories.at(i);
QString parentCategory = entry->property("X-KDE-System-Settings-Parent-Category").toString();
QString category = entry->property("X-KDE-System-Settings-Category").toString();
- kDebug() << "Examining category " << parentCategory << "/" << category;
+// kDebug() << "Examining category " << parentCategory << "/" << category;
if ( parentCategory == parent->name ) {
MenuItem * menuItem = new MenuItem(true, parent);
menuItem->name = category;
@@ -219,7 +220,7 @@
for (int i = 0; i < modules.size(); ++i) {
YService::Ptr entry = modules.at(i);
QString category = entry->property("X-KDE-System-Settings-Parent-Category").toString();
- kDebug() << "Examining module " << category;
+// kDebug() << "Examining module " << category;
if(!parent->name.isEmpty() && category == parent->name ) {
// kDebug() << space << "found module '" << entry->name() << "' " << entry->desktopEntryPath();
MenuItem * infoItem = new MenuItem(false, parent);
@@ -253,7 +254,8 @@
KCategoryDrawer * drawer = new KCategoryDrawer;
KCategorizedView * tv = new KCategorizedView( this );
tv->setSelectionMode(QAbstractItemView::SingleSelection);
- tv->setSpacing(KDialog::spacingHint());
+//tg FIXME tv->setSpacing(KDialog::spacingHint());
+ tv->setSpacing(8);
tv->setCategoryDrawer( drawer );
tv->setViewMode( QListView::IconMode );
tv->setItemDelegate( new ModuleIconItemDelegate( this ) );
@@ -393,6 +395,7 @@
void MainWindow::aboutCurrentModule()
{
+#ifdef tg
if(!groupWidget) {
return;
}
@@ -402,6 +405,7 @@
KAboutApplicationDialog dlg( module->aboutData() );
dlg.exec();
}
+#endif
}
void MainWindow::groupModulesFinished()
@@ -424,10 +428,10 @@
search->setEnabled(true);
searchAction->setEnabled(true);
- KToggleAction *currentRadioAction;
+/*tg FIXME KToggleAction *currentRadioAction;
foreach ( currentRadioAction, pageActions ) {
currentRadioAction->setEnabled(true);
- }
+ } */
resetModuleHelp();
}
@@ -439,10 +443,12 @@
MenuItem * mItem = selected.data( Qt::UserRole ).value