2017-07-21 18:21:34 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_DIALOG_SUB_WINDOW_H
|
|
|
|
#define QSK_DIALOG_SUB_WINDOW_H 1
|
|
|
|
|
|
|
|
#include "QskDialog.h"
|
2018-08-03 08:15:28 +02:00
|
|
|
#include "QskSubWindow.h"
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
class QSK_EXPORT QskDialogSubWindow : public QskSubWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
using Inherited = QskSubWindow;
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-07-21 18:21:34 +02:00
|
|
|
QskDialogSubWindow( QQuickItem* parent = nullptr );
|
2018-07-31 17:32:25 +02:00
|
|
|
~QskDialogSubWindow() override;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
Q_INVOKABLE QskDialog::DialogCode result() const;
|
|
|
|
Q_INVOKABLE QskDialog::DialogCode exec();
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
Q_SIGNALS:
|
2017-07-21 18:21:34 +02:00
|
|
|
void finished( QskDialog::DialogCode );
|
|
|
|
void accepted();
|
|
|
|
void rejected();
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
public Q_SLOTS:
|
2017-07-21 18:21:34 +02:00
|
|
|
void done( QskDialog::DialogCode );
|
|
|
|
void accept();
|
|
|
|
void reject();
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
protected:
|
2017-07-21 18:21:34 +02:00
|
|
|
void setResult( QskDialog::DialogCode r );
|
2018-07-31 17:32:25 +02:00
|
|
|
void keyPressEvent( QKeyEvent* ) override;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2018-07-31 17:32:25 +02:00
|
|
|
void aboutToShow() override;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
private:
|
2017-07-21 18:21:34 +02:00
|
|
|
QskDialog::DialogCode m_result;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|