qskinny/src/dialogs/QskSelectionSubWindow.h

62 lines
1.8 KiB
C
Raw Normal View History

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_SELECTION_SUB_WINDOW_H
#define QSK_SELECTION_SUB_WINDOW_H 1
2018-11-06 18:54:21 +01:00
#include "QskDialogSubWindow.h"
2017-07-21 18:21:34 +02:00
2018-11-06 18:54:21 +01:00
class QskTextOptions;
2017-07-21 18:21:34 +02:00
2018-11-06 18:54:21 +01:00
class QSK_EXPORT QskSelectionSubWindow : public QskDialogSubWindow
2017-07-21 18:21:34 +02:00
{
Q_OBJECT
2018-11-06 18:54:21 +01:00
Q_PROPERTY( QString infoText READ infoText
WRITE setInfoText NOTIFY infoTextChanged )
Q_PROPERTY( QskTextOptions infoTextOptions READ infoTextOptions
WRITE setInfoTextOptions NOTIFY infoTextOptionsChanged )
2017-07-21 18:21:34 +02:00
Q_PROPERTY( QStringList entries READ entries
WRITE setEntries NOTIFY entriesChanged FINAL )
Q_PROPERTY( int selectedRow READ selectedRow
WRITE setSelectedRow NOTIFY selectedRowChanged FINAL )
2018-11-06 18:54:21 +01:00
using Inherited = QskDialogSubWindow;
2017-07-21 18:21:34 +02:00
2018-08-03 08:15:28 +02:00
public:
2017-07-21 18:21:34 +02:00
QskSelectionSubWindow( QQuickItem* parent = nullptr );
2018-07-31 17:32:25 +02:00
~QskSelectionSubWindow() override;
2017-07-21 18:21:34 +02:00
2018-11-06 18:54:21 +01:00
void setInfoTextOptions( const QskTextOptions& );
QskTextOptions infoTextOptions() const;
QString infoText() const;
2017-07-21 18:21:34 +02:00
Q_INVOKABLE QStringList entries() const;
Q_INVOKABLE int selectedRow() const;
Q_INVOKABLE QString selectedEntry() const;
2018-08-03 08:15:28 +02:00
public Q_SLOTS:
2018-11-06 18:54:21 +01:00
void setInfoText( const QString& );
2017-07-21 18:21:34 +02:00
void setEntries( const QStringList& );
void setSelectedRow( int row );
2018-08-03 08:15:28 +02:00
Q_SIGNALS:
2018-11-06 18:54:21 +01:00
void infoTextChanged( const QString& );
void infoTextOptionsChanged( const QskTextOptions& );
2017-07-21 18:21:34 +02:00
void selectedRowChanged( int );
void selectedEntryChanged( const QString& );
void entriesChanged();
2018-11-06 18:54:21 +01:00
private:
class PrivateData;
std::unique_ptr< PrivateData > m_data;
2017-07-21 18:21:34 +02:00
};
#endif