Esempio n. 1
0
void IqPostmanMail::setFlags(const MailFlags &flags)
{
    if (m_flags != flags) {
        m_flags = flags;
        emit flagsChanged();
    }
}
Esempio n. 2
0
FlagsComboBox::FlagsComboBox(QWidget *parent):
    QComboBox(parent)
{
    setModel(new QStandardItemModel(this));
    setEditable(false);
    setItemDelegate(new QStyledItemDelegate(this));

    auto item = new QStandardItem;
    item->setFlags(Qt::ItemIsEnabled);
    standardItemModel()->appendRow(item);

    connect(view(), &QListView::pressed, this, [this](const QModelIndex &index)
    {
        auto item = standardItemModel()->itemFromIndex(index);

        if(!(item->flags() & Qt::ItemIsUserCheckable))
            return;

        if(item->checkState() == Qt::Checked)
            item->setCheckState(Qt::Unchecked);
        else
            item->setCheckState(Qt::Checked);
    });

    connect(standardItemModel(), &QStandardItemModel::dataChanged, this, [this]()
    {
        updateText();

        emit flagsChanged(flags());
    });
}
Esempio n. 3
0
void ShellWindow::setFlags(const Flags &flags)
{
    if (m_flags == flags)
        return;

    m_flags = flags;
    Q_EMIT flagsChanged();
}
Esempio n. 4
0
void OneMessageModel::handleModelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
    Q_ASSERT(topLeft.row() == bottomRight.row());
    Q_ASSERT(topLeft.parent() == bottomRight.parent());
    Q_ASSERT(topLeft.model() == bottomRight.model());

    if (m_message.isValid() && topLeft == m_message)
        emit flagsChanged();
}
//private
void PrivateQGraphicsObject::setMGObj(MapGraphicsObject * mgObj)
{
    _mgObj = mgObj;

    if (_mgObj == 0)
        return;

    //Connect signals/slots for all of the changes in the MapGraphicsObject that we must be able to handle
    connect(_mgObj,
            SIGNAL(enabledChanged()),
            this,
            SLOT(handleEnabledChanged()));
    connect(_mgObj,
            SIGNAL(opacityChanged()),
            this,
            SLOT(handleOpacityChanged()));
    connect(_mgObj,
            SIGNAL(parentChanged()),
            this,
            SLOT(handleParentChanged()));
    connect(_mgObj,
            SIGNAL(posChanged()),
            this,
            SLOT(handlePosChanged()));
    connect(_mgObj,
            SIGNAL(rotationChanged()),
            this,
            SLOT(handleRotationChanged()));
    connect(_mgObj,
            SIGNAL(visibleChanged()),
            this,
            SLOT(handleVisibleChanged()));
    connect(_mgObj,
            SIGNAL(zValueChanged()),
            this,
            SLOT(handleZValueChanged()));
    connect(_mgObj,
            SIGNAL(selectedChanged()),
            this,
            SLOT(handleMGSelectedChanged()));
    connect(_mgObj,
            SIGNAL(flagsChanged()),
            this,
            SLOT(handleMGFlagsChanged()));
    connect(mgObj,
            SIGNAL(keyFocusRequested()),
            this,
            SLOT(handleKeyFocusRequested()));

    //Get all of the info about the MGObject
    this->updateAllFromMG();

    connect(mgObj,
            SIGNAL(destroyed()),
            this,
            SLOT(deleteLater()));
}
void MapGraphicsObject::setFlags(MapGraphicsObject::MapGraphicsObjectFlags flags)
{
    _flags = flags;

    if (_constructed)
        this->flagsChanged();
    else
        QTimer::singleShot(1, this, SIGNAL(flagsChanged()));
}
Esempio n. 7
0
void BaseInstance::setFlags(const QSet<InstanceFlag> &flags)
{
	I_D(BaseInstance);
	if (flags != d->m_flags)
	{
		d->m_flags = flags;
		emit flagsChanged();
		emit propertiesChanged(this);
	}
}
Esempio n. 8
0
VisualNavbar::VisualNavbar(MainWindow *main, QWidget *parent) :
    QToolBar(main),
    graphicsView(new QGraphicsView),
    cursorGraphicsItem(nullptr),
    main(main)
{
    Q_UNUSED(parent);

    setObjectName("visualNavbar");
    setWindowTitle(tr("Visual navigation bar"));
    //    setMovable(false);
    setContentsMargins(0, 0, 0, 0);
    // If line below is used, with the dark theme the paintEvent is not called
    // and the result is wrong. Something to do with overwriting the style sheet :/
    //setStyleSheet("QToolBar { border: 0px; border-bottom: 0px; border-top: 0px; border-width: 0px;}");

    /*
    QComboBox *addsCombo = new QComboBox();
    addsCombo->addItem("");
    addsCombo->addItem("Entry points");
    addsCombo->addItem("Marks");
    */
    addWidget(this->graphicsView);
    //addWidget(addsCombo);

    connect(Core(), SIGNAL(seekChanged(RVA)), this, SLOT(on_seekChanged(RVA)));
    connect(Core(), SIGNAL(refreshAll()), this, SLOT(fetchAndPaintData()));
    connect(Core(), SIGNAL(functionsChanged()), this, SLOT(updateMetadataAndPaint()));
    connect(Core(), SIGNAL(flagsChanged()), this, SLOT(updateMetadataAndPaint()));

    graphicsScene = new QGraphicsScene(this);

    const QBrush bg = QBrush(QColor(74, 74, 74));

    graphicsScene->setBackgroundBrush(bg);

    this->graphicsView->setAlignment(Qt::AlignLeft);
    this->graphicsView->setMinimumHeight(20);
    this->graphicsView->setMaximumHeight(20);
    this->graphicsView->setFrameShape(QFrame::NoFrame);
    this->graphicsView->setRenderHints(0);
    this->graphicsView->setScene(graphicsScene);
    this->graphicsView->setRenderHints(QPainter::Antialiasing);
    this->graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    this->graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    // So the graphicsView doesn't intercept mouse events.
    this->graphicsView->setEnabled(false);
    this->graphicsView->setMouseTracking(true);
    setMouseTracking(true);
}
Esempio n. 9
0
void Mem::storeb(zword addr, zbyte value) {
	if (addr >= h_dynamic_size)
		runtimeError(ERR_STORE_RANGE);

	if (addr == H_FLAGS + 1) {
		// flags register is modified

		h_flags &= ~(SCRIPTING_FLAG | FIXED_FONT_FLAG);
		h_flags |= value & (SCRIPTING_FLAG | FIXED_FONT_FLAG);

		flagsChanged(value);
	}

	SET_BYTE(addr, value);
}
Esempio n. 10
0
// Set the widgets from the data object.
void 
SubdeptMaster::dataToWidget()
{
    _name->setText(_curr.name());
    _number->setText(_curr.number());
    _dept->setId(_curr.deptId());
    _purchased->setChecked(_curr.isPurchased());
    _sold->setChecked(_curr.isSold());
    _inventoried->setChecked(_curr.isInventoried());
    _sell_tax->setId(_curr.sellTax());
    _purch_tax->setId(_curr.purchaseTax());
    _target_gm->setFixed(_curr.targetGM());
    _allowed_var->setFixed(_curr.allowedVariance());
    _expense_acct->setId(_curr.expenseAccount());
    _income_acct->setId(_curr.incomeAccount());
    _asset_acct->setId(_curr.assetAccount());
    _discountable->setChecked(_curr.isDiscountable());
    _inactive->setChecked(!_curr.isActive());

    flagsChanged();
}
Esempio n. 11
0
void SearchBarWidget::notifyFlagsChanged()
{
	emit flagsChanged(getFlags());
}
Esempio n. 12
0
void GroupFlagsWidget::updated() 
{
	emit flagsChanged(flags()) ;
}