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,39 +20,40 @@
|
||||
#ifndef ECOMBOBOX_H
|
||||
#define ECOMBOBOX_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QBoxLayout>
|
||||
#include <QTreeView>
|
||||
#include <QLabel>
|
||||
#include "clineedit.h"
|
||||
#include "qad_widgets_export.h"
|
||||
#include <QComboBox>
|
||||
|
||||
|
||||
class CLineEdit;
|
||||
class QLabel;
|
||||
class QTreeView;
|
||||
|
||||
|
||||
class QAD_WIDGETS_EXPORT EComboBox: public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EComboBox(QWidget * parent = 0);
|
||||
explicit EComboBox(QWidget * parent = nullptr);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
public slots:
|
||||
virtual void showPopup();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent *e);
|
||||
void showPopup() override;
|
||||
|
||||
QTreeView iv;
|
||||
QWidget header;
|
||||
QLabel icon;
|
||||
CLineEdit filter;
|
||||
QFont nfont, ifont;
|
||||
|
||||
private slots:
|
||||
void filterChanged(const QString & text, bool first = false);
|
||||
|
||||
void filterChanged(const QString & text, bool first);
|
||||
|
||||
signals:
|
||||
void rowsChanged();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
QTreeView * iv;
|
||||
QWidget * header;
|
||||
QLabel * icon;
|
||||
CLineEdit * filter;
|
||||
QFont nfont, ifont;
|
||||
};
|
||||
|
||||
#endif // ECOMBOBOX_H
|
||||
|
||||
Reference in New Issue
Block a user