FileActionDialog now supports variable modal buttons
FossilOrigin-Name: d80b84c6b58b7daf71174d32a8c33cab0e2aabac
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <QStandardItemModel>
|
||||
#include <QCheckBox>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
namespace Ui {
|
||||
class FileActionDialog;
|
||||
@ -12,18 +12,27 @@ namespace Ui {
|
||||
class FileActionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileActionDialog(QWidget *parent, const QString &title, const QString &message, const QStringList &files, const QString &checkBoxText=QString(), bool *checkBoxResult=0);
|
||||
explicit FileActionDialog(QWidget *parent, const QString &title, const QString &message, const QStringList &listData, const QString &checkBoxText=QString(), bool *checkBoxResult=0);
|
||||
~FileActionDialog();
|
||||
|
||||
static bool run(QWidget *parent, const QString &title, const QString &message, const QStringList &files, const QString &checkBoxText=QString(), bool *checkBoxResult=0);
|
||||
static bool run(QWidget *parent, const QString &title, const QString &message, const QStringList &listData, const QString &checkBoxText=QString(), bool *checkBoxResult=0);
|
||||
|
||||
typedef QDialogButtonBox::StandardButton StandardButton;
|
||||
typedef QDialogButtonBox::StandardButtons StandardButtons;
|
||||
|
||||
static StandardButton runStandardButtons(QWidget *parent, StandardButtons, const QString &title, const QString &message, const QStringList &listData);
|
||||
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_clicked(QAbstractButton *button);
|
||||
|
||||
private:
|
||||
Ui::FileActionDialog *ui;
|
||||
QStandardItemModel itemModel;
|
||||
QCheckBox *checkBox;
|
||||
class QCheckBox *checkBox;
|
||||
bool *checkBoxResult;
|
||||
StandardButton clickedButton;
|
||||
};
|
||||
|
||||
#endif // FILEACTIONDIALOG_H
|
||||
|
Reference in New Issue
Block a user