OpenCores
URL https://opencores.org/ocsvn/ezidebug/ezidebug/trunk

Subversion Repositories ezidebug

[/] [ezidebug/] [trunk/] [EziDebug_src/] [button.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 EziDebug
#ifndef BUTTON_H
2
#define BUTTON_H
3
 
4
#include <QPushButton>
5
 
6
class Button : public QPushButton
7
{
8
    Q_OBJECT
9
public:
10
    explicit Button(QWidget *parent = 0);
11
    Button(QString str, QWidget *parent = 0);
12
 
13
    void setButtonPicture(QPixmap pic);
14
    void setPressPicture(QPixmap pic);
15
    void setReleasePicture(QPixmap pic);
16
    void setEnterPicture(QPixmap pic);
17
    void setLeavePicture(QPixmap pic);
18
    void set_X_Y_width_height(int x, int y, int width, int height);
19
    void resizeit(int w , int h);
20
 
21
signals:
22
 
23
public slots:
24
 
25
private:
26
    void mouseDoubleClickEvent(QMouseEvent *event);
27
    void mousePressEvent (QMouseEvent *event);
28
    void mouseMoveEvent(QMouseEvent *event);
29
    void mouseReleaseEvent (QMouseEvent *event);
30
    void enterEvent(QEvent *);
31
    void leaveEvent(QEvent *);
32
 
33
    QPixmap *buttonPicture;
34
    QPixmap *pressPicture ;
35
    QPixmap *releasePicture;
36
    QPixmap *enterPicture ;
37
    QPixmap *leavePicture ;
38
    bool flag;//鼠标enter时为true,鼠标leave时为false
39
 
40
 
41
 
42
 
43
};
44
 
45
#endif // BUTTON_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.