refactoring qad widgets part 1
c++ cast, nullptr, forward declaration, agregate ui, connect to member functions, order and clear includes
This commit is contained in:
@@ -20,10 +20,8 @@
|
||||
#ifndef CHARDIALOG_H
|
||||
#define CHARDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMetaEnum>
|
||||
#include <QDebug>
|
||||
#include "qad_widgets_export.h"
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
@@ -35,26 +33,12 @@ class QAD_WIDGETS_EXPORT CharDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CharDialog(QWidget * parent = 0);
|
||||
~CharDialog();
|
||||
explicit CharDialog(QWidget * parent = nullptr);
|
||||
~CharDialog() override;
|
||||
|
||||
QChar selectedChar() {return sel_char;}
|
||||
void setCharFont(const QFont & f);
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent * e);
|
||||
virtual bool eventFilter(QObject * o, QEvent * e);
|
||||
virtual void resizeEvent(QResizeEvent * );
|
||||
void clear();
|
||||
|
||||
Ui::CharDialog * ui;
|
||||
QVector<QVector<QChar> > chars;
|
||||
QVector<QChar> * cur;
|
||||
QChar sel_char;
|
||||
int size, csize;
|
||||
|
||||
private slots:
|
||||
void on_comboCategory_currentIndexChanged(int index);
|
||||
void on_verticalScroll_valueChanged(int index);
|
||||
@@ -66,7 +50,18 @@ private slots:
|
||||
|
||||
signals:
|
||||
void charSelected(QChar ch);
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent * e) override;
|
||||
bool eventFilter(QObject * o, QEvent * e) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
void clear();
|
||||
|
||||
Ui::CharDialog * ui;
|
||||
QVector<QVector<QChar> > chars;
|
||||
QVector<QChar> * cur;
|
||||
QChar sel_char;
|
||||
int size, csize;
|
||||
};
|
||||
|
||||
#endif // CHARDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user