//-- void Dialog::setupUi() { // [rad] Construct internal Qt dialog ui. m_ui->setupUi(this); // [rad] Connect callbacks and setup gui elements. QObject::connect(m_ui->button_up, SIGNAL(clicked()), this, SLOT(eventButtonUp())); QObject::connect(m_ui->button_down, SIGNAL(clicked()), this, SLOT(eventButtonDown())); QObject::connect(m_ui->button_center, SIGNAL(clicked()), this, SLOT(eventButtonCenter())); }
//-- void Dialog::setupUi() { // [rad] Construct internal Qt dialog ui. m_ui->setupUi(this); // [rad] Connect callbacks and setup gui elements. QObject::connect(m_ui->button_up, SIGNAL(clicked()), this, SLOT(eventButtonUp())); QObject::connect(m_ui->button_down, SIGNAL(clicked()), this, SLOT(eventButtonDown())); QObject::connect(m_ui->button_center, SIGNAL(clicked()), this, SLOT(eventButtonCenter())); m_ui->combo->addItem("Color"); m_ui->combo->addItem("Blur"); m_ui->combo->addItem("Edge"); m_ui->combo->addItem("Grayscale"); m_ui->combo->addItem("Sepia"); QObject::connect(m_ui->combo, SIGNAL(currentIndexChanged (int)), this, SLOT(eventComboChange(int))); // [rad] Construct GL renderer. m_display = m_ui->camera; }
int mikaGlWindow::eventLoopThreaded( ) { XEvent ev; while(1) { XNextEvent(window->dpy,&ev); switch(ev.type) { case ButtonPress: #ifdef _GLDEBUG printf("mikaGlWindow::eventLoopThreaded ButtonPress\n"); #endif eventButtonDown(ev.xbutton.x,ev.xbutton.y,0); break; case ButtonRelease: #ifdef _GLDEBUG printf("mikaGlWindow::eventLoopThreaded ButtonRelease\n"); #endif eventButtonRelease(ev.xbutton.x,ev.xbutton.y,0); break; case MotionNotify: #ifdef _GLDEBUG printf("mikaGlWindow::eventLoopThread MotionNotify\n"); #endif eventButtonMotion(ev.xmotion.x,ev.xmotion.y,0); break; case Expose: #ifdef _GLDEBUG printf("mikaGlWindow::eventLoopThreaded Expose\n"); #endif eventExpose(); break; default: break; } } return 0; }