|
|
@ -23,7 +23,7 @@
|
|
|
|
#include <tqlabel.h>
|
|
|
|
#include <tqlabel.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <kservicegroup.h>
|
|
|
|
#include <kservicegroup.h>
|
|
|
|
#include <tqlayout.h>
|
|
|
|
#include <layout.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kcmultidialog.h>
|
|
|
|
#include <kcmultidialog.h>
|
|
|
|
#include <kdialogbase.h>
|
|
|
|
#include <kdialogbase.h>
|
|
|
@ -43,7 +43,7 @@ ModulesView::ModulesView( KCModuleMenu *rootMenu, const TQString &menuPath, TQWi
|
|
|
|
this->rootMenu = rootMenu;
|
|
|
|
this->rootMenu = rootMenu;
|
|
|
|
this->menuPath = menuPath;
|
|
|
|
this->menuPath = menuPath;
|
|
|
|
|
|
|
|
|
|
|
|
TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 11, 6, "tqlayout" );
|
|
|
|
TQVBoxLayout *layout = new TQVBoxLayout( this, 11, 6, "layout" );
|
|
|
|
|
|
|
|
|
|
|
|
displayName = this->rootMenu->caption;
|
|
|
|
displayName = this->rootMenu->caption;
|
|
|
|
|
|
|
|
|
|
|
@ -58,13 +58,13 @@ ModulesView::ModulesView( KCModuleMenu *rootMenu, const TQString &menuPath, TQWi
|
|
|
|
TQFrame *line = new TQFrame( this, "line");
|
|
|
|
TQFrame *line = new TQFrame( this, "line");
|
|
|
|
line->setFrameShadow( TQFrame::Sunken );
|
|
|
|
line->setFrameShadow( TQFrame::Sunken );
|
|
|
|
line->setFrameShape( TQFrame::HLine );
|
|
|
|
line->setFrameShape( TQFrame::HLine );
|
|
|
|
tqlayout->addWidget( line );
|
|
|
|
layout->addWidget( line );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Build the row of modules/icons
|
|
|
|
// Build the row of modules/icons
|
|
|
|
createRow( (*it).subMenu, tqlayout );
|
|
|
|
createRow( (*it).subMenu, layout );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tqlayout->addStretch(1);
|
|
|
|
layout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
|
|
// Make empty iconView for the search widget
|
|
|
|
// Make empty iconView for the search widget
|
|
|
|
if( groups.count()==0 ) {
|
|
|
|
if( groups.count()==0 ) {
|
|
|
@ -112,14 +112,14 @@ void ModulesView::createRow( const TQString &parentPath, TQBoxLayout *boxLayout
|
|
|
|
// Heaer Icon
|
|
|
|
// Heaer Icon
|
|
|
|
TQLabel *icon = new TQLabel( this, "groupicon" );
|
|
|
|
TQLabel *icon = new TQLabel( this, "groupicon" );
|
|
|
|
icon->setPixmap( SmallIcon( group->icon() ) );
|
|
|
|
icon->setPixmap( SmallIcon( group->icon() ) );
|
|
|
|
icon->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
|
|
|
|
icon->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
|
|
|
|
(TQSizePolicy::SizeType)5, 0, 0, icon->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
(TQSizePolicy::SizeType)5, 0, 0, icon->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
rowLayout->addWidget( icon );
|
|
|
|
rowLayout->addWidget( icon );
|
|
|
|
|
|
|
|
|
|
|
|
// Header Name
|
|
|
|
// Header Name
|
|
|
|
TQLabel *textLabel = new TQLabel( this, "groupcaption" );
|
|
|
|
TQLabel *textLabel = new TQLabel( this, "groupcaption" );
|
|
|
|
textLabel->setText( group->caption() );
|
|
|
|
textLabel->setText( group->caption() );
|
|
|
|
textLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7,
|
|
|
|
textLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7,
|
|
|
|
(TQSizePolicy::SizeType)5, 0, 0, textLabel->sizePolicy().hasHeightForWidth()));
|
|
|
|
(TQSizePolicy::SizeType)5, 0, 0, textLabel->sizePolicy().hasHeightForWidth()));
|
|
|
|
TQFont textLabel_font( textLabel->font() );
|
|
|
|
TQFont textLabel_font( textLabel->font() );
|
|
|
|
textLabel_font.setBold( true );
|
|
|
|
textLabel_font.setBold( true );
|
|
|
@ -160,7 +160,7 @@ void ModulesView::createRow( const TQString &parentPath, TQBoxLayout *boxLayout
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Force the height for those items that have two words.
|
|
|
|
// Force the height for those items that have two words.
|
|
|
|
iconView->setMinimumHeight( iconView->tqminimumSizeHint().height() );
|
|
|
|
iconView->setMinimumHeight( iconView->minimumSizeHint().height() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ModulesView::clearSelection() {
|
|
|
|
void ModulesView::clearSelection() {
|
|
|
|