1 #include <ui_SettingsDialogForm.h>
11 #include <QtGui/QScrollArea>
15 std::vector<std::string> vec;
19 for(it = d.
begin(); it != d.
end(); ++it)
20 facNames.append(it->first.c_str());
23 QWidget*
GetWidget(
const QString& facName, QWidget* parent)
25 QScrollArea* scr =
new QScrollArea(parent);
26 std::string value = facName.toStdString();
30 QGridLayout* lay =
new QGridLayout(scr);
35 scr->setFrameShape(QFrame::NoFrame);
42 m_ui(new Ui::SettingsDialogForm)
51 QVector<QString> facNames;
52 QVector<QString>::Iterator it;
56 for(it = facNames.begin(); it != facNames.end(); ++it)
57 m_ui->m_settingsListView->addItem(*it);
60 connect (
m_ui->m_closePushButton, SIGNAL(pressed()), SLOT(close()));
61 connect (
m_ui->m_settingsListView, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), SLOT(
settingsChanged (QListWidgetItem*, QListWidgetItem*)));
63 m_ui->m_settingsListView->setCurrentRow(0);
78 QString sett = current->text();
81 if(m_widPos.find(sett) == m_widPos.end())
84 pos = m_ui->m_widgetStack->addWidget(wid);
94 if(pos != m_ui->m_widgetStack->currentIndex())
97 QWidget* w = ((QScrollArea*)m_ui->m_widgetStack->currentWidget())->widget();
99 if(!w->disconnect(SIGNAL(updateApplyButtonState(
const bool&)),
this, SLOT(updateApplyButtonState(
const bool&))))
102 if(!m_ui->m_applyPushButton->disconnect(SIGNAL(clicked()), w, SLOT(onApplyButtonClicked())))
107 QWidget* w = ((QScrollArea*)m_ui->m_widgetStack->widget(pos))->widget();
108 connect(w, SIGNAL(updateApplyButtonState(
const bool&)), SLOT(updateApplyButtonState(
const bool&)));
109 w->connect(m_ui->m_applyPushButton, SIGNAL(clicked()), SLOT(onApplyButtonClicked()));
112 m_ui->m_widgetStack->setCurrentIndex(pos);
113 m_ui->m_customGroupBox->setTitle(sett + tr(
" settings"));
123 m_ui->m_helpPushButton->setNameSpace(ns);
124 m_ui->m_helpPushButton->setPageReference(page);
126 m_ui->m_resumeLabel->setText(lbl);
128 m_ui->m_applyPushButton->setEnabled(
false);
133 m_ui->m_applyPushButton->setEnabled(state);
QWidget * GetWidget(const QString &facName, QWidget *parent)
A factory to build the Table frame object.
void settingsChanged(QListWidgetItem *current, QListWidgetItem *previous)
void updateApplyButtonState(const bool &state)
This class represents a dictionary of factories.
virtual void getHelpInformations(QString &ns, QString &helpFile)=0
Ui::SettingsDialogForm * m_ui
A factory to build the project frame object.
void GetFactoriesNames(QVector< QString > &facNames)
SettingsDialog(QWidget *parent=0)
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary of concrete factories.
A factory to build the tool bars widget object.
A factory to build the display frame object.
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator const_iterator
static AbstractSettingWidget * make(const std::string &cwType, QWidget *parent=0)
A for customization of the application components.
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator end() const
It returns an iterator to the end of the container.
An abstraction for setting widgets.
A frame for setting Table options.
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator begin() const
It returns an iterator to the first stored factory.