add QSlider to SessionManager
This commit is contained in:
@@ -97,6 +97,8 @@ void SessionManager::save() {
|
||||
sr.setValue(buttons[i].first, buttons[i].second->isChecked(), false);
|
||||
for (int i = 0; i < stacks.size(); ++i)
|
||||
sr.setValue(stacks[i].first, stacks[i].second->currentIndex(), false);
|
||||
for (int i = 0; i < sliders.size(); ++i)
|
||||
sr.setValue(sliders[i].first, sliders[i].second->value(), false);
|
||||
for (int i = 0; i < actions.size(); ++i)
|
||||
sr.setValue(actions[i].first, actions[i].second->isChecked(), false);
|
||||
for (int i = 0; i < stringlists.size(); ++i)
|
||||
@@ -221,6 +223,8 @@ void SessionManager::load(bool onlyMainwindow) {
|
||||
for (int i = 0; i < stacks.size(); ++i)
|
||||
stacks[i].second->setCurrentIndex(
|
||||
qMin<int>(sr.getValue(stacks[i].first, stacks[i].second->currentIndex()).toInt(), stacks[i].second->count()));
|
||||
for (int i = 0; i < sliders.size(); ++i)
|
||||
sliders[i].second->setValue(sr.getValue(sliders[i].first, sliders[i].second->value()).toInt());
|
||||
for (int i = 0; i < actions.size(); ++i)
|
||||
actions[i].second->setChecked(sr.getValue(actions[i].first, actions[i].second->isChecked()).toBool());
|
||||
for (int i = 0; i < stringlists.size(); ++i)
|
||||
@@ -267,6 +271,7 @@ void SessionManager::clear(bool with_filename) {
|
||||
tabs.clear();
|
||||
buttons.clear();
|
||||
stacks.clear();
|
||||
sliders.clear();
|
||||
actions.clear();
|
||||
stringlists.clear();
|
||||
strings.clear();
|
||||
|
||||
Reference in New Issue
Block a user