#include "colorswatch.h"
#include <QAction>
#include <QtEvents>
#include <QFrame>
#include <QMainWindow>
#include <QMenu>
#include <QPainter>
#include <QImage>
#include <QColor>
#include <QDialog>
#include <QGridLayout>
#include <QSpinBox>
#include <QLabel>
#include <QPainterPath>
#include <QPushButton>
#include <QHBoxLayout>
#include <QtDebug>
#include "colorswatch.moc"
Include dependency graph for colorswatch.cpp:

Go to the source code of this file.
Classes | |
| class | ColorDock |
Functions | |
| QColor | bgColorForName (const QString &name) |
| QColor | fgColorForName (const QString &name) |
| static QSpinBox * | createSpinBox (int value, QWidget *parent, int max=1000) |
Definition at line 45 of file colorswatch.cpp.
References name.
Referenced by ColorDock::paintEvent().
00046 { 00047 if (name == "Black") 00048 return QColor("#D8D8D8"); 00049 else if (name == "White") 00050 return QColor("#F1F1F1"); 00051 else if (name == "Red") 00052 return QColor("#F1D8D8"); 00053 else if (name == "Green") 00054 return QColor("#D8E4D8"); 00055 else if (name == "Blue") 00056 return QColor("#D8D8F1"); 00057 else if (name == "Yellow") 00058 return QColor("#F1F0D8"); 00059 return QColor(name).light(110); 00060 }
Definition at line 156 of file colorswatch.cpp.
References QSpinBox::setMaximum(), QSpinBox::setMinimum(), and QSpinBox::setValue().
Referenced by ColorDock::changeSizeHints().
00157 { 00158 QSpinBox *result = new QSpinBox(parent); 00159 result->setMinimum(-1); 00160 result->setMaximum(max); 00161 result->setValue(value); 00162 return result; 00163 }
Here is the call graph for this function:

Definition at line 62 of file colorswatch.cpp.
References name.
Referenced by ColorDock::paintEvent().
00063 { 00064 if (name == "Black") 00065 return QColor("#6C6C6C"); 00066 else if (name == "White") 00067 return QColor("#F8F8F8"); 00068 else if (name == "Red") 00069 return QColor("#F86C6C"); 00070 else if (name == "Green") 00071 return QColor("#6CB26C"); 00072 else if (name == "Blue") 00073 return QColor("#6C6CF8"); 00074 else if (name == "Yellow") 00075 return QColor("#F8F76C"); 00076 return QColor(name); 00077 }
1.5.1