waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

foo.cpp (687B)


      1 // Thomas Nagy, 2011-2016
      2 
      3 #include "foo.h"
      4 
      5 Foo::Foo() : QWidget(NULL) {
      6 	m_button = new QPushButton("Foo Button", this);
      7 	m_button->setGeometry(QRect(QPoint(50, 60),
      8 	QSize(120, 50)));
      9 	connect(m_button, SIGNAL (released()), this, SLOT (handleButton()));
     10 	myToggle = true;
     11 }
     12 
     13 void Foo::handleButton() {
     14 	if (myToggle) {
     15 		m_button->setText("Button Foo");
     16 	} else {
     17 		m_button->setText("Foo Button");
     18 	}
     19 	myToggle = !myToggle;
     20 }
     21 
     22 int Foo::FortyTwo() {
     23 	return 42;
     24 }
     25 
     26 class Bar_private : public QWidget {
     27         Q_OBJECT
     28         signals:
     29                 void test();
     30         public:
     31                 Bar_private();
     32 };
     33 
     34 Bar_private::Bar_private() : QWidget(NULL) {
     35 }
     36 
     37 #include "foo.moc"
     38