forked from torinkwok/wxNote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNestingButton.cpp
More file actions
80 lines (69 loc) · 4.29 KB
/
Copy pathNestingButton.cpp
File metadata and controls
80 lines (69 loc) · 4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
///:
/*****************************************************************************
** **
** .======. **
** | INRI | **
** | | **
** | | **
** .========' '========. **
** | _ xxxx _ | **
** | /_;-.__ / _\ _.-;_\ | **
** | `-._`'`_/'`.-' | **
** '========.`\ /`========' **
** | | / | **
** |/-.( | **
** |\_._\ | **
** | \ \`;| **
** | > |/| **
** | / // | **
** | |// | **
** | \(\ | **
** | `` | **
** | | **
** | | **
** | | **
** | | **
** \\ _ _\\| \// |//_ _ \// _ **
** ^ `^`^ ^`` `^ ^` ``^^` `^^` `^ `^ **
** **
** Copyright © 1997-2013 by Tong G. **
** ALL RIGHTS RESERVED. **
** **
****************************************************************************/
#include "wxNote_Gui/wxNote_Button/NestingButton.h"
#include <QLineEdit>
#include <QLayout>
//.._NestingButton类实现
/* 构造函数实现 */
_NestingButton::_NestingButton(const QIcon &_Icon, QLineEdit *_LineEdit)
{
QSize _Size(_LineEdit->sizeHint().height(),
_LineEdit->sizeHint().height());
setMinimumSize(_Size);
setMaximumSize(_Size);
setFocusPolicy(Qt::NoFocus);
setCursor(QCursor(Qt::ArrowCursor));
setFlat(true);
setIcon(_Icon);
QHBoxLayout* _ButtonLayout = new QHBoxLayout;
_ButtonLayout->setContentsMargins(0, 0, 0, 0);
_ButtonLayout->addStretch();
_ButtonLayout->addWidget(this);
_LineEdit->setLayout(_ButtonLayout);
_LineEdit->setTextMargins(0, 1, _Size.width(), 1);
}
////////////////////////////////////////////////////////////////////////////
/***************************************************************************
** **
** _________ _______ **
** |___ ___| / ______ \ **
** | | _______ _______ _______ | / |_| **
** | | || || || || || || | | _ __ **
** | | || || || || || || | | |__ \ **
** | | || || || || || || | \_ _ __| | _ **
** |_| ||_____|| || || ||_____|| \________/ |_| **
** || **
** ||_____|| **
** **
***************************************************************************/
///:~