1 #include <ui_SettingsDialogForm.h>
12 #include <QScrollArea>
16 std::vector<std::string> vec;
20 for(it = d.
begin(); it != d.
end(); ++it)
21 facNames.append(it->first.c_str());
24 QWidget*
GetWidget(
const QString& facName, QWidget* parent)
26 QScrollArea* scr =
new QScrollArea(parent);
27 std::string value = facName.toStdString();
31 QGridLayout* lay =
new QGridLayout(scr);
36 scr->setFrameShape(QFrame::NoFrame);
43 m_ui(new Ui::SettingsDialogForm)
53 QVector<QString> facNames;
54 QVector<QString>::Iterator it;
58 for(it = facNames.begin(); it != facNames.end(); ++it)
59 m_ui->m_settingsListView->addItem(*it);
62 connect (
m_ui->m_closePushButton, SIGNAL(pressed()), SLOT(close()));
63 connect (
m_ui->m_settingsListView, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), SLOT(
settingsChanged (QListWidgetItem*, QListWidgetItem*)));
65 m_ui->m_settingsListView->setCurrentRow(0);
81 QString sett = current->text();
84 if(m_widPos.find(sett) == m_widPos.end())
87 pos = m_ui->m_widgetStack->addWidget(wid);
97 if(pos != m_ui->m_widgetStack->currentIndex())
100 QWidget* w = ((QScrollArea*)m_ui->m_widgetStack->currentWidget())->widget();
102 if(!w->disconnect(SIGNAL(updateApplyButtonState(
const bool&)),
this, SLOT(updateApplyButtonState(
const bool&))))
105 if(!m_ui->m_applyPushButton->disconnect(SIGNAL(clicked()), w, SLOT(onApplyButtonClicked())))
110 QWidget* w = ((QScrollArea*)m_ui->m_widgetStack->widget(pos))->widget();
111 connect(w, SIGNAL(updateApplyButtonState(
const bool&)), SLOT(updateApplyButtonState(
const bool&)));
112 w->connect(m_ui->m_applyPushButton, SIGNAL(clicked()), SLOT(onApplyButtonClicked()));
115 m_ui->m_widgetStack->setCurrentIndex(pos);
116 m_ui->m_customGroupBox->setTitle(sett + tr(
" settings"));
126 m_ui->m_helpPushButton->setNameSpace(ns);
127 m_ui->m_helpPushButton->setPageReference(page);
129 m_ui->m_resumeLabel->setText(lbl);
131 m_ui->m_applyPushButton->setEnabled(
false);
136 m_ui->m_applyPushButton->setEnabled(state);
A for customization of the application components.
SettingsDialog(QWidget *parent=0)
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary of concrete factories.
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator const_iterator
void updateApplyButtonState(const bool &state)
QWidget * GetWidget(const QString &facName, QWidget *parent)
Ui::SettingsDialogForm * m_ui
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator end() const
It returns an iterator to the end of the container.
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator begin() const
It returns an iterator to the first stored factory.
void settingsChanged(QListWidgetItem *current, QListWidgetItem *previous)
void GetFactoriesNames(QVector< QString > &facNames)
This class represents a dictionary of factories.