Exemplo n.º 1
0
void SectionCatalog::editSection(Section* section, Section* new_data) {
    new_data->setFiscal(section->isFiscal());
    try {
        getSectionByNumber(new_data->getNumber());
        if ( new_data->getNumber() != section->getNumber() )
            throw Error(220, "Указанный номер секции уже используется!");
        else
            updateSection(section, new_data);
    } catch (const Error& err ) {
        if ( err.getErrorCode() != ERROR_OBJECT_NOT_FOUND )
            throw err;
        else
            updateSection(section, new_data);
    }
}
Exemplo n.º 2
0
void seccurved::changecurve(float newAngle, float newRadius, float newDirection)
{
    fAngle = newAngle;
    fRadius = newRadius;
    fDirection = newDirection;
    length = 0.0;
    updateSection();
}
void QSpreadsheetHeaderView::mouseMoveEvent(QMouseEvent * event)
{
    QHeaderView::mouseMoveEvent(event);

    // Required to refresh the button menu enable/disable state.
    int logicalIndex = logicalIndexAt(event->pos());
    updateSection(logicalIndex);
}
Exemplo n.º 4
0
void TupExposureHeader::setSectionVisibility(int section, bool visibility)
{
    // Q_UNUSED(visibility);
    // FIXME: in tupexpousertable.cpp visibility or !m_sections[logicalndex].isVisible
    // m_sections[logicalndex].isVisible = !m_sections[logicalndex].isVisible;

    m_sections[section].isVisible = visibility;
    updateSection(section);
}
Exemplo n.º 5
0
void MyHeader::mousePressEvent(QMouseEvent* event)
{
    int index = logicalIndexAt(event->pos());
    if (orientation() == Qt::Horizontal) {
        for (int var = 0; var < count(); ++var)
            m_isOn[var] = false;
        m_isOn[index] = true;
        for (int var = 0; var < count(); ++var)
            updateSection(var);
    } else {
        m_isOn[index] = !m_isOn[index];
        updateSection(index);
    }

    stateChanged(m_isOn, orientation());

    QHeaderView::mousePressEvent(event);
}
void KTExposureHeader::setVisibilityChanged(int layerIndex, bool visibility)
{
    // Q_UNUSED(visibility);
    // FIXME: in ktexpousertable.cpp visibility or !m_layers[logicalndex].isVisible
    // m_layers[logicalndex].isVisible = !m_layers[logicalndex].isVisible;

    m_layers[layerIndex].isVisible = visibility;
    updateSection(layerIndex);
}
Exemplo n.º 7
0
CAssemblerLabel::CAssemblerLabel(const std::wstring& name, u64 RamPos, int Section, bool constant)
{
	this->labelname = name;
	this->labelvalue = RamPos;
	this->constant = constant;
	this->label = NULL;
	
	if (Global.symbolTable.isLocalSymbol(this->labelname) == false)	
		updateSection(++Global.Section);
}
void QSpreadsheetHeaderView::mousePressEvent ( QMouseEvent * event )
{
    QHeaderView::mousePressEvent(event);

    int logicalIndex = logicalIndexAt(event->pos());

    if (buttonMenuRect(logicalIndex).contains(event->pos())) {
        QMenu menu(this);
        QAction *hideCol = menu.addAction("Hide column");
        QAction *sortAZ = menu.addAction("Sort sheet A->Z");
        QAction *sortZA = menu.addAction("Sort sheet Z->A");

        // Disable hide column if only one column remains. Otherwise
        // the gui is no more available to show them back.
        hideCol->setEnabled(hiddenSectionCount() < count() - 1);

        QAction *res = menu.exec(mapToGlobal(event->pos()));

        if (res == hideCol) {
            hideSection(logicalIndex);
            updateSection(logicalIndex-1);
        }
        if (res == sortAZ)
            model()->sort(logicalIndex, Qt::AscendingOrder);
        if (res == sortZA)
            model()->sort(logicalIndex, Qt::DescendingOrder);
    }

    // Catch previous arrow mouse click.
    if (prevRect(logicalIndex).contains(event->pos())) {
        showSection(logicalIndex - 1);
        updateSection(logicalIndex - 2);
    }

    // Catch next arrow mouse click.
    if (nextRect(logicalIndex).contains(event->pos())) {
        showSection(logicalIndex + 1);
        updateSection(logicalIndex + 2);
    }
}
Exemplo n.º 9
0
void MyHeader::mouseMoveEvent(QMouseEvent* event)
{
    if (orientation() == Qt::Horizontal)
        return;
    static int index = 0;
    if (index != logicalIndexAt(event->pos())) {
        index = logicalIndexAt(event->pos());
        if (event->buttons() & Qt::LeftButton) {
            qDebug() << "mouseMoveEvent" << event;
            m_isOn[index] = !m_isOn[index];
            updateSection(index);
            stateChanged(m_isOn, orientation());
        }
    }
}
Exemplo n.º 10
0
// Constructor
// begin of a profile section
VSProfileLib::VSProfileLib(std::string name, bool profileGL) {

	int found;
	pTime w;
	sCurrLevel++;

#if VSPL_CLOCK == VSPL_WIN_HIGH_PERFORMANCE_COUNTER
	QueryPerformanceFrequency(&sFreq);
#endif

	GetTicks(&w);

	// create new level
	if (sCurrLevel == sTotalLevels) {

		sLevels[sCurrLevel].cursor = -1;
		createNewSection(name, w, profileGL);
		// store the size of the largest section name
		int aux = name.size() ;
		if (aux > sDisp)
			sDisp = aux;
		sTotalLevels++;
	}
	else {  	
		// search for name and parent
		found = searchSection(name);
		if (found != -1)
			updateSection(found, w);
		else {
			// create new section inside current level
			createNewSection(name, w, profileGL);
			// store the size of the largest section name
			// for report formatting purposes
			int aux = name.size() ;
			if (aux > sDisp)
				sDisp = aux;
		}
	}

}
Exemplo n.º 11
0
CAssemblerLabel::CAssemblerLabel(const std::wstring& name)
{
    this->defined = false;
    this->label = NULL;

    if (Global.symbolTable.isLocalSymbol(name) == false)
        updateSection(++Global.Section);

    label = Global.symbolTable.getLabel(name, FileNum, getSection());
    if (label == NULL)
    {
        Logger::printError(Logger::Error, L"Invalid label name \"%s\"", name);
        return;
    }

    // does this need to be in validate?
    if (label->getUpdateInfo())
    {
        if (Arch == &Arm && Arm.GetThumbMode())
            label->setInfo(1);
        else
            label->setInfo(0);
    }
}
Exemplo n.º 12
0
void TupExposureHeader::setSectionTitle(int section, const QString &text)
{
    m_sections[section].title = text;
    updateSection(section);
}
Exemplo n.º 13
0
void KTExposureHeader::setLockLayer(int logicalndex, bool lock)
{
    m_layers[logicalndex].isLocked = lock;
    updateSection(logicalndex);
}
Exemplo n.º 14
0
void KTExposureHeader::updateSelection(int col)
{
    currentCol = col;
    updateSection(col);
}
Exemplo n.º 15
0
void TupExposureHeader::updateSelection(int section)
{
    m_currentSection = section;
    updateSection(section);
}
Exemplo n.º 16
0
void KTExposureHeader::setLayerName(int layerIndex, const QString &text)
{
    m_layers[layerIndex].title = text;
    updateSection(layerIndex);
}
Exemplo n.º 17
0
void RotatedHeader::column_hover(int col) {
    updateSection(m_hovered_column);
    m_hovered_column = col;
    updateSection(col);
}
Exemplo n.º 18
0
void QtlCheckableHeaderView::processCheckStateChanged()
{
    updateSection(0);
    emit checkStateChanged(_checkState);
}
Exemplo n.º 19
0
void TupExposureHeader::setLockFlag(int logicalndex, bool lock)
{
    m_sections[logicalndex].isLocked = lock;
    updateSection(logicalndex);
}