You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#ifndef NMGUIDRAWERWIDGET_H
|
|
|
|
|
|
#define NMGUIDRAWERWIDGET_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "nmGUI_global.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
#include <QToolButton>
|
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
|
|
|
|
class NM_GUI_EXPORT nmGUIDrawerWidget : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit nmGUIDrawerWidget(const QString &sTitle, QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
void initUI();
|
|
|
|
|
|
|
|
|
|
|
|
// <20>۵<EFBFBD><DBB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void setExpanded(bool expanded);
|
|
|
|
|
|
bool isExpanded() const;
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void setContentLayout(QLayout *layout);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
void setStyleSheet(const QString &style);
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
void expansionChanged(bool expanded);
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void toggleExpand();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
bool m_bExpanded; // <20>۵<EFBFBD>״̬
|
|
|
|
|
|
QString m_sTitle; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
QHBoxLayout *m_pHeaderLayout; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QToolButton *m_pToggleButton; // <20>۵<EFBFBD><DBB5><EFBFBD>ť
|
|
|
|
|
|
QLabel* m_pTitleLabel; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ
|
|
|
|
|
|
QWidget *m_pWidgetContent; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // NMGUIDRAWERWIDGET_H
|