Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
ejmain.h 949 Bytes
Copy Edit Web IDE Raw Blame History
unix_chen authored 2018-03-26 07:59 . init
#ifndef EJMAIN_H
#define EJMAIN_H
#include <QWidget>
#include <QIcon>
#include <QSplitter>
#include <QMouseEvent>
#include <QPushButton>
class EjMain
: public QWidget
{
Q_OBJECT
public:
EjMain(QWidget *parent = 0);
~EjMain();
void addSidebarItem(QWidget *item, QString &title);
protected:
void mousePressEvent ( QMouseEvent * event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void resizeEvent(QResizeEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
private:
void setBtnPos();
void setBtnIcon();
private slots:
void slotClickedBtn();
void slotSplitterMoved(int pos, int index);
void slotNew(bool);
private:
QPoint dragPosition;
bool bPressFlag;
QSplitter *splitter;
QFrame *contentFrame;
QFrame *listFrame;
QPushButton *pushButton;
QIcon leftIcon;
QIcon rightIcon;
};
#endif // EJMAIN_H

Comment ( 0 )

Sign in for post a comment