qavrg 0.0.28
|
#include <qavrgtestwindow.h>
Public Slots | |
void | increment () |
void | doubleIncrement () |
void | countFive () |
void | countThousand () |
Signals | |
void | set_Integer (int value) |
Public Member Functions | |
QavrgTestWindow (int useProxy, int useTransaction, QWidget *parent=NULL) | |
Public Attributes | |
QSpinBox * | m_SpinBox |
QPushButton * | m_Increment |
QPushButton * | m_DoubleIncrement |
QPushButton * | m_CountFive |
QPushButton * | m_CountThousand |
Private Attributes | |
int | m_UseProxy |
int | m_UseTransaction |
QavrgTestThread * | m_Thread |
Definition at line 83 of file qavrgtestwindow.h.
QavrgTestWindow::QavrgTestWindow | ( | int | useProxy, |
int | useTransaction, | ||
QWidget * | parent = NULL |
||
) |
Definition at line 133 of file qavrgtestwindow.cpp.
References countFive(), countThousand(), doubleIncrement(), increment(), m_CountFive, m_CountThousand, m_DoubleIncrement, m_Increment, m_SpinBox, m_Thread, m_UseProxy, and m_UseTransaction.
: QWidget(parent), m_SpinBox(NULL), m_Increment(NULL), m_DoubleIncrement(NULL), m_CountFive(NULL), m_UseProxy(useProxy), m_UseTransaction(useTransaction), m_Thread(NULL) { m_Thread = new QavrgTestThread(m_UseProxy, m_UseTransaction, this, this); QHBoxLayout *layout = new QHBoxLayout(); m_SpinBox = new QSpinBox(); m_Increment = new QPushButton("I++"); m_DoubleIncrement = new QPushButton("I++;I++"); m_CountFive = new QPushButton("12345"); m_CountThousand = new QPushButton("Thousand"); m_SpinBox -> setMinimum(-1000); m_SpinBox -> setMaximum(99999); layout -> addWidget(m_SpinBox); layout -> addWidget(m_Increment); layout -> addWidget(m_DoubleIncrement); layout -> addWidget(m_CountFive); layout -> addWidget(m_CountThousand); setLayout(layout); connect(m_Increment, SIGNAL(clicked()), this, SLOT(increment())); connect(m_DoubleIncrement, SIGNAL(clicked()), this, SLOT(doubleIncrement())); connect(m_CountFive, SIGNAL(clicked()), this, SLOT(countFive())); connect(m_CountThousand, SIGNAL(clicked()), this, SLOT(countThousand())); m_Thread -> start(); show(); }
void QavrgTestWindow::countFive | ( | ) | [slot] |
Definition at line 192 of file qavrgtestwindow.cpp.
References m_Thread, and set_Integer().
Referenced by QavrgTestWindow().
{ printf("QavrgTestWindow::countFive"); m_Thread -> m_Integer -> set_Integer(1); m_Thread -> m_Integer -> set_Integer(2); m_Thread -> m_Integer -> set_Integer(3); m_Thread -> m_Integer -> set_Integer(4); m_Thread -> m_Integer -> set_Integer(5); }
void QavrgTestWindow::countThousand | ( | ) | [slot] |
Definition at line 203 of file qavrgtestwindow.cpp.
References m_Thread, and set_Integer().
Referenced by QavrgTestWindow().
{ for (int i=1; i<=1000; i++) { m_Thread -> m_Integer -> set_Integer(i); } }
void QavrgTestWindow::doubleIncrement | ( | ) | [slot] |
Definition at line 184 of file qavrgtestwindow.cpp.
References increment().
Referenced by QavrgTestWindow().
void QavrgTestWindow::increment | ( | ) | [slot] |
Definition at line 174 of file qavrgtestwindow.cpp.
References m_Thread, and set_Integer().
Referenced by doubleIncrement(), and QavrgTestWindow().
{ int val = m_Thread -> m_Integer -> get_Integer(); printf("QavrgTestWindow::increment -> %d\n", val); m_Thread -> m_Integer -> set_Integer(val+1); // emit set_Integer(val+1); }
void QavrgTestWindow::set_Integer | ( | int | value | ) | [signal] |
Referenced by countFive(), countThousand(), and increment().
QPushButton* QavrgTestWindow::m_CountFive |
Definition at line 103 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
QPushButton* QavrgTestWindow::m_CountThousand |
Definition at line 104 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
QPushButton* QavrgTestWindow::m_DoubleIncrement |
Definition at line 102 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
QPushButton* QavrgTestWindow::m_Increment |
Definition at line 101 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
QSpinBox* QavrgTestWindow::m_SpinBox |
Definition at line 100 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
QavrgTestThread* QavrgTestWindow::m_Thread [private] |
Definition at line 109 of file qavrgtestwindow.h.
Referenced by countFive(), countThousand(), increment(), and QavrgTestWindow().
int QavrgTestWindow::m_UseProxy [private] |
Definition at line 107 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().
int QavrgTestWindow::m_UseTransaction [private] |
Definition at line 108 of file qavrgtestwindow.h.
Referenced by QavrgTestWindow().