qskinny/src/inputpanel/QskVirtualKeyboard.h
Uwe Rathmann d947920abe Squashed commit of the following:
commit f429d3ab4e82ab06bfd40577aef8e2d5fdfd59fd
Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de>
Date:   Wed Aug 4 14:40:36 2021 +0200

    subcontrolProxy introduced
2021-08-04 15:06:04 +02:00

59 lines
1.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_VIRTUAL_KEYBOARD_H
#define QSK_VIRTUAL_KEYBOARD_H
#include "QskBox.h"
class QSK_EXPORT QskVirtualKeyboard : public QskBox
{
Q_OBJECT
using Inherited = QskBox;
public:
QSK_SUBCONTROLS( Panel, ButtonPanel, ButtonText )
enum Mode
{
CurrentMode = -1,
LowercaseMode,
UppercaseMode,
SpecialCharacterMode,
ModeCount
};
Q_ENUM( Mode )
QskVirtualKeyboard( QQuickItem* parent = nullptr );
~QskVirtualKeyboard() override;
void setMode( Mode );
Mode mode() const;
void updateLocale( const QLocale& );
bool hasKey( int keyCode ) const;
Q_SIGNALS:
void modeChanged( Mode );
void keySelected( int keyCode );
protected:
void updateLayout() override;
QSizeF layoutSizeHint( Qt::SizeHint, const QSizeF& ) const override;
QskAspect::Subcontrol substitutedSubcontrol(
QskAspect::Subcontrol ) const override;
private:
void buttonPressed();
class PrivateData;
std::unique_ptr< PrivateData > m_data;
};
#endif