Back to index

kdeartwork  4.3.2
Classes | Enumerations | Functions | Variables
KDE1 Namespace Reference

Classes

class  StdClient
class  StdToolClient
class  ThreeButtonButton
class  StdFactory

Enumerations

enum  ButtonType {
  ButtonMenu = 0, ButtonSticky, ButtonMinimize, ButtonMaximize,
  ButtonClose, ButtonHelp, ButtonTypeCount
}

Functions

const KDecorationOptions * options ()
void create_pixmaps ()
void delete_pixmaps ()
void drawGradient (QPainter &p, const QRect &t, const QColor &c1, const QColor &c2)

Variables

QPixmap * close_pix = 0
QPixmap * maximize_pix = 0
QPixmap * minimize_pix = 0
QPixmap * normalize_pix = 0
QPixmap * pinup_pix = 0
QPixmap * pindown_pix = 0
QPixmap * menu_pix = 0
QPixmap * question_mark_pix = 0
QPixmap * dis_close_pix = 0
QPixmap * dis_maximize_pix = 0
QPixmap * dis_minimize_pix = 0
QPixmap * dis_normalize_pix = 0
QPixmap * dis_pinup_pix = 0
QPixmap * dis_pindown_pix = 0
QPixmap * dis_menu_pix = 0
QPixmap * dis_question_mark_pix = 0
QPixmap * titleBuffer = 0
bool pixmaps_created = FALSE
const int SUPPORTED_WINDOW_TYPES_MASK

Enumeration Type Documentation

Enumerator:
ButtonMenu 
ButtonSticky 
ButtonMinimize 
ButtonMaximize 
ButtonClose 
ButtonHelp 
ButtonTypeCount 

Definition at line 36 of file kde1client.h.


Function Documentation

Definition at line 71 of file kde1client.cpp.

{
    if ( pixmaps_created )
        return;
    pixmaps_created = true;
    QColorGroup aGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, true);
    QColorGroup iGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, false);

    QPainter aPainter, iPainter;
    close_pix = new QPixmap(16, 16);
    dis_close_pix = new QPixmap(16, 16);
    aPainter.begin(close_pix); iPainter.begin(dis_close_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, close_white_bits,
                  NULL, NULL, close_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, close_white_bits,
                  NULL, NULL, close_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    close_pix->setMask(QBitmap(16, 16, close_mask_bits, true));
    dis_close_pix->setMask(*close_pix->mask());

    minimize_pix = new QPixmap(16, 16);
    dis_minimize_pix = new QPixmap(16, 16);
    aPainter.begin(minimize_pix); iPainter.begin(dis_minimize_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, iconify_white_bits,
                  NULL, NULL, iconify_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, iconify_white_bits,
                  NULL, NULL, iconify_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    minimize_pix->setMask(QBitmap(16, 16, iconify_mask_bits, true));
    dis_minimize_pix->setMask(*minimize_pix->mask());

    maximize_pix = new QPixmap(16, 16);
    dis_maximize_pix = new QPixmap(16, 16);
    aPainter.begin(maximize_pix); iPainter.begin(dis_maximize_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, maximize_white_bits,
                  NULL, NULL, maximize_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, maximize_white_bits,
                  NULL, NULL, maximize_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    maximize_pix->setMask(QBitmap(16, 16, maximize_mask_bits, true));
    dis_maximize_pix->setMask(*maximize_pix->mask());

    normalize_pix = new QPixmap(16, 16);
    dis_normalize_pix = new QPixmap(16, 16);
    aPainter.begin(normalize_pix); iPainter.begin(dis_normalize_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, maximizedown_white_bits,
                  NULL, NULL, maximizedown_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, maximizedown_white_bits,
                  NULL, NULL, maximizedown_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    normalize_pix->setMask(QBitmap(16, 16, maximizedown_mask_bits, true));
    dis_normalize_pix->setMask(*normalize_pix->mask());

    menu_pix = new QPixmap(16, 16);
    dis_menu_pix = new QPixmap(16, 16);
    aPainter.begin(menu_pix); iPainter.begin(dis_menu_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, menu_white_bits,
                  NULL, NULL, menu_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, menu_white_bits,
                  NULL, NULL, menu_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    menu_pix->setMask(QBitmap(16, 16, menu_mask_bits, true));
    dis_menu_pix->setMask(*menu_pix->mask());

    pinup_pix = new QPixmap(16, 16);
    dis_pinup_pix = new QPixmap(16, 16);
    aPainter.begin(pinup_pix); iPainter.begin(dis_pinup_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, pinup_white_bits,
                  pinup_gray_bits, NULL, pinup_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, pinup_white_bits,
                  pinup_gray_bits, NULL, pinup_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    pinup_pix->setMask(QBitmap(16, 16, pinup_mask_bits, true));
    dis_pinup_pix->setMask(*pinup_pix->mask());

    pindown_pix = new QPixmap(16, 16);
    dis_pindown_pix = new QPixmap(16, 16);
    aPainter.begin(pindown_pix); iPainter.begin(dis_pindown_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, pindown_white_bits,
                  pindown_gray_bits, NULL, pindown_dgray_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, pindown_white_bits,
                  pindown_gray_bits, NULL, pindown_dgray_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    pindown_pix->setMask(QBitmap(16, 16, pindown_mask_bits, true));
    dis_pindown_pix->setMask(*pindown_pix->mask());

    question_mark_pix = new QPixmap(16, 16);
    dis_question_mark_pix = new QPixmap(16, 16);
    aPainter.begin(question_mark_pix); iPainter.begin(dis_question_mark_pix);
    kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, help_light_bits,
                  NULL, NULL, help_dark_bits, NULL, NULL);
    kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, help_light_bits,
                  NULL, NULL, help_dark_bits, NULL, NULL);
    aPainter.end(); iPainter.end();
    question_mark_pix->setMask(QBitmap(16, 16, help_mask_bits, true));
    dis_question_mark_pix->setMask(*question_mark_pix->mask());

    titleBuffer = new KPixmap;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 171 of file kde1client.cpp.

{
    delete close_pix;
    delete maximize_pix;
    delete minimize_pix;
    delete normalize_pix;
    delete pinup_pix;
    delete pindown_pix;
    delete menu_pix;
    delete question_mark_pix;
    delete dis_close_pix;
    delete dis_maximize_pix;
    delete dis_minimize_pix;
    delete dis_normalize_pix;
    delete dis_pinup_pix;
    delete dis_pindown_pix;
    delete dis_menu_pix;
    delete dis_question_mark_pix;
    delete titleBuffer;
    pixmaps_created = false;
}

Here is the caller graph for this function:

void KDE1::drawGradient ( QPainter &  p,
const QRect &  t,
const QColor &  c1,
const QColor &  c2 
)

Definition at line 194 of file kde1client.cpp.

{
  // Don't draw a million vertical lines if we don't need to.

  if (c1 == c2  || QPixmap::defaultDepth() <= 8)
  {
    p.fillRect(t, c1);
    return;
  }

  // rikkus: Adapted from KPixmapEffect::gradient().

  int rca = c1.red();
  int gca = c1.green();
  int bca = c1.blue();

  int rDiff = c2.red()   - rca;
  int gDiff = c2.green() - gca;
  int bDiff = c2.blue()  - bca;

  int rl = rca << 16;
  int gl = gca << 16;
  int bl = bca << 16;

  int rcdelta = ((1 << 16) / t.width()) * rDiff;
  int gcdelta = ((1 << 16) / t.width()) * gDiff;
  int bcdelta = ((1 << 16) / t.width()) * bDiff;

  for (int x = 0; x < t.width(); x++)
  {
    rl += rcdelta;
    gl += gcdelta;
    bl += bcdelta;

    p.setPen(QColor(rl >> 16, gl >> 16, bl >> 16));

    p.drawLine(t.x() + x, 0, t.x() + x, t.y() + t.height() - 1);
  }
}

Here is the caller graph for this function:

const KDecorationOptions* KDE1::options ( ) [inline]

Definition at line 69 of file kde1client.cpp.

{ return KDecoration::options(); }

Here is the caller graph for this function:


Variable Documentation

QPixmap* KDE1::close_pix = 0

Definition at line 47 of file kde1client.cpp.

QPixmap* KDE1::dis_close_pix = 0

Definition at line 56 of file kde1client.cpp.

QPixmap* KDE1::dis_maximize_pix = 0

Definition at line 57 of file kde1client.cpp.

QPixmap* KDE1::dis_menu_pix = 0

Definition at line 62 of file kde1client.cpp.

QPixmap* KDE1::dis_minimize_pix = 0

Definition at line 58 of file kde1client.cpp.

Definition at line 59 of file kde1client.cpp.

QPixmap* KDE1::dis_pindown_pix = 0

Definition at line 61 of file kde1client.cpp.

QPixmap* KDE1::dis_pinup_pix = 0

Definition at line 60 of file kde1client.cpp.

Definition at line 63 of file kde1client.cpp.

QPixmap* KDE1::maximize_pix = 0

Definition at line 48 of file kde1client.cpp.

QPixmap* KDE1::menu_pix = 0

Definition at line 53 of file kde1client.cpp.

QPixmap* KDE1::minimize_pix = 0

Definition at line 49 of file kde1client.cpp.

QPixmap* KDE1::normalize_pix = 0

Definition at line 50 of file kde1client.cpp.

QPixmap* KDE1::pindown_pix = 0

Definition at line 52 of file kde1client.cpp.

QPixmap* KDE1::pinup_pix = 0

Definition at line 51 of file kde1client.cpp.

bool KDE1::pixmaps_created = FALSE

Definition at line 67 of file kde1client.cpp.

Definition at line 54 of file kde1client.cpp.

Initial value:
 NET::NormalMask | NET::DesktopMask | NET::DockMask
    | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
    | NET::UtilityMask | NET::SplashMask

Definition at line 747 of file kde1client.cpp.

QPixmap* KDE1::titleBuffer = 0

Definition at line 65 of file kde1client.cpp.