TGo4HisDrawOptionsShort::TGo4HisDrawOptionsShort(QWidget *parent, const char* name) : QGo4Widget(parent,name) { setupUi(this); }
reserveSalesOrderItem::reserveSalesOrderItem(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_close, SIGNAL(clicked()), this, SLOT(reject())); _item->setReadOnly(true); _qtyToReserve->setValidator(omfgThis->qtyVal()); _ordered->setPrecision(omfgThis->qtyVal()); _shipped->setPrecision(omfgThis->qtyVal()); _atShipping->setPrecision(omfgThis->qtyVal()); _reserved->setPrecision(omfgThis->qtyVal()); _onHand->setPrecision(omfgThis->qtyVal()); _allocated->setPrecision(omfgThis->qtyVal()); _unreserved->setPrecision(omfgThis->qtyVal()); if (_metrics->boolean("SOManualReservations")) { connect(_bcReserve, SIGNAL(clicked()), this, SLOT(sBcReserve())); connect(_reserve, SIGNAL(clicked()), this, SLOT(sReserveLocation())); connect(_unreserve, SIGNAL(clicked()), this, SLOT(sUnreserveLocation())); connect(_itemloc, SIGNAL(itemSelected(int)), this, SLOT(sReserveLocation())); connect(_bc, SIGNAL(textChanged(QString)), this, SLOT(sBcChanged(QString))); omfgThis->inputManager()->notify(cBCLotSerialNumber, this, this, SLOT(sCatchLotSerialNumber(QString))); _itemloc->addColumn(tr("Location"), _itemColumn, Qt::AlignLeft, true, "location"); _itemloc->addColumn(tr("Lot/Serial #"), -1, Qt::AlignLeft, true, "lotserial"); _itemloc->addColumn(tr("Expiration"), _dateColumn, Qt::AlignCenter,true, "f_expiration"); _itemloc->addColumn(tr("This Reserved"), _qtyColumn, Qt::AlignRight, true, "reserved"); _itemloc->addColumn(tr("Total Reserved"), _qtyColumn, Qt::AlignRight, true, "totalreserved"); _itemloc->addColumn(tr("Unreserved"), _qtyColumn, Qt::AlignRight, true, "unreserved"); //If not lot serial control, hide info if (!_metrics->boolean("LotSerialControl")) { _bcLit->hide(); _bc->hide(); _bcQtyLit->hide(); _bcQty->hide(); _bcReserve->hide(); } else { // Add columns for lotserial characteristics QString column; QString name; QString sql = QString("SELECT char_id, char_name, char_type " "FROM char " "WHERE (char_lotserial) " " AND (char_search) " "ORDER BY char_name;"); XSqlQuery chars; chars.exec(sql); while (chars.next()) { characteristic::Type chartype = (characteristic::Type)chars.value("char_type").toInt(); column = QString("char%1").arg(chars.value("char_id").toString()); name = chars.value("char_name").toString(); _itemloc->addColumn(name, -1, Qt::AlignLeft , true, column ); if (chartype == characteristic::Text) { _charidstext.append(chars.value("char_id").toInt()); } else if (chartype == characteristic::List) { _charidslist.append(chars.value("char_id").toInt()); } else if (chartype == characteristic::Date) { _charidsdate.append(chars.value("char_id").toInt()); } } } }
ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap <QString, QString> metadata, const QStringList &lumas, int videotracks, int audiotracks, const QString &projectPath, bool readOnlyTracks, bool savedProject, QWidget * parent) : QDialog(parent) ,m_savedProject(savedProject) ,m_lumas(lumas) { setupUi(this); QVBoxLayout *vbox = new QVBoxLayout; m_pw = new ProfileWidget(this); vbox->addWidget(m_pw); profile_box->setLayout(vbox); list_search->setTreeWidget(files_list); project_folder->setMode(KFile::Directory); project_folder->setUrl(QUrl(projectPath)); m_buttonOk = buttonBox->button(QDialogButtonBox::Ok); //buttonOk->setEnabled(false); audio_thumbs->setChecked(KdenliveSettings::audiothumbnails()); video_thumbs->setChecked(KdenliveSettings::videothumbnails()); audio_tracks->setValue(audiotracks); video_tracks->setValue(videotracks); connect(generate_proxy, SIGNAL(toggled(bool)), proxy_minsize, SLOT(setEnabled(bool))); connect(generate_imageproxy, SIGNAL(toggled(bool)), proxy_imageminsize, SLOT(setEnabled(bool))); QString currentProf; if (doc) { currentProf = KdenliveSettings::current_profile(); enable_proxy->setChecked(doc->getDocumentProperty(QStringLiteral("enableproxy")).toInt()); generate_proxy->setChecked(doc->getDocumentProperty(QStringLiteral("generateproxy")).toInt()); proxy_minsize->setValue(doc->getDocumentProperty(QStringLiteral("proxyminsize")).toInt()); m_proxyparameters = doc->getDocumentProperty(QStringLiteral("proxyparams")); generate_imageproxy->setChecked(doc->getDocumentProperty(QStringLiteral("generateimageproxy")).toInt()); proxy_imageminsize->setValue(doc->getDocumentProperty(QStringLiteral("proxyimageminsize")).toInt()); m_proxyextension = doc->getDocumentProperty(QStringLiteral("proxyextension")); m_previewparams = doc->getDocumentProperty(QStringLiteral("previewparameters")); m_previewextension = doc->getDocumentProperty(QStringLiteral("previewextension")); TemporaryData *cacheWidget = new TemporaryData(doc, true, this); connect(cacheWidget, SIGNAL(disableProxies()), this, SIGNAL(disableProxies())); connect(cacheWidget, SIGNAL(disablePreview()), this, SIGNAL(disablePreview())); tabWidget->addTab(cacheWidget, i18n("Cache Data")); } else { currentProf = KdenliveSettings::default_profile(); enable_proxy->setChecked(KdenliveSettings::enableproxy()); generate_proxy->setChecked(KdenliveSettings::generateproxy()); proxy_minsize->setValue(KdenliveSettings::proxyminsize()); m_proxyparameters = KdenliveSettings::proxyparams(); generate_imageproxy->setChecked(KdenliveSettings::generateimageproxy()); proxy_imageminsize->setValue(KdenliveSettings::proxyimageminsize()); m_proxyextension = KdenliveSettings::proxyextension(); m_previewparams = KdenliveSettings::previewparams(); m_previewextension = KdenliveSettings::previewextension(); } // Select profile m_pw->loadProfile(currentProf); proxy_minsize->setEnabled(generate_proxy->isChecked()); proxy_imageminsize->setEnabled(generate_imageproxy->isChecked()); loadProxyProfiles(); loadPreviewProfiles(); // Proxy GUI stuff proxy_showprofileinfo->setIcon(KoIconUtils::themedIcon(QStringLiteral("help-about"))); proxy_showprofileinfo->setToolTip(i18n("Show default profile parameters")); proxy_manageprofile->setIcon(KoIconUtils::themedIcon(QStringLiteral("configure"))); proxy_manageprofile->setToolTip(i18n("Manage proxy profiles")); connect(proxy_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile())); proxy_profile->setToolTip(i18n("Select default proxy profile")); connect(proxy_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateProxyParams())); proxyparams->setVisible(false); proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5); connect(proxy_showprofileinfo, SIGNAL(clicked(bool)), proxyparams, SLOT(setVisible(bool))); // Preview GUI stuff preview_showprofileinfo->setIcon(KoIconUtils::themedIcon(QStringLiteral("help-about"))); preview_showprofileinfo->setToolTip(i18n("Show default profile parameters")); preview_manageprofile->setIcon(KoIconUtils::themedIcon(QStringLiteral("configure"))); preview_manageprofile->setToolTip(i18n("Manage timeline preview profiles")); connect(preview_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManagePreviewProfile())); preview_profile->setToolTip(i18n("Select default preview profile")); connect(preview_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatePreviewParams())); previewparams->setVisible(false); previewparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5); connect(preview_showprofileinfo, SIGNAL(clicked(bool)), previewparams, SLOT(setVisible(bool))); if (readOnlyTracks) { video_tracks->setEnabled(false); audio_tracks->setEnabled(false); } metadata_list->setItemDelegateForColumn(0, new NoEditDelegate(this)); connect(metadata_list, &QTreeWidget::itemDoubleClicked, this, &ProjectSettings::slotEditMetadata); // Metadata list QTreeWidgetItem *item = new QTreeWidgetItem(metadata_list, QStringList() << i18n("Title")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.title.markup")); if (metadata.contains(QStringLiteral("meta.attr.title.markup"))) { item->setText(1, metadata.value(QStringLiteral("meta.attr.title.markup"))); metadata.remove(QStringLiteral("meta.attr.title.markup")); } item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsEnabled); item = new QTreeWidgetItem(metadata_list, QStringList() << i18n("Author")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.author.markup")); if (metadata.contains(QStringLiteral("meta.attr.author.markup"))) { item->setText(1, metadata.value(QStringLiteral("meta.attr.author.markup"))); metadata.remove(QStringLiteral("meta.attr.author.markup")); } else if (metadata.contains(QStringLiteral("meta.attr.artist.markup"))) { item->setText(0, i18n("Artist")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.artist.markup")); item->setText(1, metadata.value(QStringLiteral("meta.attr.artist.markup"))); metadata.remove(QStringLiteral("meta.attr.artist.markup")); } item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsEnabled); item = new QTreeWidgetItem(metadata_list, QStringList() << i18n("Copyright")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.copyright.markup")); if (metadata.contains(QStringLiteral("meta.attr.copyright.markup"))) { item->setText(1, metadata.value(QStringLiteral("meta.attr.copyright.markup"))); metadata.remove(QStringLiteral("meta.attr.copyright.markup")); } item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsEnabled); item = new QTreeWidgetItem(metadata_list, QStringList() << i18n("Year")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.year.markup")); if (metadata.contains(QStringLiteral("meta.attr.year.markup"))) { item->setText(1, metadata.value(QStringLiteral("meta.attr.year.markup"))); metadata.remove(QStringLiteral("meta.attr.year.markup")); } else if (metadata.contains(QStringLiteral("meta.attr.date.markup"))) { item->setText(0, i18n("Date")); item->setData(0, Qt::UserRole, QStringLiteral("meta.attr.date.markup")); item->setText(1, metadata.value(QStringLiteral("meta.attr.date.markup"))); metadata.remove(QStringLiteral("meta.attr.date.markup")); } item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsEnabled); QMap<QString, QString>::const_iterator meta = metadata.constBegin(); while (meta != metadata.constEnd()) { item = new QTreeWidgetItem(metadata_list, QStringList() << meta.key().section('.', 2,2)); item->setData(0, Qt::UserRole, meta.key()); item->setText(1, meta.value()); item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsEnabled); ++meta; } connect(add_metadata, SIGNAL(clicked()), this, SLOT(slotAddMetadataField())); connect(delete_metadata, SIGNAL(clicked()), this, SLOT(slotDeleteMetadataField())); add_metadata->setIcon(KoIconUtils::themedIcon(QStringLiteral("list-add"))); delete_metadata->setIcon(KoIconUtils::themedIcon(QStringLiteral("list-remove"))); if (doc != NULL) { slotUpdateFiles(); connect(delete_unused, SIGNAL(clicked()), this, SLOT(slotDeleteUnused())); } else tabWidget->widget(1)->setEnabled(false); connect(project_folder, SIGNAL(textChanged(QString)), this, SLOT(slotUpdateButton(QString))); connect(button_export, SIGNAL(clicked()), this, SLOT(slotExportToText())); // Delete unused files is not implemented delete_unused->setVisible(false); }
QgsGlobeVectorLayerPropertiesPage::QgsGlobeVectorLayerPropertiesPage( QgsVectorLayer *layer, QgsMapCanvas *canvas, QWidget *parent ) : QgsMapLayerConfigWidget( layer, canvas, parent ) , mLayer( layer ) { setupUi( this ); // Populate combo boxes comboBoxRenderingMode->addItem( tr( "Rasterized" ), QgsGlobeVectorLayerConfig::RenderingModeRasterized ); comboBoxRenderingMode->addItem( tr( "Model (Simple)" ), QgsGlobeVectorLayerConfig::RenderingModeModelSimple ); comboBoxRenderingMode->addItem( tr( "Model (Advanced)" ), QgsGlobeVectorLayerConfig::RenderingModeModelAdvanced ); comboBoxRenderingMode->setItemData( 0, tr( "Rasterize the layer to a texture, and drape it on the terrain" ), Qt::ToolTipRole ); comboBoxRenderingMode->setItemData( 1, tr( "Render the layer features as models" ), Qt::ToolTipRole ); comboBoxRenderingMode->setCurrentIndex( -1 ); comboBoxAltitudeClamping->addItem( tr( "None" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::CLAMP_NONE ) ); comboBoxAltitudeClamping->addItem( tr( "Terrain" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::CLAMP_TO_TERRAIN ) ); comboBoxAltitudeClamping->addItem( tr( "Relative" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::CLAMP_RELATIVE_TO_TERRAIN ) ); comboBoxAltitudeClamping->addItem( tr( "Absolute" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::CLAMP_ABSOLUTE ) ); comboBoxAltitudeClamping->setItemData( 0, tr( "Do not clamp Z values to the terrain (but still apply the offset, if applicable)" ), Qt::ToolTipRole ); comboBoxAltitudeClamping->setItemData( 1, tr( "Sample the terrain under the point, and set the feature's Z to the terrain height, ignoring the feature's original Z value" ), Qt::ToolTipRole ); comboBoxAltitudeClamping->setItemData( 2, tr( "Sample the terrain under the point, and add the terrain height to the feature's original Z value" ), Qt::ToolTipRole ); comboBoxAltitudeClamping->setItemData( 3, tr( "The feature's Z value describes its height above \"height zero\", which is typically the ellipsoid or MSL" ), Qt::ToolTipRole ); comboBoxAltitudeClamping->setCurrentIndex( -1 ); comboBoxAltitudeTechnique->addItem( tr( "Map" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::TECHNIQUE_MAP ) ); comboBoxAltitudeTechnique->addItem( tr( "Drape" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::TECHNIQUE_DRAPE ) ); comboBoxAltitudeTechnique->addItem( tr( "GPU" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::TECHNIQUE_GPU ) ); comboBoxAltitudeTechnique->addItem( tr( "Scene" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::TECHNIQUE_SCENE ) ); comboBoxAltitudeTechnique->setItemData( 0, tr( "Clamp geometry to the map model's elevation data" ), Qt::ToolTipRole ); comboBoxAltitudeTechnique->setItemData( 1, tr( "Clamp geometry to the terrain's scene graph" ), Qt::ToolTipRole ); comboBoxAltitudeTechnique->setItemData( 2, tr( "Clamp geometry to the terrain as they are rendered by the GPU" ), Qt::ToolTipRole ); comboBoxAltitudeTechnique->setItemData( 3, tr( "Clamp geometry at draw time using projective texturing" ), Qt::ToolTipRole ); comboBoxAltitudeTechnique->setCurrentIndex( -1 ); comboBoxAltitudeBinding->addItem( tr( "Vertex" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::BINDING_VERTEX ) ); comboBoxAltitudeBinding->addItem( tr( "Centroid" ), static_cast<int>( osgEarth::Symbology::AltitudeSymbol::BINDING_CENTROID ) ); comboBoxAltitudeBinding->setItemData( 0, tr( "Clamp every vertex independently" ), Qt::ToolTipRole ); comboBoxAltitudeBinding->setItemData( 1, tr( "Clamp to the centroid of the entire geometry" ), Qt::ToolTipRole ); comboBoxAltitudeBinding->setCurrentIndex( -1 ); // Connect signals (setCurrentIndex(-1) above ensures the signal is called when the current values are set below) connect( comboBoxRenderingMode, SIGNAL( currentIndexChanged( int ) ), this, SLOT( showRenderingModeWidget( int ) ) ); connect( comboBoxAltitudeClamping, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onAltitudeClampingChanged( int ) ) ); connect( comboBoxAltitudeTechnique, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onAltituteTechniqueChanged( int ) ) ); // Set values QgsGlobeVectorLayerConfig *layerConfig = QgsGlobeVectorLayerConfig::getConfig( mLayer ); comboBoxRenderingMode->setCurrentIndex( comboBoxRenderingMode->findData( static_cast<int>( layerConfig->renderingMode ) ) ); comboBoxAltitudeClamping->setCurrentIndex( comboBoxAltitudeClamping->findData( static_cast<int>( layerConfig->altitudeClamping ) ) ); comboBoxAltitudeTechnique->setCurrentIndex( comboBoxAltitudeTechnique->findData( static_cast<int>( layerConfig->altitudeTechnique ) ) ); comboBoxAltitudeBinding->setCurrentIndex( comboBoxAltitudeBinding->findData( static_cast<int>( layerConfig->altitudeBinding ) ) ); spinBoxAltitudeOffset->setValue( layerConfig->verticalOffset ); spinBoxAltitudeScale->setValue( layerConfig->verticalScale ); spinBoxAltitudeResolution->setValue( layerConfig->clampingResolution ); groupBoxExtrusion->setChecked( layerConfig->extrusionEnabled ); labelExtrusionHeight->setText( layerConfig->extrusionHeight ); checkBoxExtrusionFlatten->setChecked( layerConfig->extrusionFlatten ); spinBoxExtrusionWallGradient->setValue( layerConfig->extrusionWallGradient ); #if OSGEARTH_VERSION_LESS_THAN(2, 7, 0) groupBoxLabelingEnabled->setChecked( layerConfig->labelingEnabled ); checkBoxLabelingDeclutter->setChecked( layerConfig->labelingDeclutter ); #else #ifdef _MSC_VER #pragma message("TODO: labeling broken with osgEarth 2.7") #else #warning "TODO: labeling broken with osgEarth 2.7" #endif groupBoxLabelingEnabled->setChecked( false ); checkBoxLabelingDeclutter->setChecked( false ); groupBoxLabelingEnabled->setVisible( false ); checkBoxLabelingDeclutter->setVisible( false ); #endif checkBoxLighting->setChecked( layerConfig->lightingEnabled ); }
WpaGui::WpaGui(QWidget *parent, const char *, Qt::WFlags) : QMainWindow(parent) { setupUi(this); #ifdef CONFIG_NATIVE_WINDOWS fileStopServiceAction = new QAction(this); fileStopServiceAction->setObjectName("Stop Service"); fileStopServiceAction->setIconText(tr("Stop Service")); fileMenu->insertAction(actionWPS, fileStopServiceAction); fileStartServiceAction = new QAction(this); fileStartServiceAction->setObjectName("Start Service"); fileStartServiceAction->setIconText(tr("Start Service")); fileMenu->insertAction(fileStopServiceAction, fileStartServiceAction); connect(fileStartServiceAction, SIGNAL(triggered()), this, SLOT(startService())); connect(fileStopServiceAction, SIGNAL(triggered()), this, SLOT(stopService())); addInterfaceAction = new QAction(this); addInterfaceAction->setIconText(tr("Add Interface")); fileMenu->insertAction(fileStartServiceAction, addInterfaceAction); connect(addInterfaceAction, SIGNAL(triggered()), this, SLOT(addInterface())); #endif /* CONFIG_NATIVE_WINDOWS */ // (void) statusBar(); /* * Disable WPS tab by default; it will be enabled if wpa_supplicant is * built with WPS support. */ wpsTab->setEnabled(false); wpaguiTab->setTabEnabled(wpaguiTab->indexOf(wpsTab), false); connect(fileEventHistoryAction, SIGNAL(triggered()), this, SLOT(eventHistory())); connect(fileSaveConfigAction, SIGNAL(triggered()), this, SLOT(saveConfig())); connect(actionWPS, SIGNAL(triggered()), this, SLOT(wpsDialog())); connect(actionPeers, SIGNAL(triggered()), this, SLOT(peersDialog())); connect(fileExitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(networkAddAction, SIGNAL(triggered()), this, SLOT(addNetwork())); connect(networkEditAction, SIGNAL(triggered()), this, SLOT(editSelectedNetwork())); connect(networkRemoveAction, SIGNAL(triggered()), this, SLOT(removeSelectedNetwork())); connect(networkEnableAllAction, SIGNAL(triggered()), this, SLOT(enableAllNetworks())); connect(networkDisableAllAction, SIGNAL(triggered()), this, SLOT(disableAllNetworks())); connect(networkRemoveAllAction, SIGNAL(triggered()), this, SLOT(removeAllNetworks())); connect(helpIndexAction, SIGNAL(triggered()), this, SLOT(helpIndex())); connect(helpContentsAction, SIGNAL(triggered()), this, SLOT(helpContents())); connect(helpAboutAction, SIGNAL(triggered()), this, SLOT(helpAbout())); connect(disconnectButton, SIGNAL(clicked()), this, SLOT(disconnect())); connect(scanButton, SIGNAL(clicked()), this, SLOT(scan())); connect(connectButton, SIGNAL(clicked()), this, SLOT(connectB())); connect(adapterSelect, SIGNAL(activated(const QString&)), this, SLOT(selectAdapter(const QString&))); connect(networkSelect, SIGNAL(activated(const QString&)), this, SLOT(selectNetwork(const QString&))); connect(addNetworkButton, SIGNAL(clicked()), this, SLOT(addNetwork())); connect(editNetworkButton, SIGNAL(clicked()), this, SLOT(editListedNetwork())); connect(removeNetworkButton, SIGNAL(clicked()), this, SLOT(removeListedNetwork())); connect(networkList, SIGNAL(itemSelectionChanged()), this, SLOT(updateNetworkDisabledStatus())); connect(enableRadioButton, SIGNAL(toggled(bool)), this, SLOT(enableListedNetwork(bool))); connect(disableRadioButton, SIGNAL(toggled(bool)), this, SLOT(disableListedNetwork(bool))); connect(scanNetworkButton, SIGNAL(clicked()), this, SLOT(scan())); connect(networkList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(editListedNetwork())); connect(wpaguiTab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int))); connect(wpsPbcButton, SIGNAL(clicked()), this, SLOT(wpsPbc())); connect(wpsPinButton, SIGNAL(clicked()), this, SLOT(wpsGeneratePin())); connect(wpsApPinEdit, SIGNAL(textChanged(const QString &)), this, SLOT(wpsApPinChanged(const QString &))); connect(wpsApPinButton, SIGNAL(clicked()), this, SLOT(wpsApPin())); eh = NULL; scanres = NULL; peers = NULL; add_iface = NULL; udr = NULL; tray_icon = NULL; startInTray = false; ctrl_iface = NULL; ctrl_conn = NULL; monitor_conn = NULL; msgNotifier = NULL; ctrl_iface_dir = strdup("/var/run/wpa_supplicant"); // parse_argv(); #ifndef QT_NO_SESSIONMANAGER // if (app->isSessionRestored()) { // QSettings settings("wpa_supplicant", "wpa_gui"); // settings.beginGroup("state"); // if (app->sessionId().compare(settings.value("session_id"). // toString()) == 0) // startInTray = settings.value("in_tray").toBool(); // settings.endGroup(); // } #endif if (QSystemTrayIcon::isSystemTrayAvailable()) createTrayIcon(startInTray); else show(); connectedToService = false; textStatus->setText(tr("connecting to wpa_supplicant")); timer = new QTimer(this); connect(timer, SIGNAL(timeout()), SLOT(ping())); timer->setSingleShot(FALSE); timer->start(1000); if (openCtrlConnection(ctrl_iface) < 0) { printf("Failed to open control connection to " "wpa_supplicant.\n"); } updateStatus(); networkMayHaveChanged = true; updateNetworks(); }
QgsHeatmapRendererWidget::QgsHeatmapRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) : QgsRendererV2Widget( layer, style ) , mRenderer( nullptr ) { if ( !layer ) { return; } // the renderer only applies to point vector layers if ( layer->geometryType() != Qgis::Point ) { //setup blank dialog mRenderer = nullptr; QLabel* label = new QLabel( tr( "The heatmap renderer only applies to point and multipoint layers. \n" "'%1' is not a point layer and cannot be rendered as a heatmap." ) .arg( layer->name() ), this ); layout()->addWidget( label ); return; } setupUi( this ); mRadiusUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderPixels << QgsUnitTypes::RenderMapUnits ); mWeightExpressionWidget->registerGetExpressionContextCallback( &_getExpressionContext, this ); if ( renderer ) { mRenderer = QgsHeatmapRenderer::convertFromRenderer( renderer ); } if ( !mRenderer ) { mRenderer = new QgsHeatmapRenderer(); } mRampComboBox->setShowGradientOnly( true ); mRampComboBox->populate( QgsStyleV2::defaultStyle() ); connect( mRampComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( applyColorRamp() ) ); connect( mRampComboBox, SIGNAL( sourceRampEdited() ), this, SLOT( applyColorRamp() ) ); connect( mButtonEditRamp, SIGNAL( clicked() ), mRampComboBox, SLOT( editSourceRamp() ) ); if ( mRenderer->colorRamp() ) { mRampComboBox->blockSignals( true ); mRampComboBox->setSourceColorRamp( mRenderer->colorRamp() ); mRampComboBox->blockSignals( false ); } mRadiusSpinBox->blockSignals( true ); mRadiusSpinBox->setValue( mRenderer->radius() ); mRadiusSpinBox->blockSignals( false ); mRadiusUnitWidget->blockSignals( true ); mRadiusUnitWidget->setUnit( mRenderer->radiusUnit() ); mRadiusUnitWidget->setMapUnitScale( mRenderer->radiusMapUnitScale() ); mRadiusUnitWidget->blockSignals( false ); mMaxSpinBox->blockSignals( true ); mMaxSpinBox->setValue( mRenderer->maximumValue() ); mMaxSpinBox->blockSignals( false ); mQualitySlider->blockSignals( true ); mQualitySlider->setValue( mRenderer->renderQuality() ); mQualitySlider->blockSignals( false ); mInvertCheckBox->blockSignals( true ); mInvertCheckBox->setChecked( mRenderer->invertRamp() ); mInvertCheckBox->blockSignals( false ); mWeightExpressionWidget->setLayer( layer ); mWeightExpressionWidget->setField( mRenderer->weightExpression() ); connect( mWeightExpressionWidget, SIGNAL( fieldChanged( QString ) ), this, SLOT( weightExpressionChanged( QString ) ) ); }
EditWatermark::EditWatermark(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); }
Database_Terrain::Database_Terrain(QWidget *parent) : QWidget(parent) { QPen pen(QBrush(Qt::white), 1.0, Qt::SolidLine, Qt::FlatCap); setupUi(this); twTerrainList->horizontalHeader()->setResizeMode(QHeaderView::Stretch); twTerrainList->horizontalHeader()->setHidden(true); twTerrainList->verticalHeader()->setHidden(true); bDamageSpinButton->setSpinBox(nbrDamage); bEncMulSpinButton->setSpinBox(nbrEncMul); bBGHScrollSpeedSpinButton->setSpinBox(nbrBGHScrollSpeed); bBGVScrollSpeedSpinButton->setSpinBox(nbrBGVScrollSpeed); bFGHScrollSpeedSpinButton->setSpinBox(nbrFGHScrollSpeed); bFGVScrollSpeedSpinButton->setSpinBox(nbrFGVScrollSpeed); bInitiativePercent_PartySpinButton->setSpinBox(nbrInitiativePercent_Party); bBackAttackPercent_EnemySpinButton->setSpinBox(nbrBackAttackPercent_Enemy); bSurroundAttackPercent_PartySpinButton->setSpinBox(nbrSurroundAttackPercent_Party); bSurroundAttackPercent_EnemySpinButton->setSpinBox(nbrSurroundAttackPercent_Enemy); bgPreviewScene = new QGraphicsScene(0.0, 0.0, 400.0, 300.0); gvBGPreview->setScene(bgPreviewScene); bgPreview_BGImageItem = new QGraphicsPixmapItem; bgPreview_BGImageItem->setFlags(0x0); bgPreview_BGImageItem->setPos(0.0, 0.0); bgPreview_BGImageItem->setZValue(0.0); bgPreview_FGImageItem = new QGraphicsPixmapItem; bgPreview_FGImageItem->setFlags(0x0); bgPreview_FGImageItem->setPos(0.0, 0.0); bgPreview_FGImageItem->setZValue(2.0); hLine_Top = new QGraphicsLineItem; hLine_Top->setFlags(0x0); hLine_Top->setZValue(1.0); hLine_Top->setPen(pen); hLine_CenterTop = new QGraphicsLineItem; hLine_CenterTop->setFlags(0x0); hLine_CenterTop->setZValue(1.0); hLine_CenterTop->setPen(pen); hLine_CenterBottom = new QGraphicsLineItem; hLine_CenterBottom->setFlags(0x0); hLine_CenterBottom->setZValue(1.0); hLine_CenterBottom->setPen(pen); hLine_Bottom = new QGraphicsLineItem; hLine_Bottom->setFlags(0x0); hLine_Bottom->setZValue(1.0); hLine_Bottom->setPen(pen); vLine_Monsters_Left = new QGraphicsLineItem; vLine_Monsters_Left->setFlags(0x0); vLine_Monsters_Left->setZValue(1.0); vLine_Monsters_Left->setPen(pen); vLine_Monsters_Right = new QGraphicsLineItem; vLine_Monsters_Right->setFlags(0x0); vLine_Monsters_Right->setZValue(1.0); vLine_Monsters_Right->setPen(pen); vLine_Center = new QGraphicsLineItem; vLine_Center->setFlags(0x0); vLine_Center->setZValue(1.0); vLine_Center->setPen(pen); vLine_Characters_Left = new QGraphicsLineItem; vLine_Characters_Left->setFlags(0x0); vLine_Characters_Left->setZValue(1.0); vLine_Characters_Left->setPen(pen); vLine_Characters_Right = new QGraphicsLineItem; vLine_Characters_Right->setFlags(0x0); vLine_Characters_Right->setZValue(1.0); vLine_Characters_Right->setPen(pen); bgPreviewScene->addItem(bgPreview_BGImageItem); bgPreviewScene->addItem(bgPreview_FGImageItem); bgPreviewScene->addItem(hLine_Top); bgPreviewScene->addItem(hLine_CenterTop); bgPreviewScene->addItem(hLine_CenterBottom); bgPreviewScene->addItem(hLine_Bottom); bgPreviewScene->addItem(vLine_Monsters_Left); bgPreviewScene->addItem(vLine_Monsters_Right); bgPreviewScene->addItem(vLine_Center); bgPreviewScene->addItem(vLine_Characters_Left); bgPreviewScene->addItem(vLine_Characters_Right); terrainRef = NULL; ignoreEvents = true; bConfigureCustomGD->setEnabled(false); }
creditMemoItem::creditMemoItem(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); #ifndef Q_OS_MAC _listPrices->setMaximumWidth(25); #endif connect(_discountFromSale, SIGNAL(editingFinished()), this, SLOT(sCalculateFromDiscount())); connect(_extendedPrice, SIGNAL(valueChanged()), this, SLOT(sCalculateTax())); connect(_item, SIGNAL(newId(int)), this, SLOT(sPopulateItemInfo())); connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sPopulateItemsiteInfo())); connect(_listPrices, SIGNAL(clicked()), this, SLOT(sListPrices())); connect(_netUnitPrice, SIGNAL(valueChanged()), this, SLOT(sCalculateDiscountPrcnt())); connect(_netUnitPrice, SIGNAL(valueChanged()), this, SLOT(sCalculateExtendedPrice())); connect(_netUnitPrice, SIGNAL(idChanged(int)), this, SLOT(sPriceGroup())); connect(_qtyToCredit, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateExtendedPrice())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_taxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_taxType, SIGNAL(newID(int)), this, SLOT(sCalculateTax())); connect(_qtyUOM, SIGNAL(newID(int)), this, SLOT(sQtyUOMChanged())); connect(_pricingUOM, SIGNAL(newID(int)), this, SLOT(sPriceUOMChanged())); connect(_itemSelected, SIGNAL(clicked()), this, SLOT(sHandleSelection())); connect(_miscSelected, SIGNAL(clicked()), this, SLOT(sHandleSelection())); _mode = cNew; _cmitemid = -1; _cmheadid = -1; _custid = -1; _invoiceNumber = -1; _priceRatio = 1.0; _qtyShippedCache = 0.0; _listPriceCache = 0.0; _shiptoid = -1; _taxzoneid = -1; _qtyinvuomratio = 1.0; _priceinvuomratio = 1.0; _invuomid = -1; _saved = false; _revAccnt->setType(0x08); _qtyToCredit->setValidator(omfgThis->qtyVal()); _qtyReturned->setValidator(omfgThis->qtyVal()); _qtyShipped->setPrecision(omfgThis->qtyVal()); _discountFromList->setPrecision(omfgThis->percentVal()); _discountFromSale->setValidator(new XDoubleValidator(-9999, 100, 2, this)); _taxType->setEnabled(_privileges->check("OverrideTax")); _revAccnt->setEnabled(_privileges->check("CreditMemoItemAccountOverride")); //If not multi-warehouse hide whs control if (!_metrics->boolean("MultiWhs")) { _warehouseLit->hide(); _warehouse->hide(); } _item->setFocus(); adjustSize(); }
tCopyPasteOptionsDlg::tCopyPasteOptionsDlg(QWidget *parent,Qt::WindowFlags f) : QDialog(parent,f) { setupUi(this); }
/* * Constructs a voucher as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ voucher::voucher(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_poList, SIGNAL(clicked()), this, SLOT(sPoList())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_distributions, SIGNAL(clicked()), this, SLOT(sDistributions())); connect(_distributeline, SIGNAL(clicked()), this, SLOT(sDistributeLine())); connect(_clear, SIGNAL(clicked()), this, SLOT(sClear())); connect(_distributeall, SIGNAL(clicked()), this, SLOT(sDistributeAll())); connect(_voucherNumber, SIGNAL(lostFocus()), this, SLOT(sHandleVoucherNumber())); connect(_poNumber, SIGNAL(vendAddress1Changed(const QString&)), _vendAddress1, SLOT(setText(const QString&))); connect(_poNumber, SIGNAL(newId(int)), this, SLOT(sFillList())); connect(_poitem, SIGNAL(itemSelected(int)), _distributions, SLOT(animateClick())); connect(_poitem, SIGNAL(valid(bool)), _distributions, SLOT(setEnabled(bool))); connect(_amountToDistribute, SIGNAL(valueChanged()), this, SLOT(sPopulateBalanceDue())); connect(_miscDistrib, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_new, SIGNAL(clicked()), this, SLOT(sNewMiscDistribution())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEditMiscDistribution())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDeleteMiscDistribution())); connect(_miscDistrib, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_miscDistrib, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_invoiceDate, SIGNAL(newDate(const QDate&)), this, SLOT(sPopulateDistDate())); connect(_poNumber, SIGNAL(vendAddress2Changed(const QString&)), _vendAddress2, SLOT(setText(const QString&))); connect(_invoiceDate, SIGNAL(newDate(const QDate&)), this, SLOT(sPopulateDueDate())); connect(_poNumber, SIGNAL(newId(int)), this, SLOT(sPopulatePoInfo())); connect(_poNumber, SIGNAL(vendNameChanged(const QString&)), _vendName, SLOT(setText(const QString&))); connect(_poitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*))); connect(_amountToDistribute, SIGNAL(idChanged(int)), _amountDistributed, SLOT(setId(int))); connect(_amountToDistribute, SIGNAL(idChanged(int)), _balance, SLOT(setId(int))); connect(_amountToDistribute, SIGNAL(idChanged(int)), this, SLOT(sFillList())); connect(_distributionDate, SIGNAL(newDate(const QDate&)), _amountToDistribute, SLOT(setEffective(const QDate&))); connect(_amountToDistribute, SIGNAL(effectiveChanged(const QDate&)), _amountDistributed, SLOT(setEffective(const QDate&))); connect(_amountToDistribute, SIGNAL(effectiveChanged(const QDate&)), _balance, SLOT(setEffective(const QDate&))); connect(_amountDistributed, SIGNAL(valueChanged()), this, SLOT(sPopulateBalanceDue())); statusBar()->hide(); #ifndef Q_WS_MAC _poList->setMaximumWidth(25); #endif _terms->setType(XComboBox::APTerms); _poNumber->setType(cPOOpen); _poitem->addColumn(tr("#"), _whsColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Status"), _uomColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft ); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Vend. Item #"), -1, Qt::AlignLeft ); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("Invoiced"), _qtyColumn, Qt::AlignRight, false ); _poitem->addColumn(tr("Uninvoiced"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("Rejected"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("Amount"), _moneyColumn, Qt::AlignRight ); _poitem->addColumn(tr("PO Unit Price"), _moneyColumn, Qt::AlignRight ); _poitem->addColumn(tr("PO Ext Price"), _moneyColumn, Qt::AlignRight ); _poitem->addColumn(tr("PO Line Freight"), _moneyColumn, Qt::AlignRight ); _miscDistrib->addColumn(tr("Account"), -1, Qt::AlignLeft ); _miscDistrib->addColumn(tr("Amount"), _moneyColumn, Qt::AlignRight ); }
/** \param comp \param parent \return **/ AlbaranClienteView::AlbaranClienteView ( BfCompany *comp, QWidget *parent ) : BfForm ( comp, parent ) { BL_FUNC_DEBUG setAttribute ( Qt::WA_DeleteOnClose ); try { setupUi ( this ); setTitleName ( _ ( "Albaran" ) ); setDbTableName ( "albaran" ); setDbFieldId ( "idalbaran" ); addDbField ( "idalbaran", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id albaran" ) ); addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Cliente" ) ); addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Almacen" ) ); addDbField ( "numalbaran", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero de albaran" ) ); addDbField ( "fechaalbaran", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha de creacion" ) ); addDbField ( "contactalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Persona de contacto" ) ); addDbField ( "telalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Telefono de contacto" ) ); addDbField ( "comentalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario" ) ); addDbField ( "comentprivalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario privado" ) ); addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma de pago" ) ); addDbField ( "idtrabajador", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Trabajador" ) ); addDbField ( "procesadoalbaran", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Procesado" ) ); addDbField ( "descalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion" ) ); addDbField ( "refalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia" ) ); /// Disparamos los plugins. int res = g_plugins->run ( "AlbaranClienteView_AlbaranClienteView", this ); if ( res != 0 ) return; subform2->setMainCompany ( comp ); m_descuentos->setMainCompany ( comp ); mui_idalmacen->setMainCompany ( comp ); mui_idforma_pago->setMainCompany ( comp ); mui_idcliente->setMainCompany ( comp ); mui_idtrabajador->setMainCompany ( comp ); mui_refalbaran->setMainCompany ( comp ); setListaLineas ( subform2 ); setListaDescuentos ( m_descuentos ); /// Establecemos los parametros de busqueda del Cliente mui_idcliente->setLabel ( _ ( "Cliente:" ) ); mui_idcliente->setTableName ( "cliente" ); mui_idcliente->m_valores["cifcliente"] = ""; mui_idcliente->m_valores["nomcliente"] = ""; /// Inicializamos para que no se queden sin ser pintada. mui_idforma_pago->setFieldValue ( "0" ); mui_idalmacen->setFieldValue ( "0" ); mui_idtrabajador->setFieldValue ( "0" ); insertWindow ( windowTitle(), this, FALSE ); /// Disparamos los plugins por flanco descendente. g_plugins->run ( "AlbaranClienteView_AlbaranClienteView_Post", this ); blScript(this); } catch ( ... ) { blMsgInfo ( _ ( "Error al crear el albaran a cliente" ), this ); } // end try }