Skip to content

RColorDialog

Class in GUI Module
Header: #include <src/gui/RColorDialog.h>

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD. Persistence of the custom colors of the Qt color dialog (QColorDialog).

Qt only remembers the custom colors a user adds to the palette of the color dialog for the duration of the program run. loadCustomColors() restores them from the settings (QCAD3.ini), saveCustomColors() stores them back. All color dialogs of the application share the same custom colors.

static void loadCustomColors()
Restores the custom colors of the color dialog from the settings.
static void saveCustomColors()
Stores the custom colors of the color dialog in the settings.
static bool loaded
static const QString settingsKey

static void RColorDialog::loadCustomColors()

static

Restores the custom colors of the color dialog from the settings.

Called once at application startup, before any color dialog is shown.

static void RColorDialog::saveCustomColors()

static

Stores the custom colors of the color dialog in the settings.

Called whenever a color dialog was closed and at application shutdown.

static bool RColorDialog::loaded = false

static private

static const QString RColorDialog::settingsKey = "ColorDialog/CustomColors"

static private

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.