bool fl_ContainerLayout::_getPropertiesAP(const PP_AttrProp*& pAP) { pAP = NULL; FPVisibility eVisibility = getAP(pAP); UT_return_val_if_fail(pAP, false); setVisibility(eVisibility); // Find the folded Level of the strux lookupFoldedLevel(); if((isHidden() == FP_VISIBLE) && (getFoldedLevel() > 0) && (getLevelInList() > getFoldedLevel()) ) { xxx_UT_DEBUGMSG(("Table set to hidden folded \n")); setVisibility(FP_HIDDEN_FOLDED); } // evaluate "display" property // display property const char* pszDisplay = NULL; pAP->getProperty("display", (const gchar *&)pszDisplay); if(isHidden() == FP_VISIBLE && pszDisplay && !strcmp(pszDisplay, "none")) { setVisibility(FP_HIDDEN_TEXT); } return true; }
Interaction::CommandResult* CCreateField::create(Visualization::Item* /*source*/, Visualization::Item* target, const QString& name, const QStringList& attributes) { auto cl = dynamic_cast<OOModel::Class*> (target->node()); Q_ASSERT(cl); auto f = new OOModel::Field(); f->setTypeExpression(new OOModel::EmptyExpression()); if (!name.isEmpty()) f->setName(name); // Set visibility if (attributes.first() == "private" ) f->setVisibility(OOModel::Visibility::PRIVATE); else if (attributes.first() == "protected" ) f->setVisibility(OOModel::Visibility::PROTECTED); else if (attributes.first() == "public" ) f->setVisibility(OOModel::Visibility::PUBLIC); else f->setVisibility(OOModel::Visibility::DEFAULT); // Set scope if (attributes.last() == "static") f->setStorageSpecifier(OOModel::StorageSpecifier::CLASS_VARIABLE); else f->setStorageSpecifier(OOModel::StorageSpecifier::INSTANCE_VARIABLE); cl->fields()->beginModification("create field"); cl->fields()->append(f); cl->fields()->endModification(); target->setUpdateNeeded(Visualization::Item::StandardUpdate); target->scene()->addPostEventAction(new Interaction::SetCursorEvent(target, (name.isEmpty() ? static_cast<Model::Node*>(f->nameNode()) : f->typeExpression()), Interaction::SetCursorEvent::CursorDefault, false)); return new Interaction::CommandResult(); }
/** * Renders the item and checks if it has been picked up by the hero. */ void Item::render(float dt) { // change the colour depending on the item type switch(getType()) { case HEALTH: glColor3f(1, 0, 1); break; case ENERGY: glColor3f(0, 0, 1); break; case GRENADE: glColor3f(0.31, 0.59, 0.20); break; case TRAP: glColor3f(0.5, 0.5, 0.5); break; } //call the superclass Entity::render(dt); if (!spent) { //if the hero or the haggis land on this cell, activate this item if (level->getHero()->getCell() == getCell()) { //the hero got it level->notifyGeneralAction(new ItemAction(this, level->getHero())); setVisibility(true); spent = true; } else if (level->getHaggis()->getCell() == getCell()) { //the haggis got it level->notifyGeneralAction(new ItemAction(this, level->getHaggis())); setVisibility(true); spent = true; } } }
void BuddyListBuddy::update() { BuddyListNode::update(); const char *status = getBuddyStatus(buddy); const char *alias = purple_buddy_get_alias(buddy); if (status[0]) { char *text = g_strdup_printf("%s %s", status, alias); setText(text); g_free(text); } else setText(alias); sortIn(); updateColorScheme(); if (!purple_account_is_connected(purple_buddy_get_account(buddy))) { // hide if account is offline setVisibility(false); } else setVisibility(BUDDYLIST->getShowOfflineBuddiesPref() || status[0]); updateFilterVisibility(alias); }
bool SymbianApplication::symbianEventFilter(const QSymbianEvent *event) { if (event->type() == QSymbianEvent::WindowServerEvent && event->windowServerEvent()->Type() == EEventWindowVisibilityChanged) { TUint flags = event->windowServerEvent()->VisibilityChanged()->iFlags; if (flags & TWsVisibilityChangedEvent::ENotVisible) setVisibility(NotVisible); else if (flags & TWsVisibilityChangedEvent::EFullyVisible) setVisibility(FullyVisible); else setVisibility(PartiallyVisible); } return QApplication::symbianEventFilter(event); }
void ProcAttachPS::filterEdited(const QString& text) { QListViewItem* i = processList->firstChild(); if (i) { setVisibility(i, text); } }
Method::Method(const QString& name, Visibility::VisibilityType vis, StorageSpecifier::StorageSpecifierTypes storage) : Model::ExtendableNode (nullptr, Method::getMetaData()) { setName(name); setVisibility(vis); setStorageSpecifier(storage); }
float SmoothSailingCallback( float inElapsedSinceLastCall, float inElapsedTimeSinceLastFlightLoop, int inCounter, void *inRefcon) { /* get altitude - it's used in a number of places */ float alt_agl = XPLMGetDataf( ref_alt_agl ); float alt_msl = XPLMGetDataf( ref_alt_msl ); /* only reset time if we think there's a reason to do it (set elsewhere) * and if the plane is not in the air */ if( reset_time && alt_agl < 1 ) { resetTime(); } else { reset_time = false; } setVisibility(); setCloudBase( alt_agl, alt_msl ); setWind( alt_agl, alt_msl ); setTurbulence(); return CALLBACK_INTERVAL; }
static void setVisibilityAllWindows(int isVisible) { int viewCount = getViewCount(); for (int i = 0; i < viewCount; i++) { setVisibility(getViewSearchName(i), isVisible); } }
void KonvergoWindow::updateFullscreenState() { if (SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "fullscreen").toBool() || SystemComponent::Get().isOpenELEC()) { // if we were go from windowed to fullscreen // we want to stor our current windowed position if (!isFullScreen()) saveGeometry(); setVisibility(QWindow::FullScreen); } else { setVisibility(QWindow::Windowed); loadGeometry(); } }
//------------------------------------------------------------------------------ // updateData -- //------------------------------------------------------------------------------ void Cursor::updateData(const LCreal dt) { int ln = 0; int cp = 0; if (getDisplay()->focus() != 0) { setVisibility( getDisplay()->focus()->cursor(&ln,&cp) ); } else { setVisibility(false); } if (isVisible()) { line(ln); column(cp); BaseClass::updateData(dt); } }
GlobalVariable* createImplPointer(PointerType &PT, Module &M, const Twine &Name, Constant *Initializer) { auto IP = new GlobalVariable(M, &PT, false, GlobalValue::ExternalLinkage, Initializer, Name, nullptr, GlobalValue::NotThreadLocal, 0, true); IP->setVisibility(GlobalValue::HiddenVisibility); return IP; }
caFrame::caFrame(QWidget *parent) : QFrame(parent) { thisBackColor = Qt::gray; thisBackgroundMode = Outline; setVisibility(StaticV); setVisibilityMode(All); setBackground(thisBackColor); }
void BuddyListContact::update() { BuddyListNode::update(); PurpleBuddy *buddy = purple_contact_get_priority_buddy(contact); if (!buddy) { /* The contact does not have any associated buddy, ignore it until it gets * a buddy assigned. */ setText("*Contact*"); setVisibility(false); return; } // format contact size char *size; if (contact->currentsize > 1) size = g_strdup_printf(" (%d)", contact->currentsize); else size = NULL; // format contact label const char *alias = purple_contact_get_alias(contact); const char *status = getBuddyStatus(buddy); char *text; if (status[0]) text = g_strdup_printf("%s %s%s", status, alias, size ? size : ""); else text = g_strdup_printf("%s%s", alias, size ? size : ""); setText(text); g_free(size); g_free(text); sortIn(); updateColorScheme(); if (!purple_account_is_connected(purple_buddy_get_account(buddy))) { // hide if account is offline setVisibility(false); } else setVisibility(BUDDYLIST->getShowOfflineBuddiesPref() || status[0]); updateFilterVisibility(alias); }
KonvergoWindow::KonvergoWindow(QWindow* parent) : QQuickWindow(parent), m_debugLayer(false), m_lastScale(1.0) { // NSWindowCollectionBehaviorFullScreenPrimary is only set on OSX if Qt::WindowFullscreenButtonHint is set on the window. setFlags(flags() | Qt::WindowFullscreenButtonHint); m_infoTimer = new QTimer(this); m_infoTimer->setInterval(1000); installEventFilter(new EventFilter(this)); connect(m_infoTimer, &QTimer::timeout, this, &KonvergoWindow::updateDebugInfo); InputComponent::Get().registerHostCommand("close", this, "close"); InputComponent::Get().registerHostCommand("toggleDebug", this, "toggleDebug"); InputComponent::Get().registerHostCommand("reload", this, "reloadWeb"); InputComponent::Get().registerHostCommand("fullscreen", this, "toggleFullscreen"); #ifdef TARGET_RPI // On RPI, we use dispmanx layering - the video is on a layer below Konvergo, // and during playback the Konvergo window is partially transparent. The OSD // will be visible on top of the video as part of the Konvergo window. setColor(QColor("transparent")); #else setColor(QColor("#111111")); #endif loadGeometry(); notifyScale(size()); connect(SettingsComponent::Get().getSection(SETTINGS_SECTION_MAIN), &SettingsSection::valuesUpdated, this, &KonvergoWindow::updateMainSectionSettings); connect(this, &KonvergoWindow::visibilityChanged, this, &KonvergoWindow::onVisibilityChanged); connect(this, &KonvergoWindow::enableVideoWindowSignal, this, &KonvergoWindow::enableVideoWindow, Qt::QueuedConnection); connect(&PlayerComponent::Get(), &PlayerComponent::windowVisible, this, &KonvergoWindow::playerWindowVisible); connect(&PlayerComponent::Get(), &PlayerComponent::playbackStarting, this, &KonvergoWindow::playerPlaybackStarting); // this is using old syntax because ... reasons. QQuickCloseEvent is not public class connect(this, SIGNAL(closing(QQuickCloseEvent*)), this, SLOT(closingWindow())); connect(qApp, &QCoreApplication::aboutToQuit, this, &KonvergoWindow::closingWindow); #ifdef KONVERGO_OPENELEC setVisibility(QWindow::FullScreen); #else updateFullscreenState(false); #endif emit enableVideoWindowSignal(); }
//------------------------------------------------------------------------------ // updateData() -- update non time-critical threads here //------------------------------------------------------------------------------ void GhostHorizon::updateData(const LCreal dt) { // Update our base class BaseClass::updateData(dt); // get our table to determine our min and max value LCreal maxPitch = 90; LCreal minPitch = -90; const Basic::Table1* table = getScalingTable(); if (table != nullptr) { maxPitch = table->getMaxX(); minPitch = table->getMinX(); } LCreal value = getPreScaleInstValue(); if (value <= minPitch/* || value >= pitchLim*/) { setVisibility(true); // scale our location value //location = -(location - margin); if (sColorName != nullptr) { BasicGL::Display* d = getDisplay(); if (d != nullptr) { Basic::Color* c = d->getColor(sColorName->getString()); if (c != nullptr) { skyColor.set(c->red(), c->green(), c->blue()); } } } } else if (value >= maxPitch) { setVisibility(true); //location = -(location + margin); if (gColorName != nullptr) { BasicGL::Display* d = getDisplay(); if (d != nullptr) { Basic::Color* c = d->getColor(gColorName->getString()); if (c != nullptr) { groundColor.set(c->red(), c->green(), c->blue()); } } } } else setVisibility(false); }
MessageBoxContainer::MessageBoxContainer( Frame* frame, MessageBox* msg ) : m_frame(frame),m_msg(msg) { add(m_frame); setMargins(0,0,0,0); m_frame->setResizable(false); m_frame->setMovable(false); setVisibility(false); setFocusable(false); }
Property::Property(std::string identifier, std::string guiName, Visibility visibility) : _owner(nullptr) , _identifier(std::move(identifier)) { ghoul_assert(!_identifier.empty(), "Identifier must not be empty"); ghoul_assert(!guiName.empty(), "guiName must not be empty"); setVisibility(visibility); _metaData.setValue(MetaDataKeyGuiName, std::move(guiName)); }
void HighlightItem::activate() { if (active) return; active = 1; if (anim) { delete anim; anim = 0; } setVisibility(1); }
void MainWindow::initialize(){ static const QRect INIT_WINDOW_BOUNDS (0, 0, 1600, 900); animating = true; setWidth(INIT_WINDOW_BOUNDS.width()); setHeight(INIT_WINDOW_BOUNDS.height()); setPosition(0, 0); setVisibility(Windowed); world = coBootUp(&inputDevice, QRect(0, 0, width() * .75, height() * .75), INIT_WINDOW_BOUNDS); }
void HighlightItem::mousePressEvent(QGraphicsSceneMouseEvent * event) { if (anim) { delete anim; anim = 0; } active = 0; setVisibility(0); board->move(s1, s2); //~ deactivate(); }
void BuddyListNode::updateFilterVisibility(const char *name) { if (!isVisible()) return; const char *filter = BUDDYLIST->getFilterString(); if (!filter[0]) return; // filtering is active setVisibility(purple_strcasestr(name, filter)); }
void BuddyListChat::update() { BuddyListNode::update(); const char *name = purple_chat_get_name(chat); setText(name); sortIn(); // hide if account is offline setVisibility(purple_account_is_connected(purple_chat_get_account(chat))); updateFilterVisibility(name); }
int caInclude::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = getMacro(); break; case 1: *reinterpret_cast< QString*>(_v) = getFileName(); break; case 2: *reinterpret_cast< Visibility*>(_v) = getVisibility(); break; case 3: *reinterpret_cast< QString*>(_v) = getVisibilityCalc(); break; case 4: *reinterpret_cast< QString*>(_v) = getChannelA(); break; case 5: *reinterpret_cast< QString*>(_v) = getChannelB(); break; case 6: *reinterpret_cast< QString*>(_v) = getChannelC(); break; case 7: *reinterpret_cast< QString*>(_v) = getChannelD(); break; } _id -= 8; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setMacro(*reinterpret_cast< QString*>(_v)); break; case 1: setFileName(*reinterpret_cast< QString*>(_v)); break; case 2: setVisibility(*reinterpret_cast< Visibility*>(_v)); break; case 3: setVisibilityCalc(*reinterpret_cast< QString*>(_v)); break; case 4: setChannelA(*reinterpret_cast< QString*>(_v)); break; case 5: setChannelB(*reinterpret_cast< QString*>(_v)); break; case 6: setChannelC(*reinterpret_cast< QString*>(_v)); break; case 7: setChannelD(*reinterpret_cast< QString*>(_v)); break; } _id -= 8; } else if (_c == QMetaObject::ResetProperty) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 8; } #endif // QT_NO_PROPERTIES return _id; }
void BuddyListGroup::update() { BuddyListNode::update(); setText(purple_group_get_name(group)); // sort in the group BuddyList::GroupSortMode mode = BUDDYLIST->getGroupSortMode(); switch (mode) { case BuddyList::GROUP_SORT_BY_USER: { /* Note that the sorting below works even if there was * a contact/chat/buddy node that is attached at the root level of the * blist treeview. This happens when such a node was just created (the * new_node() callback was called) but the node doesn't have any * parent yet. */ PurpleBlistNode *prev = purple_blist_node_get_sibling_prev( blist_node); if (prev) { // it better be a group node g_assert(PURPLE_BLIST_NODE_IS_GROUP(prev)); BuddyListNode *bnode = reinterpret_cast<BuddyListNode*>( purple_blist_node_get_ui_data(prev)); // there has to be ui_data set for all group nodes! g_assert(bnode); treeview->moveNodeAfter(ref, bnode->getRefNode()); } else { // the group is the first one in the list CppConsUI::TreeView::NodeReference parent_ref = treeview->getRootNode(); treeview->moveNodeBefore(ref, parent_ref.begin()); } } break; case BuddyList::GROUP_SORT_BY_NAME: sortIn(); break; } bool vis = true; if (!BUDDYLIST->getShowEmptyGroupsPref()) vis = purple_blist_get_group_size(group, FALSE); setVisibility(vis); }
XMLEditWidget::XMLEditWidget(const MLXMLPluginInfo::XMLMap& xmlWidgetTag,EnvWrap& envir,QWidget* parent) :XMLMeshLabWidget(xmlWidgetTag,envir,parent) { fieldDesc = new QLabel(xmlWidgetTag[MLXMLElNames::guiLabel],this); lineEdit = new QLineEdit(this); //int row = gridLay->rowCount() -1; fieldDesc->setToolTip(xmlWidgetTag[MLXMLElNames::paramHelpTag]); lineEdit->setText(xmlWidgetTag[MLXMLElNames::paramDefExpr]); //gridLay->addWidget(fieldDesc,row,0,Qt::AlignTop); //gridLay->addWidget(lineEdit,row,1,Qt::AlignTop); connect(lineEdit,SIGNAL(editingFinished()),parent,SIGNAL(parameterChanged())); connect(lineEdit,SIGNAL(selectionChanged()),this,SLOT(tooltipEvaluation())); setVisibility(isImportant); }
XMLAbsWidget::XMLAbsWidget(const MLXMLPluginInfo::XMLMap& xmlWidgetTag, EnvWrap& envir,QWidget* parent ) :XMLMeshLabWidget(xmlWidgetTag,envir,parent) { m_min = env.evalFloat(xmlWidgetTag[MLXMLElNames::guiMinExpr]); m_max = env.evalFloat(xmlWidgetTag[MLXMLElNames::guiMaxExpr]); fieldDesc = new QLabel(xmlWidgetTag[MLXMLElNames::guiLabel] + " (abs and %)",this); fieldDesc->setToolTip(xmlWidgetTag[MLXMLElNames::paramHelpTag]); absSB = new QDoubleSpinBox(this); percSB = new QDoubleSpinBox(this); absSB->setMinimum(m_min-(m_max-m_min)); absSB->setMaximum(m_max*2); absSB->setAlignment(Qt::AlignRight); int decimals= 7-ceil(log10(fabs(m_max-m_min)) ) ; //qDebug("range is (%f %f) %f ",m_max,m_min,fabs(m_max-m_min)); //qDebug("log range is %f ",log10(fabs(m_max-m_min))); absSB->setDecimals(decimals); absSB->setSingleStep((m_max-m_min)/100.0); float initVal = env.evalFloat(xmlWidgetTag[MLXMLElNames::paramDefExpr]); absSB->setValue(initVal); percSB->setMinimum(-200); percSB->setMaximum(200); percSB->setAlignment(Qt::AlignRight); percSB->setSingleStep(0.5); percSB->setValue((100*(initVal - m_min))/(m_max - m_min)); percSB->setDecimals(3); absLab=new QLabel("<i> <small> world unit</small></i>",this); percLab=new QLabel("<i> <small> perc on"+QString("(%1 .. %2)").arg(m_min).arg(m_max)+"</small></i>",this); //gridLay->addWidget(fieldDesc,row,0,Qt::AlignLeft); glay = new QGridLayout(); glay->addWidget(absLab,0,0,Qt::AlignHCenter); glay->addWidget(percLab,0,1,Qt::AlignHCenter); glay->addWidget(absSB,1,0,Qt::AlignTop); glay->addWidget(percSB,1,1,Qt::AlignTop); //gridLay->addLayout(lay,row,1,1,2,Qt::AlignTop); connect(absSB,SIGNAL(valueChanged(double)),this,SLOT(on_absSB_valueChanged(double))); connect(percSB,SIGNAL(valueChanged(double)),this,SLOT(on_percSB_valueChanged(double))); connect(this,SIGNAL(dialogParamChanged()),parent,SIGNAL(parameterChanged())); setVisibility(isImportant); }
void QQuickWindowQmlImpl::setWindowVisibility() { Q_D(QQuickWindowQmlImpl); if (transientParent() && !transientParent()->isVisible()) return; if (sender()) { disconnect(transientParent(), &QWindow::visibleChanged, this, &QQuickWindowQmlImpl::setWindowVisibility); } // We have deferred window creation until we have the full picture of what // the user wanted in terms of window state, geometry, visibility, etc. if ((d->visibility == Hidden && d->visible) || (d->visibility > AutomaticVisibility && !d->visible)) { QQmlData *data = QQmlData::get(this); Q_ASSERT(data && data->context); QQmlError error; error.setObject(this); const QQmlContextData* urlContext = data->context; while (urlContext && urlContext->url().isEmpty()) urlContext = urlContext->parent; error.setUrl(urlContext ? urlContext->url() : QUrl()); QString objectId = data->context->findObjectId(this); if (!objectId.isEmpty()) error.setDescription(QCoreApplication::translate("QQuickWindowQmlImpl", "Conflicting properties 'visible' and 'visibility' for Window '%1'").arg(objectId)); else error.setDescription(QCoreApplication::translate("QQuickWindowQmlImpl", "Conflicting properties 'visible' and 'visibility'")); QQmlEnginePrivate::get(data->context->engine)->warning(error); } if (d->visibility == AutomaticVisibility) { setWindowState(QGuiApplicationPrivate::platformIntegration()->defaultWindowState(flags())); setVisible(d->visible); } else { setVisibility(d->visibility); } }
void MessageBoxContainer::showMessage( const std::string& title, const std::string& message, MessageBox::MessageType type, MessageBoxResultReceiver* rec, int tag ) { if(getGui()) { if(m_msg->getModalContainer()->getParent() == NULL) getGui()->add(m_msg->getModalContainer()); m_msg->getModalContainer()->bringToFront(); m_msg->getModalContainer()->setVisibility(true); } setGlobalOpacity(0.0f); bringToFront(); m_msg->showMessage(title,message,m_frame,type,rec,tag); setSize(m_frame->getSize()); recenter(); setVisibility(true); bool gotFocus = requestModalFocus(); }
HighlightItem::HighlightItem(qreal x, qreal y, Board* board, Square* s1, Square* s2, Direction dir) : QGraphicsPixmapItem(getPixmap(dir), board), board(board), s1(s1), s2(s2), direction(dir), visibilityVal(0), anim(0), active(0) { qreal scaleF; if (dir == horizontal) scaleF = WFactor()*Square::size()/getPixmap(dir).height(); else scaleF = WFactor()*Square::size()/getPixmap(dir).width(); setScale(scaleF); setZValue(1); setPos(x-scaleF*getPixmap(dir).width()/2, y-scaleF*getPixmap(dir).height()/2); //nie jestem pewien, czy ten efekt jest potrzebny, ale uzycie zwyklego //opacity jakos nawalalo - przezroczysty element nie dostawal mouseEventow setGraphicsEffect(new QGraphicsOpacityEffect()); setVisibility(0); setAcceptHoverEvents(1); };