2021-12-20 18:04:53 -06:00
|
|
|
#include "SeerSeerConfigPage.h"
|
2021-12-20 20:28:00 -06:00
|
|
|
#include <QtWidgets/QWidget>
|
2021-12-20 18:04:53 -06:00
|
|
|
|
|
|
|
|
SeerSeerConfigPage::SeerSeerConfigPage(QWidget* parent) : QWidget(parent) {
|
|
|
|
|
|
|
|
|
|
// Set up the UI.
|
|
|
|
|
setupUi(this);
|
|
|
|
|
|
|
|
|
|
// Connect things.
|
2022-07-20 19:51:38 -05:00
|
|
|
|
|
|
|
|
// Setup the defaults.
|
|
|
|
|
reset();
|
2021-12-20 18:04:53 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SeerSeerConfigPage::~SeerSeerConfigPage() {
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-11 19:47:31 -06:00
|
|
|
void SeerSeerConfigPage::setConsoleMode (const QString& mode) {
|
|
|
|
|
|
|
|
|
|
if (mode == "normal") {
|
|
|
|
|
normalRadioButton->setChecked(true);
|
|
|
|
|
|
|
|
|
|
}else if (mode == "minimized") {
|
|
|
|
|
minimizedRadioButton->setChecked(true);
|
|
|
|
|
|
|
|
|
|
}else if (mode == "hidden") {
|
|
|
|
|
hiddenRadioButton->setChecked(true);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
normalRadioButton->setChecked(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString SeerSeerConfigPage::consoleMode () const {
|
|
|
|
|
|
|
|
|
|
if (normalRadioButton->isChecked()) {
|
|
|
|
|
return "normal";
|
|
|
|
|
|
|
|
|
|
}else if (minimizedRadioButton->isChecked()) {
|
|
|
|
|
return "minimized";
|
|
|
|
|
|
|
|
|
|
}else if (hiddenRadioButton->isChecked()) {
|
|
|
|
|
return "hidden";
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
return "normal";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-26 13:09:50 -05:00
|
|
|
void SeerSeerConfigPage::setConsoleScrollLines (int count) {
|
|
|
|
|
|
|
|
|
|
consoleScrollLinesSpinBox->setValue(count);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SeerSeerConfigPage::consoleScrollLines () const {
|
|
|
|
|
|
|
|
|
|
return consoleScrollLinesSpinBox->value();
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-11 19:47:31 -06:00
|
|
|
void SeerSeerConfigPage::setRememberWindowSizes (bool flag) {
|
|
|
|
|
|
|
|
|
|
rememberSizescheckBox->setChecked(flag);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool SeerSeerConfigPage::rememberWindowSizes () const {
|
|
|
|
|
|
|
|
|
|
return rememberSizescheckBox->isChecked();
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-16 09:55:17 -06:00
|
|
|
void SeerSeerConfigPage::setRememberManualCommandCount (int count) {
|
|
|
|
|
|
|
|
|
|
rememberGdbCommandsSpinBox->setValue(count);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SeerSeerConfigPage::rememberManualCommandCount () const {
|
|
|
|
|
|
|
|
|
|
return rememberGdbCommandsSpinBox->value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerSeerConfigPage::setClearManualCommandHistory (bool flag) {
|
|
|
|
|
|
|
|
|
|
clearHistoryCheckBox->setChecked(flag);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool SeerSeerConfigPage::clearManualCommandHistory () const {
|
|
|
|
|
|
|
|
|
|
return clearHistoryCheckBox->isChecked();
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-20 19:51:38 -05:00
|
|
|
void SeerSeerConfigPage::reset () {
|
|
|
|
|
|
|
|
|
|
setConsoleMode("normal");
|
|
|
|
|
setConsoleScrollLines(1000);
|
|
|
|
|
setRememberWindowSizes(true);
|
|
|
|
|
setRememberManualCommandCount(10);
|
|
|
|
|
setClearManualCommandHistory(false);
|
|
|
|
|
}
|
|
|
|
|
|