增加全选和取消全选功能.
Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
parent
390ad25bc4
commit
1ccb5a91a2
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Lion Chen/QQ:174980551
|
* @author Rick Chan (cy187lion@sina.com)
|
||||||
* @date: 2014-01-23
|
* @date 2014-01-23
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Lion Chen/QQ:174980551
|
* @author Rick Chan (cy187lion@sina.com)
|
||||||
* @date: 2014-01-23
|
* @date 2014-01-23
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ENGINE_H
|
#ifndef ENGINE_H
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Lion Chen/QQ:174980551
|
* @author Rick Chan (cy187lion@sina.com)
|
||||||
* @date: 2014-01-23
|
* @date 2014-01-23
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qtproaddfilehelper.h"
|
#include "qtproaddfilehelper.h"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Lion Chen/QQ:174980551
|
* @author Rick Chan (cy187lion@sina.com)
|
||||||
* @date: 2014-01-23
|
* @date 2020-08-28
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qtproaddfilehelper.h"
|
#include "qtproaddfilehelper.h"
|
||||||
@ -21,6 +21,27 @@ QtProAddFileHelper::QtProAddFileHelper(QWidget *parent) :
|
|||||||
StatusLabel->adjustSize();
|
StatusLabel->adjustSize();
|
||||||
ui->statusBar->addWidget(StatusLabel);
|
ui->statusBar->addWidget(StatusLabel);
|
||||||
StatusLabel->setText("By: Lion Chen @Giraffe Ver:2.3.0");
|
StatusLabel->setText("By: Lion Chen @Giraffe Ver:2.3.0");
|
||||||
|
|
||||||
|
CheckBoxes.clear();
|
||||||
|
CheckBoxes.append(ui->cCheckBox);
|
||||||
|
CheckBoxes.append(ui->CpupuCheckBox);
|
||||||
|
CheckBoxes.append(ui->cppCheckBox);
|
||||||
|
CheckBoxes.append(ui->cxxCheckBox);
|
||||||
|
CheckBoxes.append(ui->ccCheckBox);
|
||||||
|
CheckBoxes.append(ui->tccCheckBox);
|
||||||
|
CheckBoxes.append(ui->hCheckBox);
|
||||||
|
CheckBoxes.append(ui->hpupuCheckBox);
|
||||||
|
CheckBoxes.append(ui->hppCheckBox);
|
||||||
|
CheckBoxes.append(ui->hxxCheckBox);
|
||||||
|
CheckBoxes.append(ui->MkfCheckBox);
|
||||||
|
CheckBoxes.append(ui->asmCheckBox);
|
||||||
|
CheckBoxes.append(ui->sCheckBox);
|
||||||
|
CheckBoxes.append(ui->xmlCheckBox);
|
||||||
|
|
||||||
|
for(QList<QCheckBox*>::Iterator itr=CheckBoxes.begin();
|
||||||
|
itr!=CheckBoxes.end();
|
||||||
|
itr++)
|
||||||
|
connect(*itr, &QCheckBox::clicked, this, &QtProAddFileHelper::OnCheckBoxesClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtProAddFileHelper::~QtProAddFileHelper()
|
QtProAddFileHelper::~QtProAddFileHelper()
|
||||||
@ -99,8 +120,8 @@ void QtProAddFileHelper::on_OKButton_clicked()
|
|||||||
* | | hxx | hpp | h++ | h |
|
* | | hxx | hpp | h++ | h |
|
||||||
* | 0000 | 1 | 1 | 1 | 1 |
|
* | 0000 | 1 | 1 | 1 | 1 |
|
||||||
*
|
*
|
||||||
* |......|.xml.|.s.|.asm.|.Makefile.|
|
* | |.xml.|.s.|.asm.|.Makefile.|
|
||||||
* |.0000.|..1..|.1.|..1..|.....1....|
|
* | 0000 | 1 | 1 | 1 | 1 |
|
||||||
*/
|
*/
|
||||||
FILE_TYPES selectedFile;
|
FILE_TYPES selectedFile;
|
||||||
/**< Sources */
|
/**< Sources */
|
||||||
@ -282,3 +303,38 @@ void QtProAddFileHelper::on_PathEdit_editingFinished()
|
|||||||
ui->ProEdit->setText(ui->PathEdit->text());
|
ui->ProEdit->setText(ui->PathEdit->text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtProAddFileHelper::on_SeleAllcheckBox_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked)
|
||||||
|
{
|
||||||
|
for(QList<QCheckBox*>::Iterator itr=CheckBoxes.begin();
|
||||||
|
itr!=CheckBoxes.end();
|
||||||
|
itr++)
|
||||||
|
(*itr)->setChecked(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(QList<QCheckBox*>::Iterator itr=CheckBoxes.begin();
|
||||||
|
itr!=CheckBoxes.end();
|
||||||
|
itr++)
|
||||||
|
(*itr)->setChecked(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtProAddFileHelper::OnCheckBoxesClicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked)
|
||||||
|
{
|
||||||
|
for(QList<QCheckBox*>::Iterator itr=CheckBoxes.begin();
|
||||||
|
itr!=CheckBoxes.end();
|
||||||
|
itr++)
|
||||||
|
{
|
||||||
|
if(!(*itr)->isChecked())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui->SeleAllcheckBox->setChecked(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui->SeleAllcheckBox->setChecked(false);
|
||||||
|
}
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Lion Chen/QQ:174980551
|
* @author Rick Chan (cy187lion@sina.com)
|
||||||
* @date: 2014-01-23
|
* @date 2020-08-28
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef QTPROADDFILEHELPER_H
|
#ifndef QTPROADDFILEHELPER_H
|
||||||
#define QTPROADDFILEHELPER_H
|
#define QTPROADDFILEHELPER_H
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
/**
|
|
||||||
* @author: Lion Chen/QQ:174980551
|
|
||||||
* @data: 2014-01-23
|
|
||||||
*/
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include <QList>
|
||||||
|
#include <QCheckBox>
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@ -31,6 +29,7 @@ private:
|
|||||||
Ui::QtProAddFileHelper *ui;
|
Ui::QtProAddFileHelper *ui;
|
||||||
QLabel *StatusLabel;
|
QLabel *StatusLabel;
|
||||||
Engine *KEngine;
|
Engine *KEngine;
|
||||||
|
QList<QCheckBox*> CheckBoxes;
|
||||||
|
|
||||||
void SetUiEnable(bool en);
|
void SetUiEnable(bool en);
|
||||||
|
|
||||||
@ -40,6 +39,9 @@ private slots:
|
|||||||
void on_ProButton_clicked();
|
void on_ProButton_clicked();
|
||||||
void on_PathButton_clicked();
|
void on_PathButton_clicked();
|
||||||
void on_PathEdit_editingFinished();
|
void on_PathEdit_editingFinished();
|
||||||
|
void on_SeleAllcheckBox_clicked(bool checked);
|
||||||
|
|
||||||
|
void OnCheckBoxesClicked(bool checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QTPROADDFILEHELPER_H
|
#endif // QTPROADDFILEHELPER_H
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>240</width>
|
<width>340</width>
|
||||||
<height>305</height>
|
<height>305</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -206,15 +206,34 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="RelaPthcheckBox">
|
<widget class="QCheckBox" name="RelaPthcheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>相对路径方式</string>
|
<string>使用相对路径</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="SeleAllcheckBox">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>全选</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="OKButton">
|
<widget class="QPushButton" name="OKButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>确 定</string>
|
<string>确 定</string>
|
||||||
</property>
|
</property>
|
||||||
@ -232,7 +251,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>340</width>
|
<width>340</width>
|
||||||
<height>23</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user