53 #include "ui_dialogpreferences.h"
54 #include "../core/vapplication.h"
60 #include <QPushButton>
66 , m_isInitialized(false)
73 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
75 qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
77 QPushButton *ok_Button =
ui->buttonBox->button(QDialogButtonBox::Ok);
81 QPushButton *apply_Button =
ui->buttonBox->button(QDialogButtonBox::Apply);
92 ui->pages_StackedWidget->setCurrentIndex(0);
104 QDialog::showEvent( event );
105 if ( event->spontaneous() )
116 setMinimumSize(size());
118 QSize sz =
qApp->Settings()->getPreferenceDialogSize();
119 if (sz.isEmpty() ==
false)
136 qApp->Settings()->setPreferenceDialogSize(size());
143 if (current ==
nullptr)
147 int rowIndex =
ui->contents_ListWidget->row(current);
148 ui->pages_StackedWidget->setCurrentIndex(rowIndex);
161 qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
163 setResult(QDialog::Accepted);
170 done(QDialog::Accepted);
void pageChanged(QListWidgetItem *current, QListWidgetItem *previous)
PreferencesPathPage * m_pathPage
virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
DialogPreferences(QWidget *parent=nullptr)
virtual ~DialogPreferences()
PreferencesGraphicsViewPage * m_graphicsPage
PreferencesConfigurationPage * m_configurePage
Ui::DialogPreferences * ui
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
PreferencesPatternPage * m_patternPage
void initDefaultSeamAllowance()