Make help msgboxes optional, more intuitive radiobutton labels

This commit is contained in:
Rustam Abdulatipov 2020-06-19 12:32:56 +03:00
parent 31489669c7
commit 64d4aa7f52
2 changed files with 84 additions and 37 deletions

View File

@ -276,7 +276,9 @@ void MainWindow::pjreddie_style_msgBox(QMessageBox::Icon icon, QString title, QS
void MainWindow::open_img_dir(bool& ret)
{
pjreddie_style_msgBox(QMessageBox::Information,"Help", "Step 1. Open Your Data Set Directory");
if(ui->checkBox_showhelp->isChecked()) {
pjreddie_style_msgBox(QMessageBox::Information,"Help", "Step 1. Open Your Data Set Directory");
}
QString imgDir = QFileDialog::getExistingDirectory(
nullptr,
@ -307,7 +309,9 @@ void MainWindow::open_img_dir(bool& ret)
void MainWindow::open_obj_file(bool& ret)
{
pjreddie_style_msgBox(QMessageBox::Information,"Help", "Step 2. Open Your Label List File(*.txt or *.names)");
if(ui->checkBox_showhelp->isChecked()) {
pjreddie_style_msgBox(QMessageBox::Information,"Help", "Step 2. Open Your Label List File(*.txt or *.names)");
}
QString fileLabelList = QFileDialog::getOpenFileName(
nullptr,

View File

@ -503,40 +503,83 @@ border-color: rgb(0, 255, 255);</string>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_cropping">
<property name="minimumSize">
<size>
<width>100</width>
<height>21</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color : rgb(0, 0, 17);color : rgb(0, 255, 255);
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QCheckBox" name="checkBox_showhelp">
<property name="minimumSize">
<size>
<width>105</width>
<height>21</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color : rgb(0, 0, 17);color : rgb(0, 255, 255);
border-style: outset;
border-width: 2px;
border-color: rgb(0, 255, 255);</string>
</property>
<property name="text">
<string>with crop</string>
</property>
</property>
<property name="text">
<string>show help</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_cropping">
<property name="minimumSize">
<size>
<width>105</width>
<height>21</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color : rgb(0, 0, 17);color : rgb(0, 255, 255);
border-style: outset;
border-width: 2px;
border-color: rgb(0, 255, 255);</string>
</property>
<property name="text">
<string>save crop</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
@ -744,12 +787,12 @@ QTableView {
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>40</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
@ -787,7 +830,7 @@ QTableView {
<x>0</x>
<y>0</y>
<width>1528</width>
<height>23</height>
<height>27</height>
</rect>
</property>
</widget>