Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
ejsidebar.h 680 Bytes
Copy Edit Web IDE Raw Blame History
unix_chen authored 2018-03-26 07:59 . init
#ifndef EJSIDEBAR_H
#define EJSIDEBAR_H
#include <QWidget>
#include <QAction>
#include <QIcon>
class EjSideBar : public QWidget
{
Q_OBJECT
public:
EjSideBar(QWidget * parent = 0);
void addAction(QAction *action);
QAction *addAction(const QString &text, const QIcon &icon = QIcon());
protected:
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
QSize minimumSizeHint() const;
QAction* actionAt(const QPoint &at);
private:
QList<QAction*> m_actions;
QAction *m_pressedAction;
QAction *m_checkedAction;
int action_height= 90;
};
#endif // EJSIDEBAR_H

Comment ( 0 )

Sign in for post a comment