#include "qmotifstyle.h"
#include "qcdestyle.h"
#include "qmenu.h"
#include "qapplication.h"
#include "qpainter.h"
#include "qdrawutil.h"
#include "qpixmap.h"
#include "qpalette.h"
#include "qwidget.h"
#include "qpushbutton.h"
#include "qscrollbar.h"
#include "qtabbar.h"
#include "qtabwidget.h"
#include "qlistview.h"
#include "qsplitter.h"
#include "qslider.h"
#include "qcombobox.h"
#include "qlineedit.h"
#include "qprogressbar.h"
#include "qimage.h"
#include "qfocusframe.h"
#include "qdebug.h"
#include "qpainterpath.h"
#include "qmotifstyle_p.h"
#include "qdialogbuttonbox.h"
#include <limits.h>
#include "qx11info_x11.h"
Include dependency graph for qmotifstyle.cpp:

Go to the source code of this file.
Defines | |
| #define | INTARRLEN(x) sizeof(x)/(sizeof(int)*2) |
| #define | CMID *cols[(colspec>>12) & 0xf] |
| #define | CLEFT *cols[(colspec>>8) & 0xf] |
| #define | CTOP *cols[(colspec>>4) & 0xf] |
| #define | CBOT *cols[colspec & 0xf] |
Functions | |
| static void | rot (QPolygon &a, int n) |
| static int | get_combo_extra_width (int h, int w, int *return_awh=0) |
| static void | get_combo_parameters (const QRect &r, int &ew, int &awh, int &ax, int &ay, int &sh, int &dh, int &sy) |
Variables | |
| static const int | motifItemFrame = 2 |
| static const int | motifSepHeight = 2 |
| static const int | motifItemHMargin = 3 |
| static const int | motifItemVMargin = 2 |
| static const int | motifArrowHMargin = 6 |
| static const int | motifTabSpacing = 12 |
| static const int | motifCheckMarkHMargin = 2 |
| static const int | motifCheckMarkSpace = 16 |
| static const char *const | qt_menu_xpm [] |
| static const char *const | qt_close_xpm [] |
| static const char *const | qt_maximize_xpm [] |
| static const char *const | qt_minimize_xpm [] |
| static const char *const | qt_normalizeup_xpm [] |
| static const char *const | qt_shade_xpm [] |
| static const char *const | qt_unshade_xpm [] |
| static const char * | dock_window_close_xpm [] |
| static const char *const | information_xpm [] |
| static const char *const | warning_xpm [] |
| static const char *const | critical_xpm [] |
| static const char *const | question_xpm [] |
| #define CBOT *cols[colspec & 0xf] |
Referenced by QMotifStyle::drawPrimitive().
| #define CLEFT *cols[(colspec>>8) & 0xf] |
Referenced by QMotifStyle::drawPrimitive().
| #define CMID *cols[(colspec>>12) & 0xf] |
| #define CTOP *cols[(colspec>>4) & 0xf] |
Referenced by QMotifStyle::drawPrimitive().
| #define INTARRLEN | ( | x | ) | sizeof(x)/(sizeof(int)*2) |
| static int get_combo_extra_width | ( | int | h, | |
| int | w, | |||
| int * | return_awh = 0 | |||
| ) | [static] |
Definition at line 1356 of file qmotifstyle.cpp.
Referenced by get_combo_parameters(), and QMotifStyle::subControlRect().
01357 { 01358 int awh, 01359 tmp; 01360 if (h < 8) { 01361 awh = 6; 01362 } else if (h < 14) { 01363 awh = h - 2; 01364 } else { 01365 awh = h/2; 01366 } 01367 tmp = (awh * 3) / 2; 01368 if (tmp > w / 2) { 01369 awh = w / 2 - 3; 01370 tmp = w / 2 + 3; 01371 } 01372 01373 if (return_awh) 01374 *return_awh = awh; 01375 01376 return tmp; 01377 }
| static void get_combo_parameters | ( | const QRect & | r, | |
| int & | ew, | |||
| int & | awh, | |||
| int & | ax, | |||
| int & | ay, | |||
| int & | sh, | |||
| int & | dh, | |||
| int & | sy | |||
| ) | [static] |
Definition at line 1379 of file qmotifstyle.cpp.
References get_combo_extra_width(), QRect::height(), QRect::width(), QRect::x(), and QRect::y().
Referenced by QMotifStyle::drawComplexControl(), QMotifStyle::subControlRect(), and QMotifStyle::subElementRect().
01383 { 01384 ew = get_combo_extra_width(r.height(), r.width(), &awh); 01385 01386 sh = (awh+3)/4; 01387 if (sh < 3) 01388 sh = 3; 01389 dh = sh/2 + 1; 01390 01391 ay = r.y() + (r.height()-awh-sh-dh)/2; 01392 if (ay < 0) { 01393 //panic mode 01394 ay = 0; 01395 sy = r.height(); 01396 } else { 01397 sy = ay+awh+dh; 01398 } 01399 ax = r.x() + r.width() - ew; 01400 ax += (ew-awh)/2; 01401 }
Here is the call graph for this function:

| static void rot | ( | QPolygon & | a, | |
| int | n | |||
| ) | [static] |
Definition at line 305 of file qmotifstyle.cpp.
References a, i, int, x, and y.
Referenced by Q3SVGPaintEnginePrivate::applyTransform(), QVFb::configure(), QMotifStyle::drawPrimitive(), QVFb::init(), and PathStrokeRenderer::initializePoints().
00306 { 00307 QPolygon r(a.size()); 00308 for (int i = 0; i < (int)a.size(); i++) { 00309 switch (n) { 00310 case 1: r.setPoint(i,-a[i].y(),a[i].x()); break; 00311 case 2: r.setPoint(i,-a[i].x(),-a[i].y()); break; 00312 case 3: r.setPoint(i,a[i].y(),-a[i].x()); break; 00313 } 00314 } 00315 a = r; 00316 }
const char* const critical_xpm[] [static] |
Definition at line 2389 of file qmotifstyle.cpp.
const char* dock_window_close_xpm[] [static] |
Initial value:
{
"8 8 2 1",
"# c #000000",
". c None",
"##....##",
".##..##.",
"..####..",
"...##...",
"..####..",
".##..##.",
"##....##",
"........"}
Definition at line 2291 of file qmotifstyle.cpp.
const char* const information_xpm[] [static] |
Definition at line 2310 of file qmotifstyle.cpp.
const int motifArrowHMargin = 6 [static] |
Definition at line 63 of file qmotifstyle.cpp.
Referenced by QMotifStyle::drawControl(), and QMotifStyle::sizeFromContents().
const int motifCheckMarkHMargin = 2 [static] |
const int motifCheckMarkSpace = 16 [static] |
Definition at line 66 of file qmotifstyle.cpp.
Referenced by QMotifStyle::drawControl(), and QMotifStyle::sizeFromContents().
const int motifItemFrame = 2 [static] |
Definition at line 59 of file qmotifstyle.cpp.
Referenced by QMotifStyle::drawControl(), QMotifStyle::sizeFromContents(), and QMotifStyle::subElementRect().
const int motifItemHMargin = 3 [static] |
Definition at line 61 of file qmotifstyle.cpp.
Referenced by QMotifStyle::drawControl(), and QMotifStyle::sizeFromContents().
const int motifItemVMargin = 2 [static] |
Definition at line 62 of file qmotifstyle.cpp.
Referenced by QMotifStyle::drawControl(), and QMotifStyle::sizeFromContents().
const int motifSepHeight = 2 [static] |
const int motifTabSpacing = 12 [static] |
const char* const qt_close_xpm[] [static] |
Initial value:
{
"12 12 2 1",
" s None c None",
". c black",
" ",
" ",
" . . ",
" ... ... ",
" ...... ",
" .... ",
" .... ",
" ...... ",
" ... ... ",
" . . ",
" ",
" "}
Definition at line 2169 of file qmotifstyle.cpp.
const char* const qt_maximize_xpm[] [static] |
Initial value:
{
"12 12 2 1",
" s None c None",
". c black",
" ",
" ",
" ",
" . ",
" ... ",
" ..... ",
" ....... ",
" ......... ",
" ",
" ",
" ",
" "}
Definition at line 2186 of file qmotifstyle.cpp.
const char* const qt_menu_xpm[] [static] |
Initial value:
{
"16 16 11 1",
" c #000000",
", c #336600",
". c #99CC00",
"X c #666600",
"o c #999933",
"+ c #333300",
"@ c #669900",
"# c #999900",
"$ c #336633",
"% c #666633",
"& c #99CC33",
"................",
"................",
".....#,++X#.....",
"....X X....",
"...X Xo#% X&..",
"..# o..&@o o..",
".., X..#+ @X X..",
"..+ o.o+ +o# +..",
"..+ #o+ +## +..",
".., %@ ++ +, X..",
"..# o@oo+ #..",
"...X X##$ o..",
"....X X..",
"....&oX++X#oX...",
"................",
"................"}
Definition at line 2138 of file qmotifstyle.cpp.
const char* const qt_minimize_xpm[] [static] |
Initial value:
{
"12 12 2 1",
" s None c None",
". c black",
" ",
" ",
" ",
" ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . ",
" ",
" ",
" "}
Definition at line 2203 of file qmotifstyle.cpp.
const char* const qt_normalizeup_xpm[] [static] |
Initial value:
{
"12 12 2 1",
" s None c None",
". c black",
" ",
" ",
" ",
" ....... ",
" ...... ",
" ..... ",
" .... ",
" ... ",
" .. ",
" . ",
" ",
" "}
Definition at line 2239 of file qmotifstyle.cpp.
const char* const qt_shade_xpm[] [static] |
Initial value:
{
"12 12 2 1", "# c #000000",
". c None",
"............",
"............",
".#########..",
".#########..",
"............",
"............",
"............",
"............",
"............",
"............",
"............",
"............"}
Definition at line 2256 of file qmotifstyle.cpp.
const char* const qt_unshade_xpm[] [static] |
Initial value:
{
"12 12 2 1",
"# c #000000",
". c None",
"............",
"............",
".#########..",
".#########..",
".#.......#..",
".#.......#..",
".#.......#..",
".#.......#..",
".#.......#..",
".#########..",
"............",
"............"}
Definition at line 2273 of file qmotifstyle.cpp.
const char* const question_xpm[] [static] |
Definition at line 2428 of file qmotifstyle.cpp.
const char* const warning_xpm[] [static] |
Definition at line 2350 of file qmotifstyle.cpp.
1.5.1