void ColorPalette::emitUpdate()
{
    colorsChanged(p->colors);
    columnsChanged(p->columns);
    nameChanged(p->name);
    fileNameChanged(p->fileName);
    dirtyChanged(p->dirty);
}
示例#2
0
void KexiWindow::dirtyChanged(KexiView* view)
{
    if (!d->dirtyChangedEnabled)
        return;
    d->viewThatRecentlySetDirtyFlag = isDirty() ? view : 0;
    updateCaption();
    emit dirtyChanged(this);
}
示例#3
0
void KexiWindow::setDirty(bool dirty)
{
    d->dirtyChangedEnabled = false;
    int m = d->openedViewModes;
    int mode = 1;
    while (m > 0) {
        if (m & 1) {
            KexiView *view = viewForMode(static_cast<Kexi::ViewMode>(mode));
            if (view) {
                view->setDirty(dirty);
            }
        }
        m >>= 1;
        mode <<= 1;
    }
    d->dirtyChangedEnabled = true;
    dirtyChanged(d->viewThatRecentlySetDirtyFlag); //update
}
示例#4
0
void FolderStatusModel::setAccountState(const AccountState *accountState)
{
    beginResetModel();
    _dirty = false;
    _folders.clear();
    _accountState = accountState;

    connect(FolderMan::instance(), &FolderMan::folderSyncStateChange,
        this, &FolderStatusModel::slotFolderSyncStateChange, Qt::UniqueConnection);
    connect(FolderMan::instance(), &FolderMan::scheduleQueueChanged,
        this, &FolderStatusModel::slotFolderScheduleQueueChanged, Qt::UniqueConnection);

    auto folders = FolderMan::instance()->map();
    foreach (auto f, folders) {
        if (!accountState)
            break;
        if (f->accountState() != accountState)
            continue;
        SubFolderInfo info;
        info._name = f->alias();
        info._path = "/";
        info._folder = f;
        info._checked = Qt::PartiallyChecked;
        _folders << info;

        connect(f, &Folder::progressInfo, this, &FolderStatusModel::slotSetProgress, Qt::UniqueConnection);
        connect(f, &Folder::newBigFolderDiscovered, this, &FolderStatusModel::slotNewBigFolder, Qt::UniqueConnection);
    }

    // Sort by header text
    std::sort(_folders.begin(), _folders.end(), sortByFolderHeader);

    // Set the root _pathIdx after the sorting
    for (int i = 0; i < _folders.size(); ++i) {
        _folders[i]._pathIdx << i;
    }

    endResetModel();
    emit dirtyChanged();
}
void ColorPalette::setDirty(bool dirty)
{
    if ( dirty != p->dirty )
        dirtyChanged( p->dirty = dirty );
}
示例#6
0
void EditorWidgetBase::undoStackCleanChanged(bool clean) noexcept {
  Q_UNUSED(clean);
  emit dirtyChanged(isDirty());
}