Socket::Socket(string local_name){ this->localName = local_name; this->socketFd = -1; this->port = -1; this->error = -1; setConfigurationFile(NETWORK_FILE); }
Socket::Socket(int sockFd, struct sockaddr_in localAddress, struct sockaddr_in remoteAddress, string localName){ this->socketFd = sockFd; this->localName = localName; this->localAddress = localAddress; this->remoteAddress = remoteAddress; this->port = -1; this->error = -1; setConfigurationFile(NETWORK_FILE); }
// ============================================================ // QERECIPE METHODS // ============================================================ QERecipe::QERecipe(QWidget *pParent):QWidget(pParent), QEWidget(this) { qLabelRecipeDescription = new QLabel(this); qComboBoxRecipeList = new QComboBox(this); qPushButtonNew = new QPushButton(this); qPushButtonSave = new QPushButton(this); qPushButtonDelete = new QPushButton(this); qPushButtonApply = new QPushButton(this); qPushButtonRead = new QPushButton(this); qEConfiguredLayoutRecipeFields = new QEConfiguredLayout(this, false); qComboBoxRecipeList->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); qComboBoxRecipeList->setToolTip("Select recipe"); QObject::connect(qComboBoxRecipeList, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxRecipeSelected(int))); qPushButtonNew->setText("New"); qPushButtonNew->setToolTip("Create new recipe"); QObject::connect(qPushButtonNew, SIGNAL(clicked()), this, SLOT(buttonNewClicked())); qPushButtonSave->setText("Save"); qPushButtonSave->setToolTip("Save values in the selected recipe"); qPushButtonSave->setEnabled(false); QObject::connect(qPushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSaveClicked())); qPushButtonDelete->setText("Delete"); qPushButtonDelete->setToolTip("Delete selected recipe"); qPushButtonDelete->setEnabled(false); QObject::connect(qPushButtonDelete, SIGNAL(clicked()), this, SLOT(buttonDeleteClicked())); qPushButtonApply->setText("Apply"); qPushButtonApply->setToolTip("Apply values to process variables"); qPushButtonApply->setEnabled(false); QObject::connect(qPushButtonApply, SIGNAL(clicked()), this, SLOT(buttonApplyClicked())); qPushButtonRead->setText("Read"); qPushButtonRead->setToolTip("Read values from process variables"); QObject::connect(qPushButtonRead, SIGNAL(clicked()), this, SLOT(buttonReadClicked())); qEConfiguredLayoutRecipeFields->setShowItemList(false); setRecipeFile(""); setConfigurationFile(""); setConfigurationText(""); setConfigurationType(FROM_FILE); setShowRecipeList(true); setOptionsLayout(TOP); setCurrentUserType(getUserLevel()); }