2014-06-24 10:23:39 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file dialogundo.h
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 23 6, 2014
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2014-06-24 10:23:39 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2015-02-27 11:27:48 +01:00
|
|
|
** Copyright (C) 2013-2015 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2014-06-24 10:23:39 +02:00
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef DIALOGUNDO_H
|
|
|
|
#define DIALOGUNDO_H
|
|
|
|
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <qcompilerdetection.h>
|
2014-06-24 10:23:39 +02:00
|
|
|
#include <QDialog>
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
2014-06-24 10:23:39 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class DialogUndo;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum class UndoButton {Undo, Fix, Cancel};
|
|
|
|
|
|
|
|
class DialogUndo : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2016-07-18 17:09:15 +02:00
|
|
|
explicit DialogUndo(QWidget *parent = nullptr);
|
2014-06-24 10:23:39 +02:00
|
|
|
UndoButton Result() const;
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual ~DialogUndo() override;
|
2014-06-24 10:23:39 +02:00
|
|
|
protected:
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual void closeEvent ( QCloseEvent *event ) override;
|
2016-07-18 17:09:15 +02:00
|
|
|
private slots:
|
|
|
|
void Cancel();
|
2014-06-24 10:23:39 +02:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(DialogUndo)
|
|
|
|
Ui::DialogUndo *ui;
|
|
|
|
UndoButton result;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline UndoButton DialogUndo::Result() const
|
|
|
|
{
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // DIALOGUNDO_H
|