mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
Checkpoint.
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
<string>SeerGdbConfigPage</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="gdbGroupBox">
|
||||
<property name="title">
|
||||
|
||||
@@ -58,6 +58,8 @@ SeerKeySettings SeerKeySettings::populate () {
|
||||
keySettings.add("Debug", SeerKeySetting("Debug", QKeySequence::fromString("Alt+D"), "Open the debug dialog."));
|
||||
keySettings.add("FindText", SeerKeySetting("FindText", QKeySequence::fromString("Ctrl+F"), "Seach for text in the code editor."));
|
||||
keySettings.add("AlternateDir", SeerKeySetting("AlternateDir", QKeySequence::fromString("Ctrl+O"), "Look for source file in an alternate directory."));
|
||||
keySettings.add("Arguments", SeerKeySetting("Arguments", QKeySequence::fromString("Alt+A"), "Open the argument dialog."));
|
||||
keySettings.add("Quit", SeerKeySetting("Quit", QKeySequence::fromString("Alt+Q"), "Quit Seer."));
|
||||
|
||||
return keySettings;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
<string>SeerKeysConfigPage</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
@@ -63,8 +69,6 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>textBrowser</zorder>
|
||||
<zorder>gdbAndEditorKeysGroupBox</zorder>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
|
||||
+35
-26
@@ -41,17 +41,6 @@ SeerMainWindow::SeerMainWindow(QWidget* parent) : QMainWindow(parent) {
|
||||
|
||||
toolBar->addWidget(_progressIndicator);
|
||||
|
||||
//
|
||||
// Set up shortcut keys with defaults.
|
||||
// Will be changed by refreshShortCuts().
|
||||
//
|
||||
_runKey = new QShortcut(QKeySequence(Qt::Key_F1), this);
|
||||
_startKey = new QShortcut(QKeySequence(Qt::Key_F2), this);
|
||||
_nextKey = new QShortcut(QKeySequence(Qt::Key_F5), this);
|
||||
_stepKey = new QShortcut(QKeySequence(Qt::Key_F6), this);
|
||||
_finishKey = new QShortcut(QKeySequence(Qt::Key_F7), this);
|
||||
_continueKey = new QShortcut(QKeySequence(Qt::Key_F8), this);
|
||||
|
||||
//
|
||||
// Set up Interrupt menu.
|
||||
//
|
||||
@@ -111,13 +100,6 @@ SeerMainWindow::SeerMainWindow(QWidget* parent) : QMainWindow(parent) {
|
||||
QObject::connect(interruptActionSIGUSR1, &QAction::triggered, gdbWidget, &SeerGdbWidget::handleGdbInterruptSIGUSR1);
|
||||
QObject::connect(interruptActionSIGUSR2, &QAction::triggered, gdbWidget, &SeerGdbWidget::handleGdbInterruptSIGUSR2);
|
||||
|
||||
QObject::connect(_runKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbRunExecutable);
|
||||
QObject::connect(_startKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbStartExecutable);
|
||||
QObject::connect(_nextKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbNext);
|
||||
QObject::connect(_stepKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbStep);
|
||||
QObject::connect(_finishKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbFinish);
|
||||
QObject::connect(_continueKey, &QShortcut::activated, gdbWidget, &SeerGdbWidget::handleGdbContinue);
|
||||
|
||||
QObject::connect(gdbWidget->gdbMonitor(), &GdbMonitor::astrixTextOutput, runStatus, &SeerRunStatusIndicator::handleText);
|
||||
QObject::connect(gdbWidget->gdbMonitor(), &GdbMonitor::astrixTextOutput, this, &SeerMainWindow::handleText);
|
||||
QObject::connect(gdbWidget->gdbMonitor(), &GdbMonitor::caretTextOutput, this, &SeerMainWindow::handleText);
|
||||
@@ -694,7 +676,7 @@ void SeerMainWindow::writeConfigSettings () {
|
||||
SeerKeySetting keysetting = keysettings.get(keys[i]);
|
||||
|
||||
settings.setArrayIndex(i);
|
||||
settings.setValue("name", keysetting._action);
|
||||
settings.setValue("action", keysetting._action);
|
||||
settings.setValue("key", keysetting._sequence.toString());
|
||||
settings.setValue("help", keysetting._description);
|
||||
}
|
||||
@@ -776,7 +758,7 @@ void SeerMainWindow::readConfigSettings () {
|
||||
|
||||
settings.setArrayIndex(i);
|
||||
|
||||
QString name = settings.value("name").toString();
|
||||
QString name = settings.value("action").toString();
|
||||
QKeySequence key = QKeySequence::fromString(settings.value("key").toString());
|
||||
QString help = settings.value("help").toString();
|
||||
|
||||
@@ -821,54 +803,81 @@ void SeerMainWindow::refreshShortCuts () {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Run");
|
||||
|
||||
_runKey->setKey(setting._sequence);
|
||||
//_runKey->setKey(setting._sequence);
|
||||
actionGdbRun->setToolTip(setting._description);
|
||||
actionGdbRun->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlRun->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Start")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Start");
|
||||
|
||||
_startKey->setKey(setting._sequence);
|
||||
//_startKey->setKey(setting._sequence);
|
||||
actionGdbStart->setToolTip(setting._description);
|
||||
actionGdbStart->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlStart->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Next")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Next");
|
||||
|
||||
_nextKey->setKey(setting._sequence);
|
||||
//_nextKey->setKey(setting._sequence);
|
||||
actionGdbNext->setToolTip(setting._description);
|
||||
actionGdbNext->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlNext->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Step")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Step");
|
||||
|
||||
_stepKey->setKey(setting._sequence);
|
||||
//_stepKey->setKey(setting._sequence);
|
||||
actionGdbStep->setToolTip(setting._description);
|
||||
actionGdbStep->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlStep->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Finish")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Finish");
|
||||
|
||||
_finishKey->setKey(setting._sequence);
|
||||
//_finishKey->setKey(setting._sequence);
|
||||
actionGdbFinish->setToolTip(setting._description);
|
||||
actionGdbFinish->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlFinish->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Continue")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Continue");
|
||||
|
||||
_continueKey->setKey(setting._sequence);
|
||||
//_continueKey->setKey(setting._sequence);
|
||||
actionGdbContinue->setToolTip(setting._description);
|
||||
actionGdbContinue->setText(setting._action + " (" + setting._sequence.toString() + ")");
|
||||
actionControlContinue->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Debug")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Debug");
|
||||
|
||||
actionFileDebug->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Arguments")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Arguments");
|
||||
|
||||
actionFileArguments->setShortcut(setting._sequence);
|
||||
}
|
||||
|
||||
if (_keySettings.has("Quit")) {
|
||||
|
||||
SeerKeySetting setting = _keySettings.get("Quit");
|
||||
|
||||
actionFileQuit->setShortcut(setting._sequence);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,11 +65,5 @@ class SeerMainWindow : public QMainWindow, protected Ui::SeerMainWindowForm {
|
||||
private:
|
||||
QProgressIndicator* _progressIndicator;
|
||||
SeerKeySettings _keySettings;
|
||||
QShortcut* _runKey;
|
||||
QShortcut* _startKey;
|
||||
QShortcut* _nextKey;
|
||||
QShortcut* _stepKey;
|
||||
QShortcut* _finishKey;
|
||||
QShortcut* _continueKey;
|
||||
};
|
||||
|
||||
|
||||
+1
-19
@@ -152,9 +152,6 @@
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Start the program in GDB. Stop in main().</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGdbRun">
|
||||
<property name="icon">
|
||||
@@ -164,9 +161,6 @@
|
||||
<property name="text">
|
||||
<string>Run</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Start the program in GDB. Honor breakpoints, if any.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGdbNext">
|
||||
<property name="icon">
|
||||
@@ -176,9 +170,6 @@
|
||||
<property name="text">
|
||||
<string>Next</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Execute next step, step over functions.</p><p>Shortcut - F5</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGdbStep">
|
||||
<property name="icon">
|
||||
@@ -188,9 +179,6 @@
|
||||
<property name="text">
|
||||
<string>Step</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Execute next step, step into functions.</p><p>Shortcut - F6</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGdbFinish">
|
||||
<property name="icon">
|
||||
@@ -200,9 +188,6 @@
|
||||
<property name="text">
|
||||
<string>Finish</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Execute the remaining function, stop after it exits.</p><p>Shortcut - F7</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGdbContinue">
|
||||
<property name="icon">
|
||||
@@ -212,9 +197,6 @@
|
||||
<property name="text">
|
||||
<string>Continue</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Continue executing the program. </p><p>Stop at any breakpoints, or when the program exits.</p><p>Shortcut - F8</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFileDebug">
|
||||
<property name="icon">
|
||||
@@ -438,7 +420,7 @@
|
||||
<action name="actionSettingsSaveConfiguration">
|
||||
<property name="icon">
|
||||
<iconset resource="resource.qrc">
|
||||
<normaloff>:/seer/resources/RelaxLightIcons/document-save.svg</normaloff>:/seer/resources/HighContrast/document-save.svg</iconset>
|
||||
<normaloff>:/seer/resources/RelaxLightIcons/document-save.svg</normaloff>:/seer/resources/RelaxLightIcons/document-save.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Configuration...</string>
|
||||
|
||||
Reference in New Issue
Block a user