WaveletKSigmaFilter::WaveletKSigmaFilter() { setDescriptorId("{28702D56-4634-4CCC-8840-C10F805C9870}"); setName("Wavelet K-Sigma Filter "); setDescription("Remove noise for astronomical image"); setCreator("Yiwei Zhang"); setVersion("Sample"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Denoise"); setMenuLocation("[Astronomy]/Wavelet K-Sigma Filter"); setAbortSupported(true); rowBlocks = BLOCK_ROWS; colBlocks = BLOCK_COLS; pBuffer = (double *)malloc(sizeof(double)*(10+rowBlocks)*(10+colBlocks)); }
UIDownloaderAdditions::UIDownloaderAdditions() { /* Prepare instance: */ if (!m_spInstance) m_spInstance = this; /* Set description: */ setDescription(tr("VirtualBox Guest Additions")); /* Prepare source/target: */ const QString &strName = QString("VBoxGuestAdditions_%1.iso").arg(vboxGlobal().vboxVersionStringNormalized()); const QString &strSource = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vboxGlobal().vboxVersionStringNormalized()) + strName; const QString &strTarget = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(strName); /* Set source/target: */ setSource(strSource); setTarget(strTarget); }
IdlInterpreterManager::IdlInterpreterManager() : mpInterpreter(new IdlProxy()) { setName("IDL"); setDescription("Provides command line utilities to execute IDL commands."); setDescriptorId("{09BBB1FD-D12A-43B8-AB09-95AA8028BFFE}"); setCopyright(IDL_COPYRIGHT); setVersion(IDL_VERSION_NUMBER); setProductionStatus(IDL_IS_PRODUCTION_RELEASE); allowMultipleInstances(false); setWizardSupported(false); setFileExtensions("IDL Scripts (*.pro)"); setInteractiveEnabled(IdlInterpreterOptions::getSettingInteractiveAvailable()); addDependencyCopyright("IDL", "<pre>Copyright 2012 Exelis Visual Information Systems, Inc.\n" "* The user is permitted to use this software only together with Opticks, and for the sole purpose of calling a " "fully-licensed copy of IDL(R) software. Any other use is expressly prohibited.\n" "* The user shall not disassemble, decompile or reverse engineer this software.</pre>"); }
ROSProjectWizard::ROSProjectWizard() { setWizardKind(ProjectWizard); // TODO do something about the ugliness of standard icons in sizes different than 16, 32, 64, 128 { QPixmap icon(22, 22); icon.fill(Qt::transparent); QPainter p(&icon); p.drawPixmap(3, 3, 16, 16, qApp->style()->standardIcon(QStyle::SP_DirIcon).pixmap(16)); setIcon(icon); } setDisplayName(tr("Import ROS Workspace")); setId("Z.ROSIndustrial"); setDescription(tr("Used to import ROS Workspace.")); setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY)); setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY)); setFlags(Core::IWizardFactory::PlatformIndependent); }
KisAlternateInvocationAction::KisAlternateInvocationAction() : KisAbstractInputAction("Alternate Invocation") , m_d(new Private) { setName(i18n("Alternate Invocation")); setDescription(i18n("The <i>Alternate Invocation</i> action performs an alternate action with the current tool. For example, using the brush tool it picks a color from the canvas.")); QHash<QString, int> shortcuts; shortcuts.insert(i18n("Primary Mode"), PrimaryAlternateModeShortcut); shortcuts.insert(i18n("Secondary Mode"), SecondaryAlternateModeShortcut); shortcuts.insert(i18n("Pick Foreground Color from Current Layer"), PickColorFgLayerModeShortcut); shortcuts.insert(i18n("Pick Background Color from Current Layer"), PickColorBgLayerModeShortcut); shortcuts.insert(i18n("Pick Foreground Color from Merged Image"), PickColorFgImageModeShortcut); shortcuts.insert(i18n("Pick Background Color from Merged Image"), PickColorBgImageModeShortcut); setShortcutIndexes(shortcuts); }
/*! Construct a new CpSettingFormEntryItemData with the given type, text, description, icon name, and parent. */ CpSettingFormEntryItemData::CpSettingFormEntryItemData( EntryItemType type, CpItemDataHelper &itemDataHelper, const QString &text /*= QString()*/, const QString &description /*= QString()*/, const QString &iconName /*= QString()*/, const HbDataFormModelItem *parent /*= 0*/) : CpSettingFormItemData(HbDataFormModelItem::CustomItemBase,QString(),parent), d_ptr(new CpSettingFormEntryItemDataPrivate(&itemDataHelper)) { setType ( static_cast<HbDataFormModelItem::DataItemType> (type) ); d_ptr->init(this); setText(text); setDescription(description); setIcon(iconName); }
Commands::CommandResult *Commands::CombinedEditCommand::execute(const Commands::CommandManager *commandManager) const { qInfo() << "Combined edit command: flags=" << m_EditFlags << "artworks count =" << m_ArtItemInfos.length(); QVector<int> indicesToUpdate; QVector<UndoRedo::ArtworkMetadataBackup*> artworksBackups; QVector<SpellCheck::ISpellCheckable*> itemsToCheck; int size = m_ArtItemInfos.length(); indicesToUpdate.reserve(size); artworksBackups.reserve(size); itemsToCheck.reserve(size); bool needToClear = Common::HasFlag(m_EditFlags, Common::Clear); for (int i = 0; i < size; ++i) { Models::ArtItemInfo* info = m_ArtItemInfos[i]; Models::ArtworkMetadata *metadata = info->getOrigin(); UndoRedo::ArtworkMetadataBackup *backup = new UndoRedo::ArtworkMetadataBackup(metadata); artworksBackups.append(backup); indicesToUpdate.append(info->getOriginalIndex()); setKeywords(metadata); setDescription(metadata); setTitle(metadata); // do not save if Сlear flag present // to be able to restore from .xpks if (!needToClear) { commandManager->saveMetadata(metadata); } itemsToCheck.append(metadata); } commandManager->submitForSpellCheck(itemsToCheck); UndoRedo::ModifyArtworksHistoryItem *modifyArtworksItem = new UndoRedo::ModifyArtworksHistoryItem(artworksBackups, indicesToUpdate, UndoRedo::CombinedEditModificationType); commandManager->recordHistoryItem(modifyArtworksItem); CombinedEditCommandResult *result = new CombinedEditCommandResult(indicesToUpdate); return result; }
/** * Constructor */ Mpu6000Settings::Mpu6000Settings(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) { // Create fields QList<UAVObjectField *> fields; QStringList GyroScaleElemNames; GyroScaleElemNames.append("0"); QStringList GyroScaleEnumOptions; GyroScaleEnumOptions.append("Scale_250"); GyroScaleEnumOptions.append("Scale_500"); GyroScaleEnumOptions.append("Scale_1000"); GyroScaleEnumOptions.append("Scale_2000"); fields.append( new UAVObjectField(QString("GyroScale"), QString("deg/s"), UAVObjectField::ENUM, GyroScaleElemNames, GyroScaleEnumOptions, QString(""))); QStringList AccelScaleElemNames; AccelScaleElemNames.append("0"); QStringList AccelScaleEnumOptions; AccelScaleEnumOptions.append("Scale_2g"); AccelScaleEnumOptions.append("Scale_4g"); AccelScaleEnumOptions.append("Scale_8g"); AccelScaleEnumOptions.append("Scale_16g"); fields.append( new UAVObjectField(QString("AccelScale"), QString("g"), UAVObjectField::ENUM, AccelScaleElemNames, AccelScaleEnumOptions, QString(""))); QStringList FilterSettingElemNames; FilterSettingElemNames.append("0"); QStringList FilterSettingEnumOptions; FilterSettingEnumOptions.append("Lowpass_256_Hz"); FilterSettingEnumOptions.append("Lowpass_188_Hz"); FilterSettingEnumOptions.append("Lowpass_98_Hz"); FilterSettingEnumOptions.append("Lowpass_42_Hz"); FilterSettingEnumOptions.append("Lowpass_20_Hz"); FilterSettingEnumOptions.append("Lowpass_10_Hz"); FilterSettingEnumOptions.append("Lowpass_5_Hz"); fields.append( new UAVObjectField(QString("FilterSetting"), QString("Hz"), UAVObjectField::ENUM, FilterSettingElemNames, FilterSettingEnumOptions, QString(""))); // Initialize object initializeFields(fields, (quint8 *)&data, NUMBYTES); // Set the default field values setDefaultFieldValues(); // Set the object description setDescription(DESCRIPTION); // Set the Category of this object type setCategory(CATEGORY); connect(this, SIGNAL(objectUpdated(UAVObject *)), SLOT(emitNotifications())); }
bool CToggleViewBasicTest::init() { CToggleViewTestSceneBase::init(); setTitle("CToggleViewBasicTest"); setDescription("toggle button"); CToggleView* pToggle = CToggleView::create("toggle1_2.png", "toggle1_1.png"); pToggle->setOnClickListener(this, ccw_click_selector(CToggleViewBasicTest::onClick)); pToggle->setPosition(Vec2(480, 320)); m_pWindow->addChild(pToggle); m_pText = CLabel::createWithSystemFont("none","",35); m_pText->setAnchorPoint(Vec2(0, 0.5)); m_pText->setPosition(Vec2(380, 400)); m_pText->setString("none"); m_pWindow->addChild(m_pText); return true; }
void AMNormalizationAB::setInputSources() { if (data_){ disconnect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex))); disconnect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged())); disconnect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged())); data_ = 0; } if (normalizer_){ disconnect(normalizer_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex))); disconnect(normalizer_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged())); disconnect(normalizer_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged())); normalizer_ = 0; } int dataIndex = indexOfInputSource(dataName_); int normalizationIndex = indexOfInputSource(normalizationName_); if (dataIndex >= 0 && normalizationIndex >= 0){ data_ = inputDataSourceAt(dataIndex); normalizer_ = inputDataSourceAt(normalizationIndex); canAnalyze_ = true; axes_.clear(); for (int i = 0, size = sources_.at(0)->rank(); i < size; i++) axes_ << sources_.at(0)->axisInfoAt(i); cacheUpdateRequired_ = true; cachedData_ = QVector<double>(size().product()); setDescription(QString("Normalized %1").arg(data_->name())); connect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex))); connect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged())); connect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged())); connect(normalizer_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex))); connect(normalizer_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged())); connect(normalizer_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged())); }
GenericProjectWizard::GenericProjectWizard() { setWizardKind(ProjectWizard); // TODO do something about the ugliness of standard icons in sizes different than 16, 32, 64, 128 { QPixmap icon(22, 22); icon.fill(Qt::transparent); QPainter p(&icon); p.drawPixmap(3, 3, 16, 16, qApp->style()->standardIcon(QStyle::SP_DirIcon).pixmap(16)); setIcon(icon); } setDisplayName(tr("Import Existing Project")); setId("Z.Makefile"); setDescription(tr("Imports existing projects that do not use qmake, CMake or Autotools. " "This allows you to use Qt Creator as a code editor.")); setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY)); setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY)); setFlags(Core::IWizardFactory::PlatformIndependent); }
bool CCheckBoxExclusionTest::init() { CCheckBoxTestSceneBase::init(); setTitle("CCheckBoxExclusionTest"); setDescription("checkbox exclusion test"); CREATE_CHECKBOX(pCheckBox1, CCPoint(480, 490)); pCheckBox1->setTag(1); pCheckBox1->setExclusion(1); pCheckBox1->setChecked(true); pCheckBox1->setEnabled(false); m_pWindow->addChild(pCheckBox1); CREATE_CHECKBOX(pCheckBox2, CCPoint(480, 425)); pCheckBox2->setExclusion(1); m_pWindow->addChild(pCheckBox2); CREATE_CHECKBOX(pCheckBox3, CCPoint(480, 360)); pCheckBox3->setExclusion(1); m_pWindow->addChild(pCheckBox3); CREATE_CHECKBOX(pCheckBox4, CCPoint(480, 295)); pCheckBox4->setExclusion(1); m_pWindow->addChild(pCheckBox4); CREATE_CHECKBOX(pCheckBox5, CCPoint(480, 230)); pCheckBox5->setExclusion(1); m_pWindow->addChild(pCheckBox5); CREATE_CHECKBOX(pCheckBox6, CCPoint(480, 165)); pCheckBox6->setExclusion(1); m_pWindow->addChild(pCheckBox6); CButton* pButton = CButton::createWith9Sprite(CCSize(280, 60), "sprite9_btn1.png", "sprite9_btn2.png"); pButton->setPosition(CCPoint(200, 450)); pButton->setUserTag(1); pButton->setOnClickListener(this, ccw_click_selector(CCheckBoxExclusionTest::onClick)); pButton->initText("set true for first", "", 30); m_pWindow->addChild(pButton); return true; }
void IPLIFFT::init() { // init _result = NULL; // basic settings setClassName("IPLIFFT"); setTitle("Inverse FFT"); setCategory(IPLProcess::CATEGORY_FOURIER); setDescription("Inverse Fast Fourier Transform."); setKeywords("IFFT"); // inputs and outputs addInput("Complex Image", IPL_IMAGE_COMPLEX); addOutput("Grayscale Image", IPL_IMAGE_GRAYSCALE); // properties //addProcessPropertyInt("mode", "Windowing Function:None|Hanning|Hamming|Blackman|Border", "", IPL_INT_RADIOBUTTONS, 0); }
/* Note symbols need to be exported on windoze... */ OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize( ossimSharedObjectInfo** info, const char* /*options*/) { Aws::SDKOptions options; Aws::InitAPI(options); myInfo.getDescription = getDescription; myInfo.getNumberOfClassNames = getNumberOfClassNames; myInfo.getClassName = getClassName; *info = &myInfo; ossim::S3StreamDefaults::loadDefaults(); /* Register our stream factory... */ ossim::StreamFactoryRegistry::instance()-> registerFactory( ossim::AwsStreamFactory::instance() ); setDescription(theDescription); }
void VMIFile::loadHeader(vmi_hdr_t *header) { DreamcastFile *df; uint16 year; df=getDCFile(); setDescription(header->description); setCopyright(header->copyright); setResourceName(header->resource_name); df->setSize(header->filesize); df->setName(header->filename); df->setGameFile(header->filemode & VMI_VMUGAME); df->setCopyProtected(header->filemode & VMI_NOCOPY); memcpy(&year, &header->timestamp.cent, 2); header->timestamp.cent=year / 100; header->timestamp.year=year % 100; header->timestamp.dow=(header->timestamp.dow == 0) ? 6 : header->timestamp.dow-1; df->timeToBCD(&header->timestamp); df->setTime(header->timestamp); }
/* Note symbols need to be exported on windoze... */ OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize( ossimSharedObjectInfo** info) { myInfo.getDescription = getDescription; myInfo.getNumberOfClassNames = getNumberOfClassNames; myInfo.getClassName = getClassName; *info = &myInfo; /* Register the readers... */ // ossimImageHandlerRegistry::instance()-> // registerFactory(ossimKmlSuperOverlayReaderFactory::instance()); /* Register the writers... */ ossimImageWriterFactoryRegistry::instance()-> registerFactory(ossimKmlSuperOverlayWriterFactory::instance()); setDescription(theDescription); }
void IPLBinarizeSavola::init() { // init _result = NULL; // basic settings setClassName("IPLBinarizeSavola"); setTitle("Local Threshold (Savola)"); setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS); setDescription("Local Threshold as proposed by Savola et. al."); // inputs and outputs addInput("Image", IPL_IMAGE_COLOR); addOutput("Image", IPL_IMAGE_COLOR); // properties addProcessPropertyInt("window", "Window Size", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9); addProcessPropertyDouble("aboveMean", "Above Mean", "", 0.0, IPL_WIDGET_SLIDER, 0.0, 1.0); }
SpectralLibraryManager::SpectralLibraryManager() : mpProgress(NULL), mpEditSpectralLibraryAction(NULL) { ExecutableShell::setName(SpectralLibraryMatch::getNameLibraryManagerPlugIn()); setType("Manager"); setSubtype("SpectralLibrary"); setVersion(SPECTRAL_VERSION_NUMBER); setCreator("Ball Aerospace & Technologies Corp."); setCopyright(SPECTRAL_COPYRIGHT); setShortDescription("Manages a spectral library."); setDescription("Controls populating and editing a spectral library for use in matching in-scene spectra."); setDescriptorId("{72116B2A-0A82-46b6-B0D0-CE168C73CA7E}"); allowMultipleInstances(false); executeOnStartup(true); destroyAfterExecute(false); setWizardSupported(false); setProductionStatus(SPECTRAL_IS_PRODUCTION_RELEASE); }
CSVAtlas::CSVAtlas(const QDomElement & elem) { QDomNodeList nList = elem.childNodes(); for(int n = 0; n < nList.count(); ++n) { QDomElement elemThis = nList.item(n).toElement(); if(elemThis.tagName() == "Description") setDescription(elemThis.text()); else if(elemThis.tagName() == "CSVMap") { CSVMap map(elemThis); _maps.append(map); } else { // ERROR } } }
/////////////////////// ROOT TRAJECTORY OUTPUT 3D ////////////////////////////// ROOTTrajectoryOutput3D::ROOTTrajectoryOutput3D(std::string filename) { setDescription("ROOTTrajectoryOutput3D, filename: " + filename); TThread::Lock(); ROOTFile = new TFile(filename.c_str(), "RECREATE", "CRPropa output data file"); Tree = new TTree("traj", "CRPropa 3D trajectories"); Tree->Branch("TrajectoryLength_Mpc", &TrajectoryLength_Mpc, "TrajectoryLength_Mpc/F" ); Tree->Branch("Particle_Type", &Particle_Type, "Particle_Type/I"); Tree->Branch("Energy_EeV", &Energy_EeV, "Energy_EeV/F" ); Tree->Branch("Position_X_Mpc", &Position_X_Mpc, "Position_X_Mpc/F" ); Tree->Branch("Position_Y_Mpc", &Position_Y_Mpc, "Position_Y_Mpc/F" ); Tree->Branch("Position_Z_Mpc", &Position_Z_Mpc, "Position_Z_Mpc/F" ); Tree->Branch("Direction_X_Mpc", &Direction_X_Mpc, "Direction_X_Mpc/F" ); Tree->Branch("Direction_Y_Mpc", &Direction_Y_Mpc, "Direction_Y_Mpc/F" ); Tree->Branch("Direction_Z_Mpc", &Direction_Z_Mpc, "Direction_Z_Mpc/F" ); TThread::UnLock(); }
void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType type) { if(APT_CLASSIFIED_INFO == type) { LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data); if(c_info && getClassifiedId() == c_info->classified_id) { // see LLPanelClassifiedEdit::sendUpdate() for notes mIsNewWithErrors = false; // for just created classified - panel will probably be closed when we get here. if(!getVisible()) { return; } enableEditing(true); setClassifiedName(c_info->name); setDescription(c_info->description); setSnapshotId(c_info->snapshot_id); setPosGlobal(c_info->pos_global); setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global)); // *HACK see LLPanelClassifiedEdit::sendUpdate() setCategory(c_info->category - 1); bool mature = is_cf_mature(c_info->flags); bool auto_renew = is_cf_auto_renew(c_info->flags); setContentType(mature ? CB_ITEM_MATURE : CB_ITEM_PG); getChild<LLUICtrl>("auto_renew")->setValue(auto_renew); getChild<LLUICtrl>("price_for_listing")->setValue(c_info->price_for_listing); getChildView("price_for_listing")->setEnabled(isNew()); resetDirty(); setInfoLoaded(true); enableVerbs(false); // for just created classified - in case user opened edit panel before processProperties() callback getChild<LLUICtrl>("save_changes_btn")->setLabelArg("[LABEL]", getString("save_label")); } } }
void IPLLocalThreshold::init() { // init _result = NULL; // basic settings setClassName("IPLLocalThreshold"); setTitle("Local Threshold"); setCategory(IPLProcess::CATEGORY_POINTOPERATIONS); setDescription("Niblack's Local Average Threshold"); // inputs and outputs addInput("Image", IPLData::IMAGE_COLOR); addOutput("Image", IPLImage::IMAGE_COLOR); // properties addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9); addProcessPropertyDouble("aboveMean", "Above Mean", "", 0.5, IPL_WIDGET_SLIDER, 0.0, 9.0); }
StatChart::StatChart(uint32_t width, uint32_t height, float _timeRange/*=50.0*/) : bitmap(new Util::Bitmap(width, height, Util::PixelFormat::RGBA)), timeRange(_timeRange), dataRows() { setDescription(Statistics::EVENT_TYPE_GEOMETRY, "Geometry (#polygons)"); setColor(Statistics::EVENT_TYPE_GEOMETRY, Util::Color4ub(0, 0, 0xff, 0xa0)); setRange(Statistics::EVENT_TYPE_GEOMETRY, 200000); setDescription(Statistics::EVENT_TYPE_IDLE, "CPU idle"); setColor(Statistics::EVENT_TYPE_IDLE, Util::Color4ub(0x80, 0x80, 0x80, 0x80)); setRange(Statistics::EVENT_TYPE_IDLE, 200000); setDescription(Statistics::EVENT_TYPE_START_TEST, "OccTest start"); setColor(Statistics::EVENT_TYPE_START_TEST, Util::Color4ub(0xFF, 0xFF, 0x80, 0x80)); setRange(Statistics::EVENT_TYPE_START_TEST, 2); setDescription(Statistics::EVENT_TYPE_END_TEST_VISIBLE, "OccTest visible"); setColor(Statistics::EVENT_TYPE_END_TEST_VISIBLE, Util::Color4ub(0x80, 0xFF, 0x80, 0x80)); setRange(Statistics::EVENT_TYPE_END_TEST_VISIBLE, 2); setDescription(Statistics::EVENT_TYPE_END_TEST_INVISIBLE, "OccTest invisible"); setColor(Statistics::EVENT_TYPE_END_TEST_INVISIBLE, Util::Color4ub(0xFF, 0x80, 0x80, 0x80)); setRange(Statistics::EVENT_TYPE_END_TEST_INVISIBLE, 2); setDescription(Statistics::EVENT_TYPE_FRAME_END, "Frame end"); setColor(Statistics::EVENT_TYPE_FRAME_END, Util::Color4ub(0xFF, 0x60, 0x60, 0x80)); setRange(Statistics::EVENT_TYPE_FRAME_END, 1); // FIXME: BE: Actually this does not belong here, but I do not know where to put it otherwise. static const Statistics::eventType_t EVENT_TYPE_OUTOFCORE_BEGIN = 8; static const Statistics::eventType_t EVENT_TYPE_OUTOFCORE_END = 9; setDescription(EVENT_TYPE_OUTOFCORE_BEGIN, "OutOfCore: Begin work"); setColor(EVENT_TYPE_OUTOFCORE_BEGIN, Util::Color4ub(255, 128, 0, 255)); setRange(EVENT_TYPE_OUTOFCORE_BEGIN, 2.0f); setDescription(EVENT_TYPE_OUTOFCORE_END, "OutOfCore: End work"); setColor(EVENT_TYPE_OUTOFCORE_END, Util::Color4ub(255, 128, 0, 255)); setRange(EVENT_TYPE_OUTOFCORE_END, 1.0f); }
void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType type) { if(APT_CLASSIFIED_INFO == type) { LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data); if(c_info && getClassifiedId() == c_info->classified_id) { setClassifiedName(c_info->name); setDescription(c_info->description); setSnapshotId(c_info->snapshot_id); setParcelId(c_info->parcel_id); setPosGlobal(c_info->pos_global); setSimName(c_info->sim_name); setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global)); getChild<LLUICtrl>("category")->setValue(LLClassifiedInfo::sCategories[c_info->category]); static std::string mature_str = getString("type_mature"); static std::string pg_str = getString("type_pg"); static LLUIString price_str = getString("l$_price"); static std::string date_fmt = getString("date_fmt"); bool mature = is_cf_mature(c_info->flags); getChild<LLUICtrl>("content_type")->setValue(mature ? mature_str : pg_str); getChild<LLIconCtrl>("content_type_moderate")->setVisible(mature); getChild<LLIconCtrl>("content_type_general")->setVisible(!mature); std::string auto_renew_str = is_cf_auto_renew(c_info->flags) ? getString("auto_renew_on") : getString("auto_renew_off"); getChild<LLUICtrl>("auto_renew")->setValue(auto_renew_str); price_str.setArg("[PRICE]", llformat("%d", c_info->price_for_listing)); getChild<LLUICtrl>("price_for_listing")->setValue(LLSD(price_str)); std::string date_str = date_fmt; LLStringUtil::format(date_str, LLSD().with("datetime", (S32) c_info->creation_date)); getChild<LLUICtrl>("creation_date")->setValue(date_str); setInfoLoaded(true); } } }
void GaduProtocol::socketContactStatusChanged( UinType uin, unsigned int ggStatusId, const QString &description, unsigned int maxImageSize) { auto newStatus = Status{}; newStatus.setType(GaduProtocolHelper::statusTypeFromGaduStatus(ggStatusId)); newStatus.setDescription(description); if (uin == GaduLoginParams.uin) { if ((!m_lastRemoteStatusRequest.isValid() || m_lastRemoteStatusRequest.elapsed() > 10) && newStatus != m_lastSentStatus) { emit remoteStatusChangeRequest(account(), newStatus); if (m_lastRemoteStatusRequest.isValid()) m_lastRemoteStatusRequest.restart(); else m_lastRemoteStatusRequest.start(); } return; } auto contact = contactManager()->byId(account(), QString::number(uin), ActionReturnNull); contact.setMaximumImageSize(maxImageSize); auto oldStatus = contact.currentStatus(); contact.setCurrentStatus(newStatus); contact.setBlocking(GaduProtocolHelper::isBlockingStatus(ggStatusId)); if (contact.isAnonymous()) { if (contact.ownerBuddy()) emit userStatusChangeIgnored(contact.ownerBuddy()); rosterService()->removeContact(contact); return; } // see issue #2159 - we need a way to ignore first status of given contact if (contact.ignoreNextStatusChange()) contact.setIgnoreNextStatusChange(false); else emit contactStatusChanged(contact, oldStatus); }
bool CListViewBasicTest::init() { CListViewTestSceneBase::init(); setTitle("CListViewBasicTest"); setDescription("ListView Test"); //test data tagItem tag1 = { Size(480, 10), Color3B::WHITE }; tagItem tag2 = { Size(480, 20), Color3B::RED }; tagItem tag3 = { Size(480, 30), Color3B::GREEN }; tagItem tag4 = { Size(100, 40), Color3B::ORANGE }; tagItem tag5 = { Size(480, 50), Color3B::MAGENTA }; tagItem tag6 = { Size(400, 60), Color3B::BLUE }; tagItem tag7 = { Size(300, 80), Color3B::RED }; tagItem tag8 = { Size(480, 30), Color3B::GRAY }; tagItem tag9 = { Size(480, 40), Color3B::YELLOW }; m_lDatas.push_back(tag1); m_lDatas.push_back(tag2); m_lDatas.push_back(tag3); m_lDatas.push_back(tag4); m_lDatas.push_back(tag5); m_lDatas.push_back(tag6); m_lDatas.push_back(tag7); m_lDatas.push_back(tag8); m_lDatas.push_back(tag9); //<< m_pListView = CListView::create(Size(480, 320)); m_pListView->setBackgroundImage("background.png"); m_pListView->setPosition(Vec2(480, 320)); m_pListView->setDirection(eScrollViewDirectionVertical); m_pWindow->addChild(m_pListView); CButton* pButton = CButton::createWith9Sprite(Size(150, 50), "sprite9_btn1.png", "sprite9_btn2.png"); pButton->setPosition(Vec2(150, 320)); pButton->setOnClickListener(this, ccw_click_selector(CListViewBasicTest::onClick)); pButton->initText("Add", "", 30); m_pWindow->addChild(pButton); return true; }
bool CButtonEventTest::init() { CButtonTestSceneBase::init(); setTitle("CButtonEventTest"); setDescription("button events"); CButton* pButton1 = CButton::create("btn1_1.png", "btn1_2.png", "btn1_3.png"); pButton1->setOnTouchBeganListener(this, ccw_touchbegan_selector(CButtonEventTest::onTouchBegan)); pButton1->setOnTouchMovedListener(this, ccw_touchevent_selector(CButtonEventTest::onTouchMoved)); pButton1->setOnTouchEndedListener(this, ccw_touchevent_selector(CButtonEventTest::onTouchEnded)); pButton1->setOnTouchCancelledListener(this, ccw_touchevent_selector(CButtonEventTest::onTouchCancelled)); pButton1->setPosition(CCPoint(350, 320)); m_pWindow->addChild(pButton1); m_pText1 = CLabel::create(); m_pText1->setAnchorPoint(CCPoint(0, 0.5)); m_pText1->setPosition(CCPoint(260, 430)); m_pText1->setFontSize(35.0f); m_pText1->setString("none"); m_pWindow->addChild(m_pText1); m_pDurationText = CLabel::create(); m_pDurationText->setPosition(CCPoint(260, 390)); m_pDurationText->setFontSize(35.0f); m_pDurationText->setString("ms:0"); m_pDurationText->setAnchorPoint(CCPoint(0, 0.5)); m_pWindow->addChild(m_pDurationText); CButton* pButton2 = CButton::create("btn1_1.png", "btn1_2.png", "btn1_3.png"); pButton2->setOnClickListener(this, ccw_click_selector(CButtonEventTest::onClick)); pButton2->setPosition(CCPoint(610, 320)); m_pWindow->addChild(pButton2); m_pText2 = CLabel::create(); m_pText2->setAnchorPoint(CCPoint(0, 0.5)); m_pText2->setPosition(CCPoint(520, 430)); m_pText2->setFontSize(35.0f); m_pText2->setString("none"); m_pWindow->addChild(m_pText2); return true; }
bool CCButtonEventTest::init() { CCButtonTestSceneBase::init(); setTitle("CCButtonEventTest"); setDescription("button events"); CCButton* pButton1 = CCButton::create("btn1_1.png", "btn1_2.png", "btn1_3.png"); pButton1->setTouchBeganSelector(this, touchbegan_selector(CCButtonEventTest::onTouchBegan)); pButton1->setTouchMovedSelector(this, touch_selector(CCButtonEventTest::onTouchMoved)); pButton1->setTouchEndedSelector(this, touch_selector(CCButtonEventTest::onTouchEnded)); pButton1->setTouchCancelledSelector(this, touch_selector(CCButtonEventTest::onTouchCancelled)); pButton1->setPosition(ccp(350, 320)); m_pLayout->addChild(pButton1); m_pText1 = CCTextTTF::create(); m_pText1->setAnchorPoint(ccp(0, 0.5)); m_pText1->setPosition(ccp(260, 430)); m_pText1->setFontSize(35.0f); m_pText1->setString("none"); m_pLayout->addChild(m_pText1); m_pDurationText = CCTextTTF::create(); m_pDurationText->setPosition(ccp(260, 390)); m_pDurationText->setFontSize(35.0f); m_pDurationText->setString("ms:0"); m_pDurationText->setAnchorPoint(ccp(0, 0.5)); m_pLayout->addChild(m_pDurationText); CCButton* pButton2 = CCButton::create("btn1_1.png", "btn1_2.png", "btn1_3.png"); pButton2->setClickSelector(this, click_selector(CCButtonEventTest::onClick)); pButton2->setPosition(ccp(610, 320)); m_pLayout->addChild(pButton2); m_pText2 = CCTextTTF::create(); m_pText2->setAnchorPoint(ccp(0, 0.5)); m_pText2->setPosition(ccp(520, 430)); m_pText2->setFontSize(35.0f); m_pText2->setString("none"); m_pLayout->addChild(m_pText2); return true; }
/** * Constructor */ RevoCalibration::RevoCalibration(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) { // Create fields QList<UAVObjectField *> fields; QStringList mag_biasElemNames; mag_biasElemNames.append("X"); mag_biasElemNames.append("Y"); mag_biasElemNames.append("Z"); fields.append( new UAVObjectField(QString("mag_bias"), QString("mGau"), UAVObjectField::FLOAT32, mag_biasElemNames, QStringList(), QString(""))); QStringList mag_transformElemNames; mag_transformElemNames.append("r0c0"); mag_transformElemNames.append("r0c1"); mag_transformElemNames.append("r0c2"); mag_transformElemNames.append("r1c0"); mag_transformElemNames.append("r1c1"); mag_transformElemNames.append("r1c2"); mag_transformElemNames.append("r2c0"); mag_transformElemNames.append("r2c1"); mag_transformElemNames.append("r2c2"); fields.append( new UAVObjectField(QString("mag_transform"), QString("gain"), UAVObjectField::FLOAT32, mag_transformElemNames, QStringList(), QString(""))); QStringList MagBiasNullingRateElemNames; MagBiasNullingRateElemNames.append("0"); fields.append( new UAVObjectField(QString("MagBiasNullingRate"), QString(""), UAVObjectField::FLOAT32, MagBiasNullingRateElemNames, QStringList(), QString(""))); QStringList BiasCorrectedRawElemNames; BiasCorrectedRawElemNames.append("0"); QStringList BiasCorrectedRawEnumOptions; BiasCorrectedRawEnumOptions.append("FALSE"); BiasCorrectedRawEnumOptions.append("TRUE"); fields.append( new UAVObjectField(QString("BiasCorrectedRaw"), QString(""), UAVObjectField::ENUM, BiasCorrectedRawElemNames, BiasCorrectedRawEnumOptions, QString(""))); // Initialize object initializeFields(fields, (quint8 *)&data, NUMBYTES); // Set the default field values setDefaultFieldValues(); // Set the object description setDescription(DESCRIPTION); // Set the Category of this object type setCategory(CATEGORY); connect(this, SIGNAL(objectUpdated(UAVObject *)), SLOT(emitNotifications())); }
void LLClassifiedItem::processProperties(void* data, EAvatarProcessorType type) { if(APT_CLASSIFIED_INFO != type) { return; } LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data); if( !c_info || c_info->classified_id != getClassifiedId() ) { return; } setClassifiedName(c_info->name); setDescription(c_info->description); setSnapshotId(c_info->snapshot_id); setPosGlobal(c_info->pos_global); LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); }