#ifndef virtual_keyboard_layout_h
#define virtual_keyboard_layout_h

#include <QWidget>
#include "virtual_keyboard_layout_page.h"


class VirtualKeyboardLayout: public QObject {
	Q_OBJECT

public:
	VirtualKeyboardLayout(QJsonObject root);
	~VirtualKeyboardLayout();

	QVector<VirtualKeyboardLayoutPage * > getPages() const {return pages;}
	VirtualKeyboardLayoutPage * getPageByName(QString name) const;

	void setDefaultPage();
	void setCurrentPage(VirtualKeyboardLayoutPage * p);
	void applyHints(Qt::InputMethodHints hints);

protected:
	void setGotoEnabled(bool yes);
	void setCapitalEnabled(bool yes);
	void setCapital(bool yes);

	QVector<VirtualKeyboardLayoutPage * > pages;
	VirtualKeyboardLayoutPage * current_page = nullptr;
	QString default_page;

private slots:

signals:
	void gotoPageRequest(QString);
	void hideRequest();

};

#endif
