RColorDialog
Class in GUI Module
Header: #include <src/gui/RColorDialog.h>
Description
Section titled “Description”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 Public Functions
Section titled “Static Public Functions”| 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 Private Attributes
Section titled “Static Private Attributes”| static bool | loaded |
| static const QString | settingsKey |
Member Documentation
Section titled “Member Documentation”loadCustomColors
Section titled “loadCustomColors”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.
saveCustomColors
Section titled “saveCustomColors”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.
loaded
Section titled “loaded”static bool RColorDialog::loaded = falsestatic private
settingsKey
Section titled “settingsKey”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.