GUI: Tweak the 'Human knowledge' tab
This commit is contained in:
parent
f239d4675b
commit
8eaa50c050
|
@ -178,6 +178,15 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent)
|
||||||
const QRegExp undefRegExp("\\s*([a-zA-Z_][a-zA-Z0-9_]*[; ]*)*");
|
const QRegExp undefRegExp("\\s*([a-zA-Z_][a-zA-Z0-9_]*[; ]*)*");
|
||||||
mUI.mEditUndefines->setValidator(new QRegExpValidator(undefRegExp, this));
|
mUI.mEditUndefines->setValidator(new QRegExpValidator(undefRegExp, this));
|
||||||
|
|
||||||
|
// Human knowledge..
|
||||||
|
mUI.mListUnknownFunctionReturn->clear();
|
||||||
|
mUI.mListUnknownFunctionReturn->addItem("rand()");
|
||||||
|
for (int row = 0; row < mUI.mListUnknownFunctionReturn->count(); ++row) {
|
||||||
|
QListWidgetItem *item = mUI.mListUnknownFunctionReturn->item(row);
|
||||||
|
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag
|
||||||
|
item->setCheckState(item->text() == "rand()" ? Qt::Checked : Qt::Unchecked); // AND initialize check state
|
||||||
|
}
|
||||||
|
|
||||||
connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &ProjectFileDialog::ok);
|
connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &ProjectFileDialog::ok);
|
||||||
connect(mUI.mBtnBrowseBuildDir, &QPushButton::clicked, this, &ProjectFileDialog::browseBuildDir);
|
connect(mUI.mBtnBrowseBuildDir, &QPushButton::clicked, this, &ProjectFileDialog::browseBuildDir);
|
||||||
connect(mUI.mBtnClearImportProject, &QPushButton::clicked, this, &ProjectFileDialog::clearImportProject);
|
connect(mUI.mBtnClearImportProject, &QPushButton::clicked, this, &ProjectFileDialog::clearImportProject);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>642</width>
|
<width>888</width>
|
||||||
<height>585</height>
|
<height>585</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -415,64 +415,55 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="mTabCustom">
|
<widget class="QWidget" name="mTabHumanKnownledge">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Custom</string>
|
<string>Human knowledge</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
<property name="horizontalScrollBarPolicy">
|
<property name="title">
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<string>Input from file/network/user/...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="widgetResizable">
|
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>605</width>
|
|
||||||
<height>522</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_22">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Here it will be possible to configure "human knowledge" about your project.</string>
|
<string>If the return value from a function below is always completely unknown, then click on its checkbox</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
<property name="title">
|
<item>
|
||||||
<string>Arbitrary input from file/network/user/...</string>
|
<widget class="QListWidget" name="mListUnknownFunctionReturn">
|
||||||
</property>
|
<property name="maximumSize">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TODO: Select the functions that give your project "arbitrary input" ....</string>
|
<string>rand()</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="mButtonAddUnknownFunctionReturn">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add..</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_14">
|
|
||||||
<property name="title">
|
|
||||||
<string>Interface headers</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_20">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>TODO: Select "interface" headers. All public functions/variables in these must be "safe".</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -510,58 +501,28 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_12">
|
|
||||||
<property name="title">
|
|
||||||
<string>Classes</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="checkBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>All classes must have a "safe" public interface</string>
|
<string>All classes must have a "safe" public interface</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<spacer name="verticalSpacer_11">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<widget class="QLabel" name="label_4">
|
<enum>Qt::Vertical</enum>
|
||||||
<property name="text">
|
|
||||||
<string>"Safe" classes:</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="sizeHint" stdset="0">
|
||||||
</item>
|
<size>
|
||||||
<item>
|
<width>20</width>
|
||||||
<widget class="QLineEdit" name="lineEdit"/>
|
<height>40</height>
|
||||||
</item>
|
</size>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_15">
|
|
||||||
<property name="title">
|
|
||||||
<string>Global variables</string>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
</spacer>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>TODO: Possible values of global variables</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Loading…
Reference in New Issue