Author: tgoettlicher
Date: Thu Feb 7 12:22:33 2008
New Revision: 44229
URL: http://svn.opensuse.org/viewcvs/yast?rev=44229&view=rev
Log:
removed kde deps
Removed:
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/version.h
Modified:
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.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
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/menuitem.cpp
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp?rev=44229&r1=44228&r2=44229&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp Thu Feb 7 12:22:33 2008
@@ -235,10 +235,10 @@
return realModule() ? realModule()->useRootOnlyMessage() : true;
}
-KComponentData KCModuleProxy::componentData() const
-{
- return realModule() ? realModule()->componentData() : KComponentData();
-}
+//KComponentData KCModuleProxy::componentData() const
+//{
+//tg return realModule() ? realModule()->componentData() : KComponentData();
+//}
bool KCModuleProxy::changed() const
{
Modified: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h?rev=44229&r1=44228&r2=44229&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h (original)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h Thu Feb 7 12:22:33 2008
@@ -162,7 +162,7 @@
* @return The module's KComponentData.
* @deprecated
*/
- KComponentData componentData() const;
+// KComponentData componentData() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via realModule()
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=44229&r1=44228&r2=44229&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:22:33 2008
@@ -26,12 +26,12 @@
#include <KUniqueApplication>
#include "mainwindow.h"
-#include "version.h"
#include <iostream>
int main( int argc, char *argv[] )
{
+#ifdef tg
KLocale::setMainCatalog("systemsettings");
// About data
KAboutData aboutData("systemsettings", 0, ki18n("System Settings"),
@@ -53,12 +53,13 @@
std::cerr << "This program is already running." << std::endl;
return 0;
}
- KUniqueApplication application;
+ KUniqueApplication application;
+#endif
+ QApplication application(argc, argv);
QApplication::setWindowIcon(QIcon("preferences-system"));
MainWindow *mainWindow = new MainWindow();
-
mainWindow->show();
return application.exec();
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=44229&r1=44228&r2=44229&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:22:33 2008
@@ -19,6 +19,10 @@
* Boston, MA 02110-1301, USA.
*/
+
+
+#define SINGLECLICK true
+
#include "mainwindow.h"
#include <QApplication>
@@ -54,26 +58,37 @@
#include "moduleiconitem.h"
#include "yservice.h"
+#include <iostream>
+
Q_DECLARE_METATYPE(MenuItem *)
-MainWindow::MainWindow(QWidget *parent) :
- KXmlGuiWindow(parent),
-// categories( KServiceTypeTrader::self()->query("SystemSettingsCategory") ),
-// modules( KServiceTypeTrader::self()->query("KCModule") ),
- rootItem(new MenuItem( true, 0 )),
- groupWidget(NULL), selectedPage(0) {
+MainWindow::MainWindow(QWidget *parent)
+// KXmlGuiWindow(parent),
+ : QMainWindow(parent)
+// , categories( KServiceTypeTrader::self()->query("SystemSettingsCategory") )
+// , modules( KServiceTypeTrader::self()->query("KCModule") )
+ , rootItem(new MenuItem( true, 0 ))
+ , groupWidget(NULL)
+ , selectedPage(0)
+{
// Load the menu structure in from disk.
+
readMenu( rootItem );
qStableSort( rootItem->children.begin(), rootItem->children.end(), pageLessThan ); // sort tabs by weight
- moduleTabs = new KTabWidget(this, QTabWidget::North|QTabWidget::Rounded);
+// moduleTabs = new KTabWidget(this, QTabWidget::North|QTabWidget::Rounded);
+ moduleTabs = new QTabWidget(this);
+ moduleTabs->setTabPosition(QTabWidget::North);
+ moduleTabs->setTabShape(QTabWidget::Rounded);
buildActions();
buildMainWidget();
- setupGUI(ToolBar|Save|Create,QString());
+ std::cerr << "here" << std::endl;
+// setupGUI(ToolBar|Save|Create,QString());
//widgetChange();
- menuBar()->hide();
+// menuBar()->hide();
connect(moduleTabs, SIGNAL(currentChanged(int)), SLOT(widgetChange()));
+
}
MainWindow::~MainWindow()
@@ -103,6 +118,11 @@
YService* entry = new YService;
entry->_name = "The World";
+ YService* entrya = new YService;
+ entrya->_name = "Unknown place";
+
+
+
YService* entry2 = new YService;
entry2->_name = "Franconia";
entry2->weight = 100;
@@ -132,15 +152,11 @@
entry8->_icon = "/usr/share/icons/hicolor/32x32/apps/yast.png";
-
-
-
MenuItem * menuItem = new MenuItem(true,parent);
menuItem->name = "new";
menuItem->service = entry;
-
MenuItem * menuItem2 = new MenuItem(false,menuItem);
menuItem2->name = "new";
menuItem2->service = entry2;
@@ -171,11 +187,16 @@
menuItem6->name = "new";
menuItem6->service = entry6;
+ MenuItem * menuItema = new MenuItem(true,parent);
+ menuItema->name = "new";
+ menuItema->service = entrya;
+
// tg new menu
+#ifdef tg
QString space;
@@ -210,7 +231,7 @@
}
}
-
+#endif
}
void MainWindow::closeEvent ( QCloseEvent * )
@@ -248,15 +269,17 @@
connect( tv,
SIGNAL(activated(const QModelIndex&)),
SLOT(selectionChanged(const QModelIndex&)) );
- if (KGlobalSettings::singleClick()) {
+
+
+ if (SINGLECLICK) {
connect( tv, SIGNAL(clicked(const QModelIndex&)),
SLOT(selectionChanged(const QModelIndex&)));
} else {
connect( tv, SIGNAL(doubleClicked(const QModelIndex&)),
SLOT(selectionChanged(const QModelIndex&)));
}
- connect( search, SIGNAL(textChanged(const QString&)),
- kcsfpm, SLOT(setFilterRegExp(const QString&)));
+//tg FIXME connect( search, SIGNAL(textChanged(const QString&)),
+//tg FIXME kcsfpm, SLOT(setFilterRegExp(const QString&)));
connect( kcsfpm, SIGNAL(layoutChanged()),
SLOT(updateSearchHits()) );
moduleTabs->addTab(tv, item->service->name() );
@@ -274,6 +297,8 @@
void MainWindow::buildActions()
{
+#ifdef tg
+
addAction(actionCollection()->addAction(KStandardAction::Quit, qobject_cast