Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.0 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2018 Jouni Pentikäinen <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "KisNewWindowLayoutDialog.h"

#include <kstandardguiitem.h>

KisNewWindowLayoutDialog::KisNewWindowLayoutDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    KGuiItem::assign(buttonBox->button(QDialogButtonBox::Ok), KStandardGuiItem::ok());
    KGuiItem::assign(buttonBox->button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel());
    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}

void KisNewWindowLayoutDialog::setName(const QString &name)
{
    nameInput->setText(name);
}

QString KisNewWindowLayoutDialog::name() const
{
    return nameInput->text();
}

bool KisNewWindowLayoutDialog::showImageInAllWindows() const
{
    return chkActiveInAllWindows->isChecked();
}

bool KisNewWindowLayoutDialog::primaryWorkspaceFollowsFocus() const
{
    return chkFollowFocus->isChecked();
}