[yast-commit] r44081 - /branches/tmp/tgoettlicher/yast2cc_rewrite/src/
![](https://seccdn.libravatar.org/avatar/f850d49374387219fe79b9ca562f7803.jpg?s=120&d=mm&r=g)
Author: tgoettlicher Date: Thu Jan 31 17:15:20 2008 New Revision: 44081 URL: http://svn.opensuse.org/viewcvs/yast?rev=44081&view=rev Log: (empty) Removed: branches/tmp/tgoettlicher/yast2cc_rewrite/src/systemsettings.desktop branches/tmp/tgoettlicher/yast2cc_rewrite/src/systemsettingsrc branches/tmp/tgoettlicher/yast2cc_rewrite/src/systemsettingsui.rc Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/CMakeLists.txt branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorydrawer.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/kicongrouppage.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/modulesview.cpp Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/CMakeLists.txt (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/CMakeLists.txt Thu Jan 31 17:15:20 2008 @@ -30,6 +30,7 @@ kcategorizedsortfilterproxymodel.h moduleiconitem.h kcmoduleinfo.h +kcategorizedview_p.h ) #SET(yast2-control-center_RCCS ../files.qrc) @@ -43,7 +44,7 @@ QT4_ADD_RESOURCES(yast2-control-center_RCC_SRCS ${yast2-control-center_RCCS}) -ADD_DEFINITIONS(-DQT_NO_DEBUG) +#ADD_DEFINITIONS(-DQT_NO_DEBUG) ADD_EXECUTABLE(yast2-control-center ${yast2-control-center_SRCS} ${yast2-control-center_MOC} ${yast2-control-center_RCC_SRCS}) Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.cpp Thu Jan 31 17:15:20 2008 @@ -25,6 +25,7 @@ #include "kcategorizedsortfilterproxymodel_p.h" #include <limits.h> +#include <iostream> #include <QItemSelection> #include <QStringList> Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp Thu Jan 31 17:15:20 2008 @@ -27,6 +27,7 @@ #include <QPainter> #include <QScrollBar> #include <QPaintEvent> +#include <iostream> //#include <kstyle.h> @@ -391,6 +392,8 @@ const QStyleOption &option, QPainter *painter) { + std::cout << "KCategorizedView::Private::drawNewCategory" << std::endl; + if (!index.isValid()) { return; @@ -730,9 +733,13 @@ void KCategorizedView::paintEvent(QPaintEvent *event) { + + std::cout << "KCategorizedView::paintEvent" << std::endl; + if (!d->proxyModel || !d->categoryDrawer || !d->proxyModel->isCategorizedModel()) { QListView::paintEvent(event); + std::cout << "..return" << std::endl; return; } @@ -801,6 +808,8 @@ bool intersectedInThePast = false; foreach (const QString &category, d->categories) { + + std::cout << "..Redraw cat (foreach)" << std::endl; otherOption = option; otherOption.rect = d->categoryVisualRect(category); otherOption.state &= ~QStyle::State_MouseOver; Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorydrawer.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorydrawer.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorydrawer.cpp Thu Jan 31 17:15:20 2008 @@ -22,6 +22,8 @@ #include <QPainter> #include <QStyleOption> +#include <iostream> + //#include <kiconloader.h> #include "kcategorizedsortfilterproxymodel.h" @@ -41,6 +43,8 @@ { const QString category = index.model()->data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole).toString(); + std::cout << "KCategoryDrawer::drawCategory" << std::endl; + QColor color; if (option.state & QStyle::State_Selected) Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp Thu Jan 31 17:15:20 2008 @@ -31,6 +31,8 @@ //#include <kstandarddirs.h> //#include <klocale.h> +#include <iostream> + class KCModuleInfo::Private { public: @@ -51,29 +53,38 @@ void loadAll(); }; -KCModuleInfo::Private::Private() -{ -} +//KCModuleInfo::Private::Private() +//{ +//} -/*KCModuleInfo::Private::Private( KService::Ptr s ) +//KCModuleInfo::Private::Private( KService::Ptr s ) +KCModuleInfo::Private::Private( ) : allLoaded( false ) - , service( s ) +// , service( s ) { - if ( !service ) - { - kDebug(712) << "Could not find the service."; - return; - } +// if ( !service ) +// { +// kDebug(712) << "Could not find the service."; +// return; +// } // set the modules simple attributes - name = service->name(); +/* name = service->name(); comment = service->comment(); icon = service->icon(); fileName = service->entryPath(); lib = service->library(); - keywords = service->keywords(); + keywords = service->keywords(); */ + + name = "name"; + comment = "comment"; + icon = "icon"; + fileName = "fileName"; + lib = "lib"; + keywords = QStringList("keywords"); + + } -*/ KCModuleInfo::KCModuleInfo() { @@ -83,6 +94,7 @@ KCModuleInfo::KCModuleInfo(const QString& desktopFile) { // d = new Private( KService::serviceByStorageId(desktopFile) ); + d = new Private( ); } //KCModuleInfo::KCModuleInfo( KService::Ptr moduleInfo ) Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp Thu Jan 31 17:15:20 2008 @@ -22,9 +22,12 @@ #include <QHash> #include <QList> +#include <QStringList> #include "kcategorizedsortfilterproxymodel.h" #include "menuitem.h" +#include <iostream> + Q_DECLARE_METATYPE(MenuItem *) @@ -62,7 +65,7 @@ // if ( mItem->children.isEmpty() && mItem->service->serviceTypes().contains("SystemSettingsCategory" ) ) { // return false; // } else { -// return KCategorizedSortFilterProxyModel::filterAcceptsRow( source_row, source_parent ); + return KCategorizedSortFilterProxyModel::filterAcceptsRow( source_row, source_parent ); // } } @@ -152,18 +155,28 @@ QVariant KCModuleModel::data(const QModelIndex &index, int role) const { + +///TG////////// + + return(QString("data")); + +///TG////////// + +/* + + MenuItem * mi = 0; QVariant theData; if ( !index.isValid() ) { return QVariant(); } mi = static_cast<MenuItem *>( index.internalPointer() ); -// QStringList searchKeyWords; + QStringList searchKeyWords; switch ( role ) { case Qt::DisplayRole: switch ( index.column() ) { case 0: -// theData.setValue( mi->service->name()); + theData.setValue( mi->service->name()); break; case 1: @@ -201,7 +214,14 @@ default: break; } + + theData.setValue(QString("Test")); + return theData; + +*/ + + } Qt::ItemFlags KCModuleModel::flags(const QModelIndex &index) const Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kicongrouppage.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kicongrouppage.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kicongrouppage.cpp Thu Jan 31 17:15:20 2008 @@ -22,6 +22,8 @@ #include <QtAlgorithms> #include <QStyle> +#include <iostream> + #include "kicongrouppage.h" Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp Thu Jan 31 17:15:20 2008 @@ -10,23 +10,33 @@ #include "kcmodulemodel.h" #include "kcategorydrawer.h" #include "moduleiconitem.h" +#include <iostream> MainWindow::MainWindow() : QMainWindow() { + std::cout << "MainWindow::MainWindow()" << std::endl; QWidget *centralWidget = new QWidget; setCentralWidget(centralWidget); + QHBoxLayout *layout = new QHBoxLayout; + centralWidget->setLayout(layout); MenuItem *rootItem = new MenuItem(true, 0); - MenuItem *first = new MenuItem(false, rootItem); - first->name="hi"; - first->caption="hallo"; + MenuItem * kat = new MenuItem(true, rootItem); + kat->name = "Kat"; + + MenuItem *mod = new MenuItem(false, kat); + mod->name="hi"; + mod->caption="hallo"; + + KCModuleModel *model; -// foreach ( MenuItem* item, rootItem->children ) { - KCModuleModel *model = new KCModuleModel( first, this ); + + foreach ( MenuItem* item, rootItem->children ) { + model = new KCModuleModel( item, this ); KCategoryDrawer * drawer = new KCategoryDrawer; KCategorizedView * tv = new KCategorizedView( this ); tv->setSelectionMode(QAbstractItemView::SingleSelection); @@ -44,11 +54,14 @@ kcsfpm->sort( 0 ); tv->setModel( kcsfpm ); + layout->addWidget(tv); +} - QHBoxLayout *layout = new QHBoxLayout; - centralWidget->setLayout(layout); - layout->addWidget(tv); + + + +// layout->addWidget(tv); } Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp Thu Jan 31 17:15:20 2008 @@ -19,6 +19,8 @@ */ #include "menuitem.h" +#include <iostream> + MenuItem::MenuItem( bool isMenu, MenuItem * itsParent ) : parent( itsParent ), Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp Thu Jan 31 17:15:20 2008 @@ -28,6 +28,8 @@ #include <qapplication.h> #include <qpainter.h> +#include <iostream> + #define IMAGE_SIZE 32 #define ICON_WIDTH 100 Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/modulesview.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewri... ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/modulesview.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/modulesview.cpp Thu Jan 31 17:15:20 2008 @@ -32,6 +32,8 @@ #include "kcmsearch.h" #include "moduleiconitem.h" #include "kcmodulemenu.h" +#include <iostream> + ModulesView::ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidget *parent ) : QWidget( parent ), rootMenu( NULL ) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
tgoettlicher@svn.opensuse.org