File indexing completed on 2024-07-14 07:17:15

0001 /*
0002     SPDX-FileCopyrightText: 2004 Jason Harris <jharris@30doradus.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_opscolors.h"
0010 
0011 #include <qstringlist.h>
0012 
0013 class KStars;
0014 
0015 /**
0016  * @class OpsColors
0017  *
0018  * The Colors page allows the user to adjust all of the colors used to
0019  * display the night sky.  The colors are presented as a list of
0020  * colored rectangles and a description of its assignment in the map.
0021  * Clicking on any color opens a KColorDialog for selecting a new color.
0022  *
0023  * The user can also load preset color schemes, or create new schemes
0024  * from the current set of colors.
0025  *
0026  * @short The Colors page of the Options window.
0027  * @author Jason Harris
0028  * @author Jasem Mutlaq
0029  * @version 1.1
0030  */
0031 class OpsColors : public QFrame, public Ui::OpsColors
0032 {
0033     Q_OBJECT
0034 
0035   public:
0036     explicit OpsColors();
0037     virtual ~OpsColors() override = default;
0038 
0039   private slots:
0040     void newColor(QListWidgetItem *item);
0041     void slotPreset(int i);
0042     void slotAddPreset();
0043     void slotSavePreset();
0044     void slotRemovePreset();
0045     void slotStarColorMode(int);
0046     void slotStarColorIntensity(int);
0047     void slotChangeTheme(QListWidgetItem *item);
0048 
0049   private:
0050     bool setColors(const QString &filename);
0051 
0052     QStringList PresetFileList;
0053 };