-
Notifications
You must be signed in to change notification settings - Fork 0
/
addbutton.cpp
51 lines (45 loc) · 1.14 KB
/
addbutton.cpp
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
#include "addbutton.h"
/**
* @brief Construct a new add Button::add Button object.
*
* Also notifies it's success by a message to stderr.
*/
addButton::addButton()
{
qInfo() << "addButton object constructed";
}
/**
* @brief Destroy the add Button::add Button object
*
* Also notifies it's success by a message to stderr.
*
*/
addButton::~addButton()
{
qInfo() << "addButton object destructed";
}
/**
* @brief This init method construct a push button and sets it layout and manages signals.
*
* This is a simple init method does nothing more rather than some self-explanatory
initilization
*
*/
void addButton::init()
{
add = new QPushButton;
add->setAutoDefault(true);
parentLayout = new QHBoxLayout(this);
parentLayout->addWidget(add);;
parentLayout->setSpacing(0);
add->setFixedHeight(50);
add->setText(" ADD ");
add->setStyleSheet("QPushButton {background-color: #A3C1DA}");
qInfo() << "bottun geometry set.";
add->setParent(this);
connect (add,
SIGNAL(released()),
this,
SIGNAL(addButtonClicked()));
qInfo() << "add button initilized.";
}