86 lines
2.3 KiB
C++
86 lines
2.3 KiB
C++
/******************************************************************************
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
*****************************************************************************/
|
|
|
|
#ifndef QSK_INPUT_SUB_WINDOW_H
|
|
#define QSK_INPUT_SUB_WINDOW_H 1
|
|
|
|
#include "QskDialogSubWindow.h"
|
|
|
|
class QskGraphic;
|
|
class QskTextOptions;
|
|
class QskDialogButtonBox;
|
|
|
|
class QSK_EXPORT QskInputSubWindow : public QskDialogSubWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY( QString infoText READ infoText
|
|
WRITE setInfoText NOTIFY infoTextChanged FINAL )
|
|
|
|
Q_PROPERTY( QskTextOptions infoTextOptions READ infoTextOptions
|
|
WRITE setInfoTextOptions NOTIFY infoTextOptionsChanged )
|
|
|
|
Q_PROPERTY( QUrl symbolSource READ symbolSource
|
|
WRITE setSymbolSource NOTIFY symbolSourceChanged FINAL )
|
|
|
|
Q_PROPERTY( QskDialog::Actions dialogActions
|
|
READ dialogActions WRITE setDialogActions )
|
|
|
|
Q_PROPERTY( QskDialog::Action defaultDialogAction
|
|
READ defaultDialogAction WRITE setDefaultDialogAction )
|
|
|
|
using Inherited = QskDialogSubWindow;
|
|
|
|
public:
|
|
QskInputSubWindow( QQuickItem* parent = nullptr );
|
|
~QskInputSubWindow() override;
|
|
|
|
QskDialog::Actions dialogActions() const;
|
|
void setDialogActions( QskDialog::Actions );
|
|
|
|
QskDialog::Action defaultDialogAction() const;
|
|
void setDefaultDialogAction( QskDialog::Action );
|
|
|
|
void setInfoTextOptions( const QskTextOptions& );
|
|
QskTextOptions infoTextOptions() const;
|
|
|
|
QString infoText() const;
|
|
|
|
void setSymbolSource( const QUrl& url );
|
|
QUrl symbolSource() const;
|
|
|
|
void setSymbolType( int symbolType );
|
|
|
|
void setSymbol( const QskGraphic& );
|
|
QskGraphic symbol() const;
|
|
|
|
QskDialog::Action clickedAction() const;
|
|
|
|
QskDialogButtonBox* buttonBox();
|
|
const QskDialogButtonBox* buttonBox() const;
|
|
|
|
public Q_SLOTS:
|
|
void setInfoText( const QString& );
|
|
|
|
Q_SIGNALS:
|
|
void infoTextChanged();
|
|
void infoTextOptionsChanged();
|
|
void symbolSourceChanged();
|
|
|
|
protected:
|
|
void setInputControl( QskControl* );
|
|
QskControl* inputControl() const;
|
|
|
|
void keyPressEvent( QKeyEvent* ) override;
|
|
|
|
private:
|
|
void updateTitleBox();
|
|
|
|
class PrivateData;
|
|
std::unique_ptr< PrivateData > m_data;
|
|
};
|
|
|
|
#endif
|