Qt 4.8
Functions | Variables
qgtkstyle.cpp File Reference
#include "qgtkstyle.h"
#include <private/qapplication_p.h>
#include <QtCore/QLibrary>
#include <QtCore/QSettings>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QStatusBar>
#include <QtGui/QLineEdit>
#include <QtGui/QWidget>
#include <QtGui/QListView>
#include <QtGui/QApplication>
#include <QtGui/QStyleOption>
#include <QtGui/QPushButton>
#include <QtGui/QPainter>
#include <QtGui/QMainWindow>
#include <QtGui/QToolBar>
#include <QtGui/QHeaderView>
#include <QtGui/QMenuBar>
#include <QtGui/QComboBox>
#include <QtGui/QSpinBox>
#include <QtGui/QScrollBar>
#include <QtGui/QAbstractButton>
#include <QtGui/QToolButton>
#include <QtGui/QGroupBox>
#include <QtGui/QRadioButton>
#include <QtGui/QCheckBox>
#include <QtGui/QTreeView>
#include <QtGui/QStyledItemDelegate>
#include <qpixmapcache.h>
#include <private/qgtkpainter_p.h>
#include <private/qstylehelper_p.h>
#include <private/qgtkstyle_p.h>
#include <private/qcleanlooksstyle_p.h>

Go to the source code of this file.

Functions

static GdkColor fromQColor (const QColor &color)
 
static QColor mergedColors (const QColor &colorA, const QColor &colorB, int factor=50)
 

Variables

static const char *const dock_widget_close_xpm []
 
static const char *const dock_widget_restore_xpm []
 
static const int groupBoxBottomMargin = 2
 
static const int groupBoxTitleMargin = 6
 
static const int groupBoxTopMargin = 2
 

Function Documentation

◆ fromQColor()

static GdkColor fromQColor ( const QColor color)
static

Definition at line 159 of file qgtkstyle.cpp.

Referenced by QGtkStyle::drawPrimitive().

160 {
161  GdkColor retval;
162  retval.red = color.red() * 255;
163  retval.green = color.green() * 255;
164  retval.blue = color.blue() * 255;
165  return retval;
166 }
ushort red
Returns the red color component of this color.
Definition: qcolor.h:243
ushort blue
Returns the blue color component of this color.
Definition: qcolor.h:245
ushort green
Returns the green color component of this color.
Definition: qcolor.h:244

◆ mergedColors()

static QColor mergedColors ( const QColor colorA,
const QColor colorB,
int  factor = 50 
)
static

Definition at line 149 of file qgtkstyle.cpp.

Referenced by QGtkStyle::drawComplexControl(), and QGtkStyle::drawControl().

150 {
151  const int maxFactor = 100;
152  QColor tmp = colorA;
153  tmp.setRed((tmp.red() * factor) / maxFactor + (colorB.red() * (maxFactor - factor)) / maxFactor);
154  tmp.setGreen((tmp.green() * factor) / maxFactor + (colorB.green() * (maxFactor - factor)) / maxFactor);
155  tmp.setBlue((tmp.blue() * factor) / maxFactor + (colorB.blue() * (maxFactor - factor)) / maxFactor);
156  return tmp;
157 }
void setRed(int red)
Sets the red color component of this color to red.
Definition: qcolor.cpp:1143
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
void setGreen(int green)
Sets the green color component of this color to green.
Definition: qcolor.cpp:1170
ushort red
Returns the red color component of this color.
Definition: qcolor.h:243
void setBlue(int blue)
Sets the blue color component of this color to blue.
Definition: qcolor.cpp:1199
ushort blue
Returns the blue color component of this color.
Definition: qcolor.h:245
ushort green
Returns the green color component of this color.
Definition: qcolor.h:244

Variable Documentation

◆ dock_widget_close_xpm

const char* const dock_widget_close_xpm[]
static
Initial value:
=
{
"11 13 5 1",
" c None",
". c #D5CFCB",
"+ c #6C6A67",
"@ c #6C6A67",
"$ c #B5B0AC",
" ",
" @@@@@@@@@ ",
"@+ +@",
"@ +@ @+ @",
"@ @@@ @@@ @",
"@ @@@@@ @",
"@ @@@ @",
"@ @@@@@ @",
"@ @@@ @@@ @",
"@ +@ @+ @",
"@+ +@",
" @@@@@@@@@ ",
" "
}

Definition at line 81 of file qgtkstyle.cpp.

Referenced by QGtkStyle::standardPixmap().

◆ dock_widget_restore_xpm

const char* const dock_widget_restore_xpm[]
static
Initial value:
=
{
"11 13 5 1",
" c None",
". c #D5CFCB",
"+ c #6C6A67",
"@ c #6C6A67",
"# c #6C6A67",
" ",
" @@@@@@@@@ ",
"@+ +@",
"@ #@@@# @",
"@ @ @ @",
"@ #@@@# @ @",
"@ @ @ @ @",
"@ @ @@@ @",
"@ @ @ @",
"@ #@@@@ @",
"@+ +@",
" @@@@@@@@@ ",
" "
}

Definition at line 104 of file qgtkstyle.cpp.

Referenced by QGtkStyle::standardPixmap().

◆ groupBoxBottomMargin

const int groupBoxBottomMargin = 2
static

Definition at line 127 of file qgtkstyle.cpp.

Referenced by QGtkStyle::sizeFromContents(), and QGtkStyle::subControlRect().

◆ groupBoxTitleMargin

const int groupBoxTitleMargin = 6
static

Definition at line 128 of file qgtkstyle.cpp.

Referenced by QGtkStyle::sizeFromContents(), and QGtkStyle::subControlRect().

◆ groupBoxTopMargin

const int groupBoxTopMargin = 2
static

Definition at line 129 of file qgtkstyle.cpp.

Referenced by QGtkStyle::sizeFromContents(), and QGtkStyle::subControlRect().