void ODBCStartAdb(SINT cmd) { adb_start(cmd); ODBCStart(cmd); }
//init all the basic elements of the window. Window::Window() { this->setWindowTitle("Sanajahti"); //init some text labels QLabel* label1 = new QLabel("Width:", this); label1->move(5, 10); QLabel* label2 = new QLabel("Height:", this); label2->move(80, 10); QLabel* label4 = new QLabel("Words", this); label4->move(3,68); //init textpanel for x length xpanel = new QLineEdit("4", this); xpanel->move(52, 4); xpanel->setFixedWidth(25); xpanel->setValidator(new QIntValidator(1, 99, this)); connect(xpanel, SIGNAL(textChanged(const QString &)), this, SLOT(gridChange())); //init textpanel for y length ypanel= new QLineEdit("4", this); ypanel->move(132, 4); ypanel->setFixedWidth(25); ypanel->setValidator(new QIntValidator(1, 99, this)); connect(ypanel, SIGNAL(textChanged(const QString &)), this, SLOT(gridChange())); //init textpanel for library path library_path = new QLineEdit("", this); library_path->move(5, 33); library_path->setFixedWidth(90); library_path->setReadOnly(true); library_path->setStyleSheet("background-color:lightgrey"); //init button to select library browse_button = new QPushButton("Library", this); browse_button->move(95, 34); browse_button->setFixedWidth(65); connect(browse_button, SIGNAL(clicked()), this, SLOT(browse())); //init startbutton start_button = new QPushButton("Start", this); start_button->move(3, 91); start_button->setFixedWidth(58); connect(start_button,SIGNAL(clicked()), this, SLOT(manual_start())); restart_button = new QPushButton("Restart", this); restart_button->move(3, 91); restart_button->setFixedWidth(58); restart_button->setHidden(true); connect(restart_button, SIGNAL(clicked()), this, SLOT(restart())); //init button for adb controlling adb_button = new QPushButton("Auto Solve", this); adb_button->move(62, 91); connect(adb_button, SIGNAL(clicked()), this, SLOT(adb_start())); //init combobox for wordlist list = new QComboBox(this); list->move(52,62); list->setFixedWidth(105); list->setDisabled(true); connect(list, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(drawWord(const QString &))); //init mapper for pairing tile textChanged() signals to widget calling it mapper = new QSignalMapper(this); connect(mapper, SIGNAL(mapped(int)), this, SLOT(valueChanged(int))); path=QDir::currentPath(); //call function to create 4x4 grid makeGrid(4,4); }