/* * This creates a Tab OCR */ void KOCRBase::ocrIntro( ) { m_ocrPage = addVBoxPage( i18n("OCR") ); // Caption - Label and image /* labelstring */ (void) new QLabel( i18n("<b>Starting Optical Character Recognition with %1</b><p>"). arg( ocrEngineName() ), m_ocrPage ); // Find the kadmos logo and display if available KStandardDirs stdDir; QString logo = stdDir.findResource( "data", "kooka/pics/" + ocrEngineLogo() ); kdDebug(28000)<< "Reading logo " << logo << endl; QPixmap pix; QWidget *pa = m_ocrPage; if( pix.load( logo )) { QHBox *hb_cap = new QHBox( m_ocrPage ); hb_cap->setSpacing( KDialog::spacingHint()); QLabel *imgLab = new QLabel( hb_cap ); imgLab->setAlignment( Qt::AlignHCenter | Qt::AlignTop ); imgLab->setPixmap( pix ); pa = hb_cap; } (void) new KActiveLabel( ocrEngineDesc(), pa ); }
ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal ) : KScanDialog( Tabbed, Close|Help, parent, name, modal ), good_scan_connect(false) { QVBox *page = addVBoxPage( i18n("&Scanning") ); splitter = new QSplitter( Horizontal, page, "splitter" ); Q_CHECK_PTR( splitter ); m_scanParams = 0; m_device = new KScanDevice( this ); connect(m_device, SIGNAL(sigNewImage(QImage *, ImgScanInfo*)), this, SLOT(slotFinalImage(QImage *, ImgScanInfo *))); connect( m_device, SIGNAL(sigScanStart(const ImgScanInfo *)), this, SLOT(slotScanStart())); connect( m_device, SIGNAL(sigScanFinished(KScanStat)), this, SLOT(slotScanFinished(KScanStat))); connect( m_device, SIGNAL(sigAcquireStart()), this, SLOT(slotAcquireStart())); /* Create a preview widget to the right side of the splitter */ m_previewer = new Previewer( splitter ); Q_CHECK_PTR(m_previewer ); /* ... and connect to the selector-slots. They communicate user's * selection to the scanner parameter engine */ /* a new preview signal */ connect( m_device, SIGNAL( sigNewPreview( QImage*, ImgScanInfo* )), this, SLOT( slotNewPreview( QImage* ))); m_previewer->setEnabled( false ); // will be enabled in setup() /* Options-page */ createOptionsTab( ); }
void KOCRBase::spellCheckIntro() { m_spellchkPage = addVBoxPage( i18n("Spell-checking") ); /* Want the spell checking at all? Checkbox here */ QGroupBox *gb1 = new QGroupBox( 1, Qt::Horizontal, i18n("OCR Post Processing"), m_spellchkPage ); m_cbWantCheck = new QCheckBox( i18n("Enable spell-checking for validation of the OCR result"), gb1 ); /* Spellcheck options */ m_gbSpellOpts = new QGroupBox( 1, Qt::Horizontal, i18n("Spell-Check Options"), m_spellchkPage ); KSpellConfig *sCfg = new KSpellConfig( m_gbSpellOpts, "SPELLCHK", m_spellConfig, false ); /* A space eater */ QWidget *spaceEater = new QWidget(m_spellchkPage); spaceEater->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored )); /* connect toggle button */ connect( m_cbWantCheck, SIGNAL(toggled(bool)), this, SLOT(slWantSpellcheck(bool))); m_cbWantCheck->setChecked( m_userWantsSpellCheck ); m_gbSpellOpts->setEnabled( m_userWantsSpellCheck ); m_spellConfig = sCfg; connect( sCfg, SIGNAL(configChanged()), this, SLOT(slSpellConfigChanged())); }
void KasAboutDialog::addInfoPage() { TQVBox *aboutPage = addVBoxPage( i18n("About"), i18n("About Kasbar"), Icon( "appearance" ) ); aboutPage->setSpacing( spacingHint() ); new TQLabel( i18n( "<qt><body>" "<h2>Kasbar Version: %1</h2>" "<b>KDE Version:</b> %2" "</body></qt>" ) .arg( VERSION_STRING ).arg( TDE_VERSION_STRING ), aboutPage ); KTextBrowser *text5 = new KTextBrowser( aboutPage ); text5->setText( i18n( "<html><body>" "<p>Kasbar TNG began as a port of the original Kasbar applet to " "the (then new) extension API, but ended up as a complete " "rewrite because of the range of features needed by different " "groups of users. In the process of the rewrite all the standard " "features provided by the default taskbar were added, along with " "some more original ones such as thumbnails." "</p>" "<p>" "You can find information about the latest developments in Kasbar at " "<a href=\"%3\">%4</a>, the Kasbar homepage." "</p>" "</body></html>" ) .arg( HOMEPAGE_URL ).arg( HOMEPAGE_URL ) ); text5->setWordWrap( TQTextEdit::WidgetWidth ); }
void KasPrefsDialog::addIndicatorsPage() { TQVBox *indicatorsPage = addVBoxPage( i18n("Indicators"), TQString::null, Icon( "bell" ) ); (void) new TQWidget( indicatorsPage, "spacer" ); (void) new TQWidget( indicatorsPage, "spacer" ); }
void KasAboutDialog::addAuthorsPage() { TQVBox *authorsPage = addVBoxPage( i18n("Authors"), i18n("Kasbar Authors"), Icon( "kuser" ) ); KTextBrowser *text = new KTextBrowser( authorsPage ); text->setText( i18n( "<html>" "<b>Richard Moore</b> <a href=\"mailto:[email protected]\">[email protected]</a><br>" "<b>Homepage:</b> <a href=\"http://xmelegance.org/\">http://xmelegance.org/</a>" "<p>Developer and maintainer of the Kasbar TNG code.</p>" "<hr/>" "<b>Daniel M. Duley (Mosfet)</b> <a href=\"mailto:[email protected]\">[email protected]</a><br>" "<b>Homepage:</b> <a href=\"http://www.mosfet.org/\">http://www.mosfet.org/</a>" "<p>Mosfet wrote the original Kasbar applet on which this " "extension is based. There is little of the original code " "remaining, but the basic look in opaque mode is almost " "identical to this first implementation.</p>" "</html>" ) ); text->setWordWrap( TQTextEdit::WidgetWidth ); }
void KasPrefsDialog::addBehavePage() { TQVBox *behavePage = addVBoxPage( i18n("Behavior"), TQString::null, Icon( "window_list" ) ); groupWindowsCheck = new TQCheckBox( i18n("&Group windows"), behavePage ); TQWhatsThis::add( groupWindowsCheck, i18n( "Enables the grouping together of related windows." ) ); groupWindowsCheck->setChecked( kasbar->groupWindows() ); connect( groupWindowsCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setGroupWindows(bool) ) ); showAllWindowsCheck = new TQCheckBox( i18n("Show all &windows"), behavePage ); TQWhatsThis::add( showAllWindowsCheck, i18n( "Enables the display of all windows, not just those on the current desktop." ) ); showAllWindowsCheck->setChecked( kasbar->showAllWindows() ); connect( showAllWindowsCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setShowAllWindows(bool) ) ); groupInactiveCheck = new TQCheckBox( i18n("&Group windows on inactive desktops"), behavePage ); TQWhatsThis::add( groupInactiveCheck, i18n( "Enables the grouping together of windows that are not on the current desktop." ) ); groupInactiveCheck->setChecked( kasbar->groupInactiveDesktops() ); connect( groupInactiveCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setGroupInactiveDesktops(bool) ) ); onlyShowMinimizedCheck = new TQCheckBox( i18n("Only show &minimized windows"), behavePage ); TQWhatsThis::add( onlyShowMinimizedCheck, i18n( "When this option is checked only minimized windows are shown in the bar. " \ "This gives Kasbar similar behavior to the icon handling in older environments " \ "like CDE or OpenLook." ) ); onlyShowMinimizedCheck->setChecked( kasbar->onlyShowMinimized() ); connect( onlyShowMinimizedCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setOnlyShowMinimized(bool) ) ); (void) new TQWidget( behavePage, "spacer" ); (void) new TQWidget( behavePage, "spacer" ); }
void KasAboutDialog::addGPLPage() { TQVBox *gplPage = addVBoxPage( i18n("GPL License"), TQString::null, Icon( "filefind" ) ); new TQLabel( i18n( "Kasbar may be used under the terms of either the BSD license, " "or the GNU Public License." ), gplPage ); KTextBrowser *text3 = new KTextBrowser( gplPage ); text3->setText( "Some more text of unsurpassed tediousness goes here." ); text3->setWordWrap( TQTextEdit::NoWrap ); TQString gplFile = locate("data", "LICENSES/GPL_V2"); if ( !gplFile.isEmpty() ) { TQString result; TQFile file( gplFile ); if ( file.open( IO_ReadOnly ) ) { TQTextStream str(&file); result += str.read(); } text3->setText( result ); } }
TQVBox *KJanusWidget::addVBoxPage( const TQString &itemName, const TQString &header, const TQPixmap &pixmap ) { TQStringList items; items << itemName; return addVBoxPage(items, header, pixmap); }
ConfigDlg::ConfigDlg(QWidget *parent, const char *name) : KDialogBase(IconList, i18n("Configuration"), Ok|Cancel, Ok, parent, name, true) { QVBox *page1 = addVBoxPage(i18n("Personal"), i18n("Personal Settings"), DesktopIcon("kdmconfig")); m_general = new ConfGeneral(page1, "Personal"); QVBox *page2 = addVBoxPage(i18n("Page setup"), i18n("Page Setup"), DesktopIcon("editcopy")); m_fax = new ConfFax(page2, "Fax"); QVBox *page3 = addVBoxPage(i18n("System"), i18n("Fax System Selection"), DesktopIcon("kdeprintfax")); m_system = new ConfSystem(page3, "System"); QVBox *page4 = addVBoxPage(i18n("Filters"), i18n("Filters Configuration"), DesktopIcon("filter")); m_filters = new ConfFilters(page4, "Filters"); resize(450, 300); }
ConfigDlg::ConfigDlg(QWidget *parent, const char *name) : KDialogBase(KDialogBase::TreeList, WStyle_DialogBorder, parent, name, true, "Settings", KDialogBase::Ok|KDialogBase::Cancel) { setShowIconsInTreeList(true); setMinimumSize(600,400); enableButtonSeparator(true); unfoldTreeList(); QVBox *frame; QStringList path; path << i18n("Languages"); setFolderIcon(path, BarIcon("protoeditor", KIcon::SizeSmall)); QValueList<LanguageSettings*> llist = Protoeditor::self()->settings()->languageSettingsList(); QValueList<LanguageSettings*>::iterator it; for(it = llist.begin(); it != llist.end(); ++it) { path.clear(); path << i18n("Languages") << (*it)->languageName(); frame = addVBoxPage(path, (*it)->languageName(), BarIcon((*it)->iconName(), KIcon::SizeSmall)); frame->setSpacing(0); frame->setMargin(0); m_langSettingsWidgets.append((*it)->createSettingsWidget(frame)); } path.clear(); path << i18n("Sites"); frame= addVBoxPage(path, i18n("Sites"), BarIcon("package_network", KIcon::SizeSmall)); frame->setSpacing(0); frame->setMargin(0); m_siteSettingsWidget = new SiteSettingsWidget(frame);//->reparent(((QWidget*)frame), 0, QPoint()); path.clear(); path << i18n("External Applications"); frame = addVBoxPage(path, i18n("External Applications"), BarIcon("gear", KIcon::SizeSmall)); frame->setSpacing(0); frame->setMargin(0); m_extAppSettingsWidget = new ExtAppSettingsWidget(frame, i18n("External Applications"));//->reparent(((QWidget*)frame), 0, QPoint()); resize(QSize(590, 300).expandedTo(minimumSizeHint())); }
QVBox* KGameDialog::addConfigPage(KGameDialogConfig* widget, const QString& title) { if (!widget) { kdError(11001) << "Cannot add NULL config widget" << endl; return 0; } QVBox* page = addVBoxPage(title); addConfigWidget(widget, page); return page; }
EditFunction::EditFunction( XParser* parser, QWidget* parent, const char* name ) : KDialogBase( IconList, "Caption", Help|Ok|Cancel, Ok, parent, name ), m_parser(parser) { QVBox *page0 = addVBoxPage( i18n("Function"), i18n( "Function" ), SmallIcon( "func", 32 ) ); editfunctionpage = new EditFunctionPage( page0 ); QVBox *page1 = addVBoxPage( i18n("Derivatives"), i18n( "Derivatives" ), SmallIcon( "deriv_func", 32 ) ); editderivativespage = new EditDerivativesPage( page1 ); QVBox *page2 = addVBoxPage( i18n("Integral"), i18n( "Integral" ), SmallIcon( "integral_func", 32 ) ); editintegralpage = new EditIntegralPage( page2 ); for( int number = 0; number < SLIDER_COUNT; number++ ) { editfunctionpage->listOfSliders->insertItem( i18n( "Slider No. %1" ).arg( number +1) ); } connect( editfunctionpage->cmdParameter, SIGNAL ( clicked() ), this, SLOT( cmdParameter_clicked() ) ); connect( editfunctionpage->useNoParameter, SIGNAL ( toggled(bool) ), this, SLOT( noParameter_toggled(bool) ) ); connect( editfunctionpage->customMinRange, SIGNAL ( toggled(bool) ), this, SLOT( customMinRange_toggled(bool) ) ); connect( editfunctionpage->customMaxRange, SIGNAL ( toggled(bool) ), this, SLOT( customMaxRange_toggled(bool) ) ); m_updatedfunction = 0; }
PreferencesDialog::PreferencesDialog(KFileItemList media, QWidget *parent, const char *name) : KDialogBase(Tabbed, i18n("Media Applet Preferences"), Ok | Cancel | Default, Ok, parent, name, true), mMedia(media) { QVBox *types_page = addVBoxPage(i18n("Medium Types")); mpMediumTypesListView = new KListView(types_page); // mpMediumTypesListView->setFullWidth(true); mpMediumTypesListView->addColumn(i18n("Types to Display")); QWhatsThis::add(mpMediumTypesListView, i18n("Deselect the medium types which you do not want to see in the applet")); QVBox *media_page = addVBoxPage(i18n("Media")); mpMediaListView = new KListView(media_page); // mpMediaListView->setFullWidth(true); mpMediaListView->addColumn(i18n("Media to Display")); QWhatsThis::add(mpMediaListView, i18n("Deselect the media which you do not want to see in the applet")); slotDefault(); }
void KasPrefsDialog::addBackgroundPage() { TQVBox *bgPage = addVBoxPage( i18n("Background"), TQString::null, Icon( "background" ) ); transCheck = new TQCheckBox( i18n("Trans&parent"), bgPage ); TQWhatsThis::add( transCheck, i18n( "Enables pseudo-transparent mode." ) ); transCheck->setChecked( kasbar->isTransparent() ); connect( transCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setTransparent(bool) ) ); tintCheck = new TQCheckBox( i18n("Enable t&int"), bgPage ); TQWhatsThis::add( tintCheck, i18n( "Enables tinting the background that shows through in transparent mode." ) ); tintCheck->setChecked( kasbar->hasTint() ); connect( tintCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setTint(bool) ) ); TQHBox *tintColBox = new TQHBox( bgPage ); TQWhatsThis::add( tintColBox, i18n( "Specifies the color used for the background tint." ) ); connect( tintCheck, TQT_SIGNAL( toggled(bool) ), tintColBox, TQT_SLOT( setEnabled(bool) ) ); tintColBox->setEnabled( kasbar->hasTint() ); TQLabel *tintLabel = new TQLabel( i18n("Tint &color:"), tintColBox ); tintButton = new KColorButton( kasbar->tintColor(), tintColBox ); connect( tintButton, TQT_SIGNAL( changed( const TQColor & ) ), kasbar, TQT_SLOT( setTintColor( const TQColor & ) ) ); tintLabel->setBuddy( tintButton ); TQHBox *tintAmtBox = new TQHBox( bgPage ); TQWhatsThis::add( tintAmtBox, i18n( "Specifies the strength of the background tint." ) ); connect( tintCheck, TQT_SIGNAL( toggled(bool) ), tintAmtBox, TQT_SLOT( setEnabled(bool) ) ); tintAmtBox->setEnabled( kasbar->hasTint() ); TQLabel *tintStrengthLabel = new TQLabel( i18n("Tint &strength: "), tintAmtBox ); int percent = (int) (kasbar->tintAmount() * 100.0); tintAmount = new TQSlider( 0, 100, 1, percent, Qt::Horizontal, tintAmtBox ); tintAmount->setTracking( true ); connect( tintAmount, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( setTintAmount( int ) ) ); tintStrengthLabel->setBuddy( tintAmount ); (void) new TQWidget( bgPage, "spacer" ); (void) new TQWidget( bgPage, "spacer" ); (void) new TQWidget( bgPage, "spacer" ); }
void KasPrefsDialog::addThumbsPage() { TQVBox *thumbsPage = addVBoxPage( i18n("Thumbnails"), TQString::null, Icon( "icons" ) ); thumbsCheck = new TQCheckBox( i18n("Enable thu&mbnails"), thumbsPage ); TQWhatsThis::add( thumbsCheck, i18n( "Enables the display of a thumbnailed image of the window when " "you move your mouse pointer over an item. The thumbnails are " "approximate, and may not reflect the current window contents.\n\n" "Using this option on a slow machine may cause performance problems." ) ); thumbsCheck->setChecked( kasbar->thumbnailsEnabled() ); connect( thumbsCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setThumbnailsEnabled(bool) ) ); embedThumbsCheck = new TQCheckBox( i18n("&Embed thumbnails"), thumbsPage ); embedThumbsCheck->setChecked( kasbar->embedThumbnails() ); connect( embedThumbsCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setEmbedThumbnails(bool) ) ); TQHBox *thumbSizeBox = new TQHBox( thumbsPage ); TQWhatsThis::add( thumbSizeBox, i18n( "Controls the size of the window thumbnails. Using large sizes may " "cause performance problems." ) ); TQLabel *thumbSizeLabel = new TQLabel( i18n("Thumbnail &size: "), thumbSizeBox ); int percent = (int) (kasbar->thumbnailSize() * 100.0); thumbSizeSlider = new TQSlider( 0, 100, 1, percent, Qt::Horizontal, thumbSizeBox ); connect( thumbSizeSlider, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( setThumbnailSize( int ) ) ); thumbSizeLabel->setBuddy( thumbSizeSlider ); TQHBox *thumbUpdateBox = new TQHBox( thumbsPage ); thumbUpdateBox->setSpacing( spacingHint() ); TQWhatsThis::add( thumbUpdateBox, i18n( "Controls the frequency with which the thumbnail of the active window " "is updated. If the value is 0 then no updates will be performed.\n\n" "Using small values may cause performance problems on slow machines." ) ); TQLabel *thumbUpdateLabel = new TQLabel( i18n("&Update thumbnail every: "), thumbUpdateBox ); thumbUpdateSpin = new TQSpinBox( 0, 1000, 1, thumbUpdateBox ); thumbUpdateSpin->setValue( kasbar->thumbnailUpdateDelay() ); connect( thumbUpdateSpin, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( setThumbnailUpdateDelay( int ) ) ); (void) new TQLabel( i18n("seconds"), thumbUpdateBox ); thumbUpdateLabel->setBuddy( thumbUpdateSpin ); (void) new TQWidget( thumbsPage, "spacer" ); (void) new TQWidget( thumbsPage, "spacer" ); (void) new TQWidget( thumbsPage, "spacer" ); }
void KonviConfigDialog::addPageInternal(QWidget *page, const QStringList &items, const QString &pixmapName, const QString &header) { if(d->shown) { kdDebug(240) << "KonviConfigDialog::addPage: can not add a page after the dialog has been shown."; return; } switch(d->type) { case TreeList: case IconList: case Tabbed: { QVBox *frame = addVBoxPage(items, header, SmallIcon(pixmapName, 16)); frame->setSpacing( 0 ); frame->setMargin( 0 ); page->reparent(((QWidget*)frame), 0, QPoint()); m_lastAddedIndex = pageIndex(frame); } break; case Swallow: { page->reparent(this, 0, QPoint()); setMainWidget(page); } break; case Plain: { QFrame *main = plainPage(); QVBoxLayout *topLayout = new QVBoxLayout( main, 0, 0 ); page->reparent(((QWidget*)main), 0, QPoint()); topLayout->addWidget( page ); } break; default: kdDebug(240) << "KonviConfigDialog::addpage: unknown type."; } }
void KateConfigDialog::addPluginPage (Kate::Plugin *plugin) { if (!Kate::pluginConfigInterfaceExtension(plugin)) return; for (uint i=0; i<Kate::pluginConfigInterfaceExtension(plugin)->configPages(); i++) { TQStringList path; path.clear(); path << i18n("Application")<<i18n("Plugins") << Kate::pluginConfigInterfaceExtension(plugin)->configPageName(i); TQVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, TDEIcon::SizeSmall)); PluginPageListItem *info=new PluginPageListItem; info->plugin = plugin; info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page); connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); pluginPages.append(info); } }
void KasPrefsDialog::addAdvancedPage() { TQVBox *advancedPage = addVBoxPage( i18n("Advanced"), TQString::null, Icon( "misc" ) ); // Startup notifier notifierCheck = new TQCheckBox( i18n("Enable &startup notifier"), advancedPage ); TQWhatsThis::add( notifierCheck, i18n( "Enables the display of tasks that are starting but have not yet " "created a window." ) ); notifierCheck->setChecked( kasbar->notifierEnabled() ); connect( notifierCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setNotifierEnabled(bool) ) ); // Status advanced modifiedCheck = new TQCheckBox( i18n("Enable &modified indicator"), advancedPage ); TQWhatsThis::add( modifiedCheck, i18n( "Enables the display of a floppy disk state icon for windows containing " "a modified document." ) ); modifiedCheck->setChecked( kasbar->showModified() ); connect( modifiedCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setShowModified(bool) ) ); progressCheck = new TQCheckBox( i18n("Enable &progress indicator"), advancedPage ); TQWhatsThis::add( progressCheck, i18n( "Enables the display of a progress bar in the label of windows show " "are progress indicators." ) ); progressCheck->setChecked( kasbar->showProgress() ); connect( progressCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setShowProgress(bool) ) ); attentionCheck = new TQCheckBox( i18n("Enable &attention indicator"), advancedPage ); TQWhatsThis::add( attentionCheck, i18n( "Enables the display of an icon that indicates a window that needs attention." ) ); attentionCheck->setChecked( kasbar->showAttention() ); connect( attentionCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setShowAttention(bool) ) ); inactiveFramesCheck = new TQCheckBox( i18n("Enable frames for inactive items"), advancedPage ); TQWhatsThis::add( inactiveFramesCheck, i18n( "Enables frames around inactive items, if you want the bar to disappear into " \ "the background you should probably uncheck this option." ) ); inactiveFramesCheck->setChecked( kasbar->paintInactiveFrames() ); connect( inactiveFramesCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setPaintInactiveFrames(bool) ) ); (void) new TQWidget( advancedPage, "spacer" ); (void) new TQWidget( advancedPage, "spacer" ); }
void ScanDialog::createOptionsTab( void ) { QVBox *page = addVBoxPage( i18n("&Options")); setMainWidget(page); QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" ); QLabel *label = new QLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ), gb ); label->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed ) ); /* Checkbox for asking for scanner on startup */ cb_askOnStart = new QCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb ); QToolTip::add( cb_askOnStart, i18n("You can uncheck this if you do not want to be asked which scanner to use on startup.")); Q_CHECK_PTR( cb_askOnStart ); /* Checkbox for network access */ cb_network = new QCheckBox( i18n( "&Query the network for scan devices"), gb ); QToolTip::add( cb_network, i18n("Check this if you want to query for configured network scan stations.")); Q_CHECK_PTR( cb_network ); /* Read settings for startup behavior */ KConfig *gcfg = KGlobal::config(); gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false ); /* Note: flag must be inverted because of question is 'the other way round' */ cb_askOnStart->setChecked( !skipDialog ); connect( cb_askOnStart, SIGNAL(toggled(bool)), this, SLOT(slotAskOnStartToggle(bool))); cb_network->setChecked( !onlyLocal ); connect( cb_network, SIGNAL(toggled(bool)), this, SLOT(slotNetworkToggle(bool))); QWidget *spaceEater = new QWidget( page ); Q_CHECK_PTR( spaceEater ); spaceEater->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding) ); }
/** Set page general */ void KEducaPrefs::setPageGeneral() { QVBox *mainFrame = addVBoxPage( i18n("Miscellaneous"), i18n("Various Settings"), DesktopIcon("misc")); QButtonGroup *buttonGroup1 = new QButtonGroup( mainFrame, "ButtonGroup1" ); buttonGroup1->setTitle( i18n( "General" ) ); buttonGroup1->setColumnLayout(0, Qt::Vertical ); buttonGroup1->layout()->setSpacing( 0 ); buttonGroup1->layout()->setMargin( 0 ); QVBoxLayout *buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() ); buttonGroup1Layout->setAlignment( Qt::AlignTop ); buttonGroup1Layout->setSpacing( 6 ); buttonGroup1Layout->setMargin( 11 ); _resultAfterNext = new QRadioButton( buttonGroup1, "RadioButton1" ); _resultAfterNext->setText( i18n( "Show results of the answer after press next" ) ); buttonGroup1Layout->addWidget( _resultAfterNext ); _resultAfterFinish = new QRadioButton( buttonGroup1, "RadioButton2" ); _resultAfterFinish->setText( i18n( "Show results when finish the test" ) ); buttonGroup1Layout->addWidget( _resultAfterFinish ); QGroupBox *GroupBox1 = new QGroupBox( mainFrame, "GroupBox7" ); GroupBox1->setTitle( i18n( "Order" ) ); GroupBox1->setColumnLayout(0, Qt::Vertical ); GroupBox1->layout()->setSpacing( 0 ); GroupBox1->layout()->setMargin( 0 ); QVBoxLayout *GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); GroupBox1Layout->setSpacing( 6 ); GroupBox1Layout->setMargin( 11 ); _randomQuestions = new QCheckBox( GroupBox1, "CheckBox1" ); _randomQuestions->setText( i18n( "Show questions in random order" ) ); GroupBox1Layout->addWidget( _randomQuestions ); _randomAnswers = new QCheckBox( GroupBox1, "CheckBox2" ); _randomAnswers->setText( i18n( "Show answers in random order" ) ); GroupBox1Layout->addWidget( _randomAnswers ); }
//----------------------------------------------------------------------------- HighscoresDialog::HighscoresDialog(int rank, QWidget *parent) : KDialogBase(internal->nbGameTypes()>1 ? TreeList : Plain, i18n("Highscores"), Close|User1|User2, Close, parent, "show_highscores", true, true, KGuiItem(i18n("Configure..."), "configure"), KGuiItem(i18n("Export..."))), _rank(rank), _tab(0) { _widgets.resize(internal->nbGameTypes(), 0); if ( internal->nbGameTypes()>1 ) { for (uint i=0; i<internal->nbGameTypes(); i++) { QString title = internal->manager.gameTypeLabel(i, Manager::I18N); QString icon = internal->manager.gameTypeLabel(i, Manager::Icon); QWidget *w = addVBoxPage(title, QString::null, BarIcon(icon, KIcon::SizeLarge)); if ( i==internal->gameType() ) createPage(w); } connect(this, SIGNAL(aboutToShowPage(QWidget *)), SLOT(createPage(QWidget *))); showPage(internal->gameType()); } else {
void KOCRBase::imgIntro() { m_imgPage = addVBoxPage( i18n("Image") ); (void) new QLabel( i18n("Image Information"), m_imgPage ); // Caption - Label and image m_imgHBox = new QHBox( m_imgPage ); m_imgHBox->setSpacing( KDialog::spacingHint()); m_previewPix = new QLabel( m_imgHBox ); m_previewPix->setPixmap(QPixmap()); m_previewPix->setFixedSize(m_previewSize); m_previewPix->setAlignment( Qt::AlignCenter ); m_previewPix->setFrameStyle( QFrame::Panel | QFrame::Sunken ); // m_previewPix->resize(m_previewSize); /* See introduceImage where the meta box is filled with data from the * incoming widget. */ m_metaBox = new QVBox( m_imgHBox ); }
KateConfigDialog::KateConfigDialog(KateMainWindow *parent, Kate::View *view) : KDialogBase(KDialogBase::TreeList, i18n("Configure"), KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok, parent, "configdialog") { KConfig *config = KateApp::self()->config(); KWin::setIcons(winId(), KateApp::self()->icon(), KateApp::self()->miniIcon()); actionButton(KDialogBase::Apply)->setEnabled(false); mainWindow = parent; setMinimumSize(600, 400); v = view; pluginPages.setAutoDelete(false); editorPages.setAutoDelete(false); QStringList path; setShowIconsInTreeList(true); path.clear(); path << i18n("Application"); setFolderIcon(path, SmallIcon("kate", KIcon::SizeSmall)); path.clear(); // BEGIN General page path << i18n("Application") << i18n("General"); QFrame *frGeneral = addPage(path, i18n("General Options"), BarIcon("gohome", KIcon::SizeSmall)); QVBoxLayout *lo = new QVBoxLayout(frGeneral); lo->setSpacing(KDialog::spacingHint()); config->setGroup("General"); // GROUP with the one below: "Appearance" QButtonGroup *bgStartup = new QButtonGroup(1, Qt::Horizontal, i18n("&Appearance"), frGeneral); lo->addWidget(bgStartup); // show full path in title config->setGroup("General"); cb_fullPath = new QCheckBox(i18n("&Show full path in title"), bgStartup); cb_fullPath->setChecked(mainWindow->viewManager()->getShowFullPath()); QWhatsThis::add(cb_fullPath, i18n("If this option is checked, the full document path will be shown in the window caption.")); connect(cb_fullPath, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); // GROUP with the one below: "Behavior" bgStartup = new QButtonGroup(1, Qt::Horizontal, i18n("&Behavior"), frGeneral); lo->addWidget(bgStartup); // sync the konsole ? cb_syncKonsole = new QCheckBox(bgStartup); cb_syncKonsole->setText(i18n("Sync &terminal emulator with active document")); cb_syncKonsole->setChecked(parent->syncKonsole); QWhatsThis::add(cb_syncKonsole, i18n("If this is checked, the built in Konsole will <code>cd</code> to the directory " "of the active document when started and whenever the active document changes, " "if the document is a local file.")); connect(cb_syncKonsole, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); // modified files notification cb_modNotifications = new QCheckBox(i18n("Wa&rn about files modified by foreign processes"), bgStartup); cb_modNotifications->setChecked(parent->modNotification); QWhatsThis::add(cb_modNotifications, i18n("If enabled, when Kate receives focus you will be asked what to do with " "files that have been modified on the hard disk. If not enabled, you will " "be asked what to do with a file that has been modified on the hard disk only " "when that file gains focus inside Kate.")); connect(cb_modNotifications, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); // GROUP with the one below: "Meta-informations" bgStartup = new QButtonGroup(1, Qt::Horizontal, i18n("Meta-Information"), frGeneral); lo->addWidget(bgStartup); // save meta infos cb_saveMetaInfos = new QCheckBox(bgStartup); cb_saveMetaInfos->setText(i18n("Keep &meta-information past sessions")); cb_saveMetaInfos->setChecked(KateDocManager::self()->getSaveMetaInfos()); QWhatsThis::add(cb_saveMetaInfos, i18n("Check this if you want document configuration like for example " "bookmarks to be saved past editor sessions. The configuration will be " "restored if the document has not changed when reopened.")); connect(cb_saveMetaInfos, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); // meta infos days QHBox *hbDmf = new QHBox(bgStartup); hbDmf->setEnabled(KateDocManager::self()->getSaveMetaInfos()); QLabel *lDmf = new QLabel(i18n("&Delete unused meta-information after:"), hbDmf); sb_daysMetaInfos = new QSpinBox(0, 180, 1, hbDmf); sb_daysMetaInfos->setSpecialValueText(i18n("(never)")); sb_daysMetaInfos->setSuffix(i18n(" day(s)")); sb_daysMetaInfos->setValue(KateDocManager::self()->getDaysMetaInfos()); lDmf->setBuddy(sb_daysMetaInfos); connect(cb_saveMetaInfos, SIGNAL(toggled(bool)), hbDmf, SLOT(setEnabled(bool))); connect(sb_daysMetaInfos, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); lo->addStretch(1); // :-] works correct without autoadd // END General page path.clear(); // BEGIN Session page path << i18n("Application") << i18n("Sessions"); QFrame *frSessions = addPage(path, i18n("Session Management"), BarIcon("history", KIcon::SizeSmall)); lo = new QVBoxLayout(frSessions); lo->setSpacing(KDialog::spacingHint()); // GROUP with the one below: "Startup" bgStartup = new QButtonGroup(1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions); lo->addWidget(bgStartup); // restore view config cb_restoreVC = new QCheckBox(bgStartup); cb_restoreVC->setText(i18n("Include &window configuration")); config->setGroup("General"); cb_restoreVC->setChecked(config->readBoolEntry("Restore Window Configuration", true)); QWhatsThis::add(cb_restoreVC, i18n("Check this if you want all your views and frames restored each time you open Kate")); connect(cb_restoreVC, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); QRadioButton *rb1, *rb2, *rb3; sessions_start = new QButtonGroup(1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions); lo->add(sessions_start); sessions_start->setRadioButtonExclusive(true); sessions_start->insert(rb1 = new QRadioButton(i18n("&Start new session"), sessions_start), 0); sessions_start->insert(rb2 = new QRadioButton(i18n("&Load last-used session"), sessions_start), 1); sessions_start->insert(rb3 = new QRadioButton(i18n("&Manually choose a session"), sessions_start), 2); config->setGroup("General"); QString sesStart(config->readEntry("Startup Session", "manual")); if(sesStart == "new") sessions_start->setButton(0); else if(sesStart == "last") sessions_start->setButton(1); else sessions_start->setButton(2); connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); sessions_exit = new QButtonGroup(1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions); lo->add(sessions_exit); sessions_exit->setRadioButtonExclusive(true); sessions_exit->insert(rb1 = new QRadioButton(i18n("&Do not save session"), sessions_exit), 0); sessions_exit->insert(rb2 = new QRadioButton(i18n("&Save session"), sessions_exit), 1); sessions_exit->insert(rb3 = new QRadioButton(i18n("&Ask user"), sessions_exit), 2); config->setGroup("General"); QString sesExit(config->readEntry("Session Exit", "save")); if(sesExit == "discard") sessions_exit->setButton(0); else if(sesExit == "save") sessions_exit->setButton(1); else sessions_exit->setButton(2); connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); lo->addStretch(1); // :-] works correct without autoadd // END Session page path.clear(); // file selector page path << i18n("Application") << i18n("File Selector"); QVBox *page = addVBoxPage(path, i18n("File Selector Settings"), BarIcon("fileopen", KIcon::SizeSmall)); fileSelConfigPage = new KFSConfigPage(page, "file selector config page", mainWindow->fileselector); connect(fileSelConfigPage, SIGNAL(changed()), this, SLOT(slotChanged())); path.clear(); path << i18n("Application") << i18n("Document List"); page = addVBoxPage(path, i18n("Document List Settings"), BarIcon("view_text", KIcon::SizeSmall)); filelistConfigPage = new KFLConfigPage(page, "file list config page", mainWindow->filelist); connect(filelistConfigPage, SIGNAL(changed()), this, SLOT(slotChanged())); path.clear(); path << i18n("Application") << i18n("Plugins"); /*QVBox **/ page = addVBoxPage(path, i18n("Plugin Manager"), BarIcon("connect_established", KIcon::SizeSmall)); KateConfigPluginPage *configPluginPage = new KateConfigPluginPage(page, this); connect(configPluginPage, SIGNAL(changed()), this, SLOT(slotChanged())); // Tools->External Tools menu path.clear(); path << i18n("Application") << i18n("External Tools"); page = addVBoxPage(path, i18n("External Tools"), BarIcon("configure", KIcon::SizeSmall)); configExternalToolsPage = new KateExternalToolsConfigWidget(page, "external tools config page"); connect(configExternalToolsPage, SIGNAL(changed()), this, SLOT(slotChanged())); // editor widgets from kwrite/kwdialog path.clear(); path << i18n("Editor"); setFolderIcon(path, SmallIcon("edit", KIcon::SizeSmall)); for(uint i = 0; i < KTextEditor::configInterfaceExtension(v->document())->configPages(); i++) { path.clear(); path << i18n("Editor") << KTextEditor::configInterfaceExtension(v->document())->configPageName(i); /*QVBox **/ page = addVBoxPage(path, KTextEditor::configInterfaceExtension(v->document())->configPageFullName(i), KTextEditor::configInterfaceExtension(v->document())->configPagePixmap(i, KIcon::SizeSmall)); KTextEditor::ConfigPage *cPage = KTextEditor::configInterfaceExtension(v->document())->configPage(i, page); connect(cPage, SIGNAL(changed()), this, SLOT(slotChanged())); editorPages.append(cPage); } KatePluginList &pluginList(KatePluginManager::self()->pluginList()); for(unsigned int i = 0; i < pluginList.size(); ++i) { if(pluginList[i].load && Kate::pluginConfigInterfaceExtension(pluginList[i].plugin)) addPluginPage(pluginList[i].plugin); } enableButtonSeparator(true); dataChanged = false; unfoldTreeList(); }
void KasPrefsDialog::addLookPage() { TQVBox *lookPage = addVBoxPage( i18n("Appearance"), TQString::null, Icon( "appearance" ) ); // // Item size // TQGrid *itemSizeBox = new TQGrid( 2, lookPage ); itemSizeBox->setSpacing( spacingHint() ); TQWhatsThis::add( itemSizeBox, i18n( "Specifies the size of the task items." ) ); TQLabel *itemSizeLabel = new TQLabel( i18n("Si&ze:"), itemSizeBox ); itemSizeCombo = new TQComboBox( itemSizeBox ); itemSizeCombo->insertItem( i18n( "Enormous" ) ); itemSizeCombo->insertItem( i18n( "Huge" ) ); itemSizeCombo->insertItem( i18n( "Large" ) ); itemSizeCombo->insertItem( i18n( "Medium" ) ); itemSizeCombo->insertItem( i18n( "Small" ) ); itemSizeCombo->insertItem( i18n( "Custom" ) ); itemSizeLabel->setBuddy( itemSizeCombo ); connect( itemSizeCombo, TQT_SIGNAL( activated( int ) ), kasbar, TQT_SLOT( setItemSize( int ) ) ); connect( itemSizeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( itemSizeChanged( int ) ) ); new TQWidget( itemSizeBox ); customSize = new TQSpinBox( 5, 1000, 1, itemSizeBox ); customSize->setValue( kasbar->itemExtent() ); connect( customSize, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( setItemExtent( int ) ) ); connect( customSize, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( customSizeChanged( int ) ) ); int sz = kasbar->itemSize(); itemSizeCombo->setCurrentItem( sz ); customSize->setEnabled( sz == KasBar::Custom ); // // Boxes per line // TQHBox *maxBoxesBox = new TQHBox( lookPage ); TQWhatsThis::add( maxBoxesBox, i18n( "Specifies the maximum number of items that should be placed in a line " "before starting a new row or column. If the value is 0 then all the " "available space will be used." ) ); TQLabel *maxBoxesLabel = new TQLabel( i18n("Bo&xes per line: "), maxBoxesBox ); TDEConfig *conf = kasbar->config(); if ( conf ) conf->setGroup( "Layout" ); maxBoxesSpin = new KIntSpinBox( 0, 50, 1, conf ? conf->readNumEntry( "MaxBoxes", 0 ) : 11, 10, maxBoxesBox, "maxboxes" ); connect( maxBoxesSpin, TQT_SIGNAL( valueChanged( int ) ), kasbar, TQT_SLOT( setMaxBoxes( int ) ) ); maxBoxesLabel->setBuddy( maxBoxesSpin ); // // Mode // detachedCheck = new TQCheckBox( i18n("&Detach from screen edge"), lookPage ); TQWhatsThis::add( detachedCheck, i18n( "Detaches the bar from the screen edge and makes it draggable." ) ); detachedCheck->setEnabled( !kasbar->isStandAlone() ); detachedCheck->setChecked( kasbar->isDetached() ); connect( detachedCheck, TQT_SIGNAL( toggled(bool) ), kasbar, TQT_SLOT( setDetached(bool) ) ); (void) new TQWidget( lookPage, "spacer" ); (void) new TQWidget( lookPage, "spacer" ); (void) new TQWidget( lookPage, "spacer" ); }
void KasPrefsDialog::addColorsPage() { TQVBox *colorsPage = addVBoxPage( i18n("Colors"), TQString::null, Icon( "colors" ) ); // Item label colors TQGrid *group = new TQGrid( 2, colorsPage ); TQLabel *labelPenLabel = new TQLabel( i18n("Label foreground:"), group ); labelPenButton = new KColorButton( res->labelPenColor(), group ); connect( labelPenButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setLabelPenColor( const TQColor & ) ) ); labelPenLabel->setBuddy( labelPenButton ); TQLabel *labelBackgroundLabel = new TQLabel( i18n("Label background:"), group ); labelBackgroundButton = new KColorButton( res->labelBgColor(), group ); connect( labelBackgroundButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setLabelBgColor( const TQColor & ) ) ); labelBackgroundLabel->setBuddy( labelBackgroundButton ); // Inactive colors group = new TQGrid( 2, colorsPage ); TQLabel *inactivePenLabel = new TQLabel( i18n("Inactive foreground:"), group ); inactivePenButton = new KColorButton( res->inactivePenColor(), group ); connect( inactivePenButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setInactivePenColor( const TQColor & ) ) ); inactivePenLabel->setBuddy( inactivePenButton ); TQLabel *inactiveBgLabel = new TQLabel( i18n("Inactive background:"), group ); inactiveBgButton = new KColorButton( res->inactiveBgColor(), group ); connect( inactiveBgButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setInactiveBgColor( const TQColor & ) ) ); inactiveBgLabel->setBuddy( inactiveBgButton ); // Active colors group = new TQGrid( 2, colorsPage ); TQLabel *activePenLabel = new TQLabel( i18n("Active foreground:"), group ); activePenButton = new KColorButton( res->activePenColor(), group ); connect( activePenButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setActivePenColor( const TQColor & ) ) ); activePenLabel->setBuddy( activePenButton ); TQLabel *activeBgLabel = new TQLabel( i18n("Active background:"), group ); activeBgButton = new KColorButton( res->activeBgColor(), group ); connect( activeBgButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setActiveBgColor( const TQColor & ) ) ); activeBgLabel->setBuddy( activeBgButton ); group = new TQGrid( 2, colorsPage ); TQLabel *progressLabel = new TQLabel( i18n("&Progress color:"), group ); progressButton = new KColorButton( res->progressColor(), group ); connect( progressButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setProgressColor( const TQColor & ) ) ); progressLabel->setBuddy( progressButton ); TQLabel *attentionLabel = new TQLabel( i18n("&Attention color:"), group ); attentionButton = new KColorButton( res->attentionColor(), group ); connect( attentionButton, TQT_SIGNAL( changed( const TQColor & ) ), res, TQT_SLOT( setAttentionColor( const TQColor & ) ) ); attentionLabel->setBuddy( attentionButton ); (void) new TQWidget( colorsPage, "spacer" ); }
Options::Options(QWidget *parent) : KDialogBase(Tabbed, i18n("Options"), Ok | Cancel, Ok, parent, 0, false){ fRemote = false; DCache = dc = opts->DCache; PCache = pc = opts->PCache; privCmd = prc = opts->privCmd; if (DCache >= Opts::SESSION) { cacheObj::clearDCache(); // clear dir caches if needed } if (PCache >= Opts::SESSION) { cacheObj::clearPCache(); // clear package caches if needed } { QVBox *page = addVBoxPage(i18n("&Types")); framet = new QGroupBox(1,Qt::Horizontal,i18n("Handle Package Type"), page); hh = new QGroupBox(1,Qt::Horizontal,i18n("Remote Host"),framet); huse = new QCheckBox(i18n("Use remote host (Debian APT only):"),hh); connect(huse, SIGNAL(clicked()), this, SLOT(useRemote())); hosts = new KComboBox( true, hh, "combo" ); KCompletion *comp = hosts->completionObject(); connect(hosts,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&))); connect(hosts,SIGNAL(returnPressed()),this,SLOT(insHosts())); hosts->setMaxCount(20); hosts->setDuplicatesEnabled(false); hosts->setInsertionPolicy(QComboBox::AtTop); // hosts->setInsertionPolicy(QComboBox::NoInsertion); hosts->setTrapReturnKey(true); int i; QString msgStr; for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i]) { if (kpinterface[i]->hasProgram) { msgStr = kpinterface[i]->name; } else { msgStr = kpinterface[i]->name; msgStr = i18n("%1: %2 not found") .arg(kpinterface[i]->name) .arg(kpinterface[i]->errExe); } packageBox[i] = new QGroupBox(2,Qt::Horizontal,msgStr, framet, "box"); packageHandle[i] = new QCheckBox(i18n("Enable"), packageBox[i]); connect(packageHandle[i], SIGNAL(clicked()), this, SLOT(scanLocates())); locate[i] = new QPushButton(i18n("Location of Packages"),packageBox[i]); connect(locate[i], SIGNAL(clicked()), kpinterface[i], SLOT(setLocation())); } else { packageHandle[i] = 0; } } } { QVBox *page = addVBoxPage(i18n("Cac&he")); bc = new QButtonGroup(page); bc->setTitle(i18n("Cache Remote Package Folders")); connect( bc, SIGNAL(clicked(int)), SLOT(PDCache(int)) ); QVBoxLayout* vc = new QVBoxLayout( bc, 15, 10, "vc"); vc->addSpacing( bc->fontMetrics().height() ); dcache[0] = new QRadioButton(i18n("Always"),bc); vc->addWidget(dcache[0]); dcache[1] = new QRadioButton(i18n("During a session"),bc); vc->addWidget(dcache[1]); dcache[2] = new QRadioButton(i18n("Never"),bc); vc->addWidget(dcache[2]); bp = new QButtonGroup(page); bp->setTitle(i18n("Cache Remote Package Files")); connect( bp, SIGNAL(clicked(int)), SLOT(PPCache(int)) ); QVBoxLayout* vp = new QVBoxLayout( bp, 15, 10, "vp"); vp->addSpacing( bp->fontMetrics().height() ); pcache[0] = new QRadioButton(i18n("Always"),bp); vp->addWidget(pcache[0]); pcache[1] = new QRadioButton(i18n("During a session"),bp); vp->addWidget(pcache[1]); pcache[2] = new QRadioButton(i18n("Never"),bp); vp->addWidget(pcache[2]); QGroupBox* cd = new QGroupBox (1, Qt::Horizontal, i18n("Cache Folder"), page) ; cd->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed) ; cachedir = new KURLRequester("", cd, "cachedir"); } { QWidget *page = addVBoxPage(i18n("&Misc")); QVBoxLayout *vf = new QVBoxLayout(page); // vf->setSpacing(KDialog::spacingHint()); vf->setMargin(0); bs = new QButtonGroup(page); bs->setTitle(i18n("Execute Privileged Commands Using")); connect( bs, SIGNAL(clicked(int)), SLOT(PPrivs(int)) ); QVBoxLayout* vs = new QVBoxLayout( bs, 15, 10, "bs"); vs->addSpacing( bs->fontMetrics().height() ); privs[0] = new QRadioButton(i18n("su command"),bs); vs->addWidget(privs[0]); privs[1] = new QRadioButton(i18n("sudo command"),bs); vs->addWidget(privs[1]); privs[2] = new QRadioButton(i18n("ssh command"),bs); vs->addWidget(privs[2]); valid = new QCheckBox(i18n("Verify file list"), page, "valid"); vf->addWidget(valid,0,AlignLeft); pkgRead = new QCheckBox(i18n("Read information from all local package files"), page, "pkgr"); vf->addWidget(pkgRead,0,AlignLeft); vf->addSpacing(100); } connect( this, SIGNAL(okClicked()), SLOT(apply_slot()) ); connect( this, SIGNAL(closeClicked()), SLOT(cancel_slot()) ); connect( this, SIGNAL(cancelClicked()), SLOT(cancel_slot()) ); setValues(); }
PMSettingsDialog::PMSettingsDialog( PMPart* part, QWidget* parent, const char* name ) : KDialogBase( TreeList, i18n( "Configure" ), Ok | Apply | Cancel | Default, Ok, parent, name ) { QStringList sl; QWidget* w = 0; PMSettingsDialogPage* p = 0; m_pPart = part; setShowIconsInTreeList( true ); sl.clear( ); sl.append( i18n( "Povray" ) ); w = addVBoxPage( sl, i18n( "Povray Options" ), SmallIcon( "pmconfigurepovray", 22 ) ); p = new PMPovraySettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "Graphical View" ) ); sl.append( i18n( "OpenGL" ) ); w = addVBoxPage( sl, i18n( "OpenGL Display Settings" ), SmallIcon( "pmconfigureopengl", 22 ) ); p = new PMOpenGLSettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "Graphical View" ) ); setFolderIcon( sl, SmallIcon( "pmconfiguregraphicalview", 22 ) ); sl.append( i18n( "Colors" ) ); w = addVBoxPage( sl, i18n( "Color Settings" ), SmallIcon( "pmconfigurecolors", 22 ) ); p = new PMColorSettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "Graphical View" ) ); sl.append( i18n( "Grid" ) ); w = addVBoxPage( sl, i18n( "Grid Settings" ), SmallIcon( "pmconfiguregrid", 22 ) ); p = new PMGridSettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "Graphical View" ) ); sl.append( i18n( "Objects" ) ); w = addVBoxPage( sl, i18n( "Display Settings for Objects" ), SmallIcon( "pmconfigureobjects", 22 ) ); p = new PMObjectSettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "Properties View" ) ); setFolderIcon( sl, SmallIcon( "pmconfiguredialogview", 22 ) ); sl.append( i18n( "Texture Preview" ) ); w = addVBoxPage( sl, i18n( "Display Settings for Texture Previews" ), SmallIcon( "pmconfiguretexturepreview", 22 ) ); p = new PMPreviewSettings( w ); registerPage( w, p ); sl.clear( ); sl.append( i18n( "View Layout" ) ); w = addVBoxPage( sl, i18n( "Display Settings for View Layouts" ), SmallIcon( "pmconfigureviewlayout", 22 ) ); p = new PMLayoutSettings( w ); registerPage( w, p ); #ifdef KPM_WITH_OBJECT_LIBRARY sl.clear( ); sl.append( i18n( "Object Libraries" ) ); w = addVBoxPage( sl, i18n( "Display Settings for Object Libraries" ), SmallIcon( "pmconfigureobjectlibrary", 22 ) ); p = new PMObjectLibrarySettings( w ); registerPage( w, p ); #endif #ifdef KPM_WITH_PLUGINS sl.clear( ); sl.append( i18n( "Plugins" ) ); w = addVBoxPage( sl, i18n( "Plugin Settings" ) ); p = new PMPluginSettings( w ); registerPage( w, p ); #endif displaySettings( ); resize( s_size ); }