SLOT(on_view_defaultDivHeight_changed(int)));
trace_view_layout->addRow(tr("Default analog trace div height"), default_div_height_sb);
+ QSpinBox *default_logic_height_sb = new QSpinBox();
+ default_logic_height_sb->setRange(5, 1000);
+ default_logic_height_sb->setSuffix(tr(" pixels"));
+ default_logic_height_sb->setValue(
+ settings.value(GlobalSettings::Key_View_DefaultLogicHeight).toInt());
+ connect(default_logic_height_sb, SIGNAL(valueChanged(int)), this,
+ SLOT(on_view_defaultLogicHeight_changed(int)));
+ trace_view_layout->addRow(tr("Default logic trace height"), default_logic_height_sb);
+
return form;
}
settings.setValue(GlobalSettings::Key_View_DefaultDivHeight, value);
}
+void Settings::on_view_defaultLogicHeight_changed(int value)
+{
+ GlobalSettings settings;
+ settings.setValue(GlobalSettings::Key_View_DefaultLogicHeight, value);
+}
+
void Settings::on_dec_initialStateConfigurable_changed(int state)
{
GlobalSettings settings;
void on_view_showSamplingPoints_changed(int state);
void on_view_showAnalogMinorGrid_changed(int state);
void on_view_defaultDivHeight_changed(int value);
+ void on_view_defaultLogicHeight_changed(int value);
void on_dec_initialStateConfigurable_changed(int state);
private:
const QString GlobalSettings::Key_View_ShowSamplingPoints = "View_ShowSamplingPoints";
const QString GlobalSettings::Key_View_ShowAnalogMinorGrid = "View_ShowAnalogMinorGrid";
const QString GlobalSettings::Key_View_DefaultDivHeight = "View_DefaultDivHeight";
+const QString GlobalSettings::Key_View_DefaultLogicHeight = "View_DefaultLogicHeight";
const QString GlobalSettings::Key_Dec_InitialStateConfigurable = "Dec_InitialStateConfigurable";
multimap< QString, function<void(QVariant)> > GlobalSettings::callbacks_;
if (!contains(Key_View_DefaultDivHeight))
setValue(Key_View_DefaultDivHeight,
3 * QFontMetrics(QApplication::font()).height());
+
+ if (!contains(Key_View_DefaultLogicHeight))
+ setValue(Key_View_DefaultLogicHeight,
+ 2 * QFontMetrics(QApplication::font()).height());
}
void GlobalSettings::register_change_handler(const QString key,
static const QString Key_View_ShowSamplingPoints;
static const QString Key_View_ShowAnalogMinorGrid;
static const QString Key_View_DefaultDivHeight;
+ static const QString Key_View_DefaultLogicHeight;
static const QString Key_Dec_InitialStateConfigurable;
public: