ICMainWindow::ICMainWindow(ICServer *theServer, QWidget *parent) : QMainWindow(parent), server(theServer), questionDialog(new ICNewQuestionDialog(this)), onCanvas(false) { setupUi(this); setWindowIcon(QIcon(":/images/icimage.png")); //this->setAttribute(Qt::WA_TranslucentBackground, true); setWindowFlags(Qt::FramelessWindowHint); //questionDialog->setWindowOpacity(0.8); questionDialog->setWindowFlags(questionDialog->windowFlags() | Qt::FramelessWindowHint); connect(exitButton, SIGNAL(clicked()), this, SLOT(close())); connect(minimizeButton, SIGNAL(clicked()), this, SLOT(showMinimized())); connect(understandButton, SIGNAL(clicked()), this, SLOT(understand())); connect(questionButton, SIGNAL(clicked()), this, SLOT(question())); connect(stopButton, SIGNAL(clicked()), this, SLOT(stop())); connect(server, SIGNAL(newAnswerArrived(QString)), this, SLOT(newAnswerArrived(QString))); connect(server, SIGNAL(connectionClosed()), this, SLOT(connectionClosed())); connect(questionDialog, SIGNAL(newQuestion(int,int)), this, SLOT(newQuestionReady(int,int))); sidLabel->setText(server->getIdentifier()); countLabel->setText("0/0"); }
int main () { printf("%s", understand("help")); return 0; }