2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
|
|
|
|
2016-03-19 06:57:51 +13:00
|
|
|
#ifndef STYLENAMEEDITOR_H
|
|
|
|
#define STYLENAMEEDITOR_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
class QLineEdit;
|
|
|
|
class QPushButton;
|
|
|
|
class TPaletteHandle;
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
class StyleNameEditor : public QDialog // singleton
|
2016-03-19 06:57:51 +13:00
|
|
|
{
|
2016-06-15 18:43:10 +12:00
|
|
|
Q_OBJECT
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TPaletteHandle *m_paletteHandle;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
QLineEdit *m_styleName;
|
|
|
|
QPushButton *m_okButton, *m_applyButton, *m_cancelButton;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
StyleNameEditor(QWidget *parent = 0);
|
|
|
|
void setPaletteHandle(TPaletteHandle *ph);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
void showEvent(QShowEvent *);
|
|
|
|
void hideEvent(QHideEvent *);
|
|
|
|
void enterEvent(QEvent *);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected slots:
|
2016-06-15 18:43:10 +12:00
|
|
|
void onStyleSwitched();
|
|
|
|
void onOkPressed();
|
|
|
|
void onApplyPressed();
|
|
|
|
void onCancelPressed();
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|