Start: apply clang format
This commit is contained in:
@@ -33,9 +33,9 @@ using namespace StartGui;
|
||||
/**
|
||||
* Constructs a DlgStartPreferencesImp which is a child of 'parent'
|
||||
*/
|
||||
DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent )
|
||||
: PreferencePage( parent )
|
||||
, ui(new Ui_DlgStartPreferences)
|
||||
DlgStartPreferencesImp::DlgStartPreferencesImp(QWidget* parent)
|
||||
: PreferencePage(parent)
|
||||
, ui(new Ui_DlgStartPreferences)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -55,26 +55,26 @@ DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent )
|
||||
menuText[text] = it;
|
||||
}
|
||||
|
||||
{ // add special workbench to selection
|
||||
QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench"));
|
||||
QString key = QString::fromLatin1("<last>");
|
||||
QString value = QString::fromLatin1("$LastModule");
|
||||
if (px.isNull()) {
|
||||
ui->AutoloadModuleCombo->addItem(key, QVariant(value));
|
||||
}
|
||||
else {
|
||||
ui->AutoloadModuleCombo->addItem(px, key, QVariant(value));
|
||||
}
|
||||
// add special workbench to selection
|
||||
QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench"));
|
||||
QString key = QString::fromLatin1("<last>");
|
||||
QString value = QString::fromLatin1("$LastModule");
|
||||
if (px.isNull()) {
|
||||
ui->AutoloadModuleCombo->addItem(key, QVariant(value));
|
||||
}
|
||||
else {
|
||||
ui->AutoloadModuleCombo->addItem(px, key, QVariant(value));
|
||||
}
|
||||
|
||||
for (QMap<QString, QString>::Iterator it = menuText.begin(); it != menuText.end(); ++it) {
|
||||
QPixmap px = Gui::Application::Instance->workbenchIcon(it.value());
|
||||
if (px.isNull())
|
||||
if (px.isNull()) {
|
||||
ui->AutoloadModuleCombo->addItem(it.key(), QVariant(it.value()));
|
||||
else
|
||||
}
|
||||
else {
|
||||
ui->AutoloadModuleCombo->addItem(px, it.key(), QVariant(it.value()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,8 +87,9 @@ void DlgStartPreferencesImp::saveSettings()
|
||||
int index = ui->AutoloadModuleCombo->currentIndex();
|
||||
QVariant data = ui->AutoloadModuleCombo->itemData(index);
|
||||
QString startWbName = data.toString();
|
||||
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")->
|
||||
SetASCII("AutoloadModule", startWbName.toLatin1());
|
||||
App::GetApplication()
|
||||
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")
|
||||
->SetASCII("AutoloadModule", startWbName.toLatin1());
|
||||
ui->colorButton_1->onSave();
|
||||
ui->colorButton_2->onSave();
|
||||
ui->colorButton_3->onSave();
|
||||
@@ -118,8 +119,9 @@ void DlgStartPreferencesImp::saveSettings()
|
||||
void DlgStartPreferencesImp::loadSettings()
|
||||
{
|
||||
std::string start = App::Application::Config()["StartWorkbench"];
|
||||
start = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")->
|
||||
GetASCII("AutoloadModule", start.c_str());
|
||||
start = App::GetApplication()
|
||||
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")
|
||||
->GetASCII("AutoloadModule", start.c_str());
|
||||
QString startWbName = QLatin1String(start.c_str());
|
||||
ui->AutoloadModuleCombo->setCurrentIndex(ui->AutoloadModuleCombo->findData(startWbName));
|
||||
ui->colorButton_1->onRestore();
|
||||
@@ -151,7 +153,7 @@ void DlgStartPreferencesImp::loadSettings()
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgStartPreferencesImp::changeEvent(QEvent *ev)
|
||||
void DlgStartPreferencesImp::changeEvent(QEvent* ev)
|
||||
{
|
||||
if (ev->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
|
||||
Reference in New Issue
Block a user