mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 00:50:42 +08:00
Moved printpoint type into create dialog.
This commit is contained in:
@@ -26,10 +26,15 @@ SeerPrintpointCreateDialog::SeerPrintpointCreateDialog (QWidget* parent) : QDial
|
||||
setFormat("");
|
||||
setArguments("");
|
||||
|
||||
setDPrintfType ("gdb");
|
||||
setDPrintfFunction ("");
|
||||
setDPrintfChannel ("");
|
||||
|
||||
// Connect things.
|
||||
QObject::connect(conditionalCheckBox, &QCheckBox::clicked, conditionalLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(ignoreCountCheckBox, &QCheckBox::clicked, ignoreCountLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(threadIdCheckBox, &QCheckBox::clicked, threadIdLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(conditionalCheckBox, &QCheckBox::clicked, conditionalLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(ignoreCountCheckBox, &QCheckBox::clicked, ignoreCountLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(threadIdCheckBox, &QCheckBox::clicked, threadIdLineEdit, &QLineEdit::setEnabled);
|
||||
QObject::connect(typeButtonGroup, &QButtonGroup::buttonClicked, this, &SeerPrintpointCreateDialog::handleDprintfTypeChanged);
|
||||
}
|
||||
|
||||
SeerPrintpointCreateDialog::~SeerPrintpointCreateDialog () {
|
||||
@@ -158,7 +163,72 @@ QString SeerPrintpointCreateDialog::arguments () const {
|
||||
return argumentsLineEdit->text();
|
||||
}
|
||||
|
||||
QString SeerPrintpointCreateDialog::printpointText () const {
|
||||
QString SeerPrintpointCreateDialog::dprintfType () const {
|
||||
|
||||
if (typeGdbRadioButton->isChecked()) {
|
||||
return "gdb";
|
||||
}else if (typeCallRadioButton->isChecked()) {
|
||||
return "call";
|
||||
}else if (typeAgentRadioButton->isChecked()) {
|
||||
return "agent";
|
||||
}
|
||||
|
||||
// Default.
|
||||
return "gdb";
|
||||
}
|
||||
|
||||
QString SeerPrintpointCreateDialog::dprintfFunction () const {
|
||||
|
||||
if (dprintfType() == "gdb") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return dprintfFunctionLineEdit->text();
|
||||
}
|
||||
|
||||
QString SeerPrintpointCreateDialog::dprintfChannel () const {
|
||||
|
||||
if (dprintfType() == "gdb") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return dprintfChannelLineEdit->text();
|
||||
}
|
||||
|
||||
void SeerPrintpointCreateDialog::setDPrintfType (const QString& text) {
|
||||
|
||||
if (text == "gdb") {
|
||||
typeGdbRadioButton->setChecked(true);
|
||||
dprintfFunctionLineEdit->setEnabled(false);
|
||||
dprintfChannelLineEdit->setEnabled(false);
|
||||
return;
|
||||
}else if (text == "call") {
|
||||
typeCallRadioButton->setChecked(true);
|
||||
dprintfFunctionLineEdit->setEnabled(true);
|
||||
dprintfChannelLineEdit->setEnabled(true);
|
||||
return;
|
||||
}else if (text == "agent") {
|
||||
typeAgentRadioButton->setChecked(true);
|
||||
dprintfFunctionLineEdit->setEnabled(false);
|
||||
dprintfChannelLineEdit->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Default.
|
||||
typeGdbRadioButton->setChecked(true);
|
||||
dprintfFunctionLineEdit->setEnabled(false);
|
||||
dprintfChannelLineEdit->setEnabled(false);
|
||||
}
|
||||
|
||||
void SeerPrintpointCreateDialog::setDPrintfFunction (const QString& text) {
|
||||
dprintfFunctionLineEdit->setText(text);
|
||||
}
|
||||
|
||||
void SeerPrintpointCreateDialog::setDPrintfChannel (const QString& text) {
|
||||
dprintfChannelLineEdit->setText(text);
|
||||
}
|
||||
|
||||
QString SeerPrintpointCreateDialog::printpointParameters () const {
|
||||
|
||||
// Build a printpoint specification.
|
||||
//
|
||||
@@ -234,3 +304,7 @@ QString SeerPrintpointCreateDialog::printpointText () const {
|
||||
return printpointParameters;
|
||||
}
|
||||
|
||||
void SeerPrintpointCreateDialog::handleDprintfTypeChanged () {
|
||||
setDPrintfType(dprintfType());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user