MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); waitDialog = 0; buf1.I = buf1.Q = 0; buf2.I = buf2.Q = 0; buf3.I = buf3.Q = 0; buf4.I = buf4.Q = 0; buf5.I = buf5.Q = 0; freqAxis = 0; yAxis11 = 0; yAxis21 = 0; yAxis12 = 0; yAxis22 = 0; stopRequest = false; calStepRequest = false; updateDisabledState(); registerTypes(); configureWorkerThread(); createPlots(); setupSignalsAndSlots(); loadVNADLL(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow),cdadPersonas(0) { ui->setupUi(this); //ui->mainToolBar->addAction() PersonaController * controller = PersonaController::getInstance(); crearDialog = new CrearPersonaDialog(this); editarDialog = new EditPersonaDialog(this); crearDialog->setWindowTitle("Crear Persona"); setupSignalsAndSlots(); auto f = [] (Persona*) -> bool {return true;}; // all QList<Persona *> all = controller->filter(f); int cantidadFilas = all.size(); QTableWidget *table = ui->tableWidget; table->setRowCount(cantidadFilas); table->setColumnCount(5); QStringList header; header << "Id" << "Nombre" << "Direccion" << "Telefono" << "Email"; table->setHorizontalHeaderLabels(header); table->adjustSize(); initPersonas(); // for (int i = 0; i < all.size(); i++) { // Persona *p = all.at(i); // int j = 0; // QTableWidgetItem *item = new QTableWidgetItem(QString().setNum(p->id())); // table->setItem(i, j++, item); // item = new QTableWidgetItem(p->nombre()); // table->setItem(i, j++, item); // item = new QTableWidgetItem(p->direccion()); // table->setItem(i, j++, item); // item = new QTableWidgetItem(p->telefono()); // table->setItem(i, j++, item); // } // connect(crearDialog, SIGNAL(personaCreated(Persona*)), this, SLOT(agregarPersonaATable(Persona*))); }
Dialog::Dialog(QWidget* parent) : QWidget(parent) , m_ui(new Ui::Main) , m_socket(new QUdpSocket) , m_reply(0) , m_netManager(new QNetworkAccessManager(this)) { m_ui->setupUi(this); QStringList commands; commands << "add" << "ban" << "isBanned" << "whoIs"; m_ui->commandCombo->addItems(commands); m_ui->gametypeCombobox->addItem("UrbanTerror 4.1.x"); m_socket->bind(QHostAddress::Any, 1234); setupSignalsAndSlots(); show(); }