-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ui_options for changing default color palette
- Loading branch information
Showing
15 changed files
with
205 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#include "colorpalette.hpp" | ||
#include <qnamespace.h> | ||
|
||
ColorPalette::ColorPalette() | ||
: m_gray(Qt::gray), m_red(Qt::red), m_green(Qt::green), m_yellow(Qt::yellow), m_blue(Qt::blue), | ||
m_magenta(Qt::magenta), m_cyan(Qt::cyan), m_white(Qt::white) | ||
{ | ||
} | ||
|
||
void ColorPalette::setGray(QColor color) | ||
{ | ||
m_gray = color; | ||
} | ||
void ColorPalette::setRed(QColor color) | ||
{ | ||
m_red = color; | ||
} | ||
void ColorPalette::setGreen(QColor color) | ||
{ | ||
m_green = color; | ||
} | ||
void ColorPalette::setYellow(QColor color) | ||
{ | ||
m_yellow = color; | ||
} | ||
void ColorPalette::setBlue(QColor color) | ||
{ | ||
m_blue = color; | ||
} | ||
void ColorPalette::setMagenta(QColor color) | ||
{ | ||
m_magenta = color; | ||
} | ||
void ColorPalette::setCyan(QColor color) | ||
{ | ||
m_cyan = color; | ||
} | ||
void ColorPalette::setWhite(QColor color) | ||
{ | ||
m_white = color; | ||
} | ||
|
||
QColor ColorPalette::getGray() const | ||
{ | ||
return m_gray; | ||
} | ||
QColor ColorPalette::getRed() const | ||
{ | ||
return m_red; | ||
} | ||
QColor ColorPalette::getGreen() const | ||
{ | ||
return m_green; | ||
} | ||
QColor ColorPalette::getYellow() const | ||
{ | ||
return m_yellow; | ||
} | ||
QColor ColorPalette::getBlue() const | ||
{ | ||
return m_blue; | ||
} | ||
QColor ColorPalette::getMagenta() const | ||
{ | ||
return m_magenta; | ||
} | ||
QColor ColorPalette::getCyan() const | ||
{ | ||
return m_cyan; | ||
} | ||
QColor ColorPalette::getWhite() const | ||
{ | ||
return m_white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef COLORPALETTE_HPP | ||
#define COLORPALETTE_HPP | ||
|
||
#include <QColor> | ||
#include <QString> | ||
|
||
class ColorPalette | ||
{ | ||
public: | ||
ColorPalette(); | ||
|
||
void setGray(QColor color); | ||
void setRed(QColor color); | ||
void setGreen(QColor color); | ||
void setYellow(QColor color); | ||
void setBlue(QColor color); | ||
void setMagenta(QColor color); | ||
void setCyan(QColor color); | ||
void setWhite(QColor color); | ||
|
||
QColor getGray() const; | ||
QColor getRed() const; | ||
QColor getGreen() const; | ||
QColor getYellow() const; | ||
QColor getBlue() const; | ||
QColor getMagenta() const; | ||
QColor getCyan() const; | ||
QColor getWhite() const; | ||
|
||
private: | ||
QColor m_gray; | ||
QColor m_red; | ||
QColor m_green; | ||
QColor m_yellow; | ||
QColor m_blue; | ||
QColor m_magenta; | ||
QColor m_cyan; | ||
QColor m_white; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.