RKSettingsModulePlugins::RKSettingsModulePlugins (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) { QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ()); main_vbox->addSpacing (2*RKGlobals::spacingHint ()); QLabel *label = new QLabel (i18n ("Some plugins are available with both, a wizard-like interface and a traditional dialog interface. If both are available, which mode of presentation do you prefer?"), this); label->setAlignment (Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak); main_vbox->addWidget (label); button_group = new QButtonGroup (this); button_group->setColumnLayout (0, Qt::Vertical); button_group->layout()->setSpacing (6); button_group->layout()->setMargin (11); QVBoxLayout *group_layout = new QVBoxLayout(button_group->layout()); group_layout->addWidget (new QRadioButton (i18n ("Always prefer dialogs"), button_group)); group_layout->addWidget (new QRadioButton (i18n ("Prefer recommended interface"), button_group)); group_layout->addWidget (new QRadioButton (i18n ("Always prefer wizards"), button_group)); button_group->setButton (static_cast<int> (interface_pref)); connect (button_group, SIGNAL (clicked (int)), this, SLOT (buttonClicked (int))); main_vbox->addWidget (button_group); main_vbox->addSpacing (2*RKGlobals::spacingHint ()); map_choser = new MultiStringSelector (i18n ("Select .pluginmap file(s)"), this); map_choser->setValues (plugin_maps); connect (map_choser, SIGNAL (getNewStrings (QStringList*)), this, SLOT (browseRequest (QStringList*))); connect (map_choser, SIGNAL (listChanged ()), this, SLOT (pathsChanged ())); main_vbox->addWidget (map_choser); main_vbox->addStretch (); }
ctkCmdLineModuleExplorerModulesSettings::ctkCmdLineModuleExplorerModulesSettings(ctkCmdLineModuleManager *moduleManager) : ui(new Ui::ctkCmdLineModuleExplorerModulesSettings) , ModuleManager(moduleManager) , ShowXmlAction(new ctkCmdLineModuleExplorerShowXmlAction(this)) , ModulesRegistered(false) { ui->setupUi(this); ui->PathListButtonsWidget->init(ui->PathListWidget); ui->PathListWidget->addAction(this->ShowXmlAction); ui->PathListWidget->setContextMenuPolicy(Qt::ActionsContextMenu); this->ShowXmlAction->setEnabled(false); connect(ui->PathListWidget, SIGNAL(currentPathChanged(QString,QString)), SLOT(pathSelected(QString))); connect(ui->PathListWidget, SIGNAL(pathsChanged(QStringList,QStringList)), SLOT(pathsAdded(QStringList))); this->registerProperty(ctkCmdLineModuleExplorerConstants::KEY_REGISTERED_MODULES, ui->PathListWidget, "paths", SIGNAL(pathsChanged(QStringList,QStringList))); }