WebButtonSticky.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "WebButtonSticky.h"
00023
00024 namespace Web {
00025
00026 static unsigned char sticky_bits[] =
00027 {
00028 0x20, 0x70, 0xfa, 0x7e, 0x3c, 0x1c, 0x32, 0x01
00029 };
00030
00031 static unsigned char unsticky_bits[] =
00032 {
00033 0x1c, 0x1c, 0x1c, 0x3e, 0x7f, 0x08, 0x08, 0x08
00034 };
00035
00036 WebButtonSticky::WebButtonSticky(bool sticky, QWidget * parent, WebClient* deco)
00037 : WebButton(parent, sticky?i18n("Not on all desktops"):i18n("On all desktops"), deco)
00038 {
00039 QBitmap b(8, 8, sticky ? unsticky_bits : sticky_bits, true );
00040 b.setMask(b);
00041 setBitmap(b);
00042 }
00043
00044 void
00045 WebButtonSticky::slotOnAllDesktopsChange(bool sticky)
00046 {
00047 QBitmap b(8, 8, sticky ? unsticky_bits : sticky_bits, true );
00048 b.setMask(b);
00049 setBitmap(b);
00050 setTipText(sticky ? i18n("Not on all desktops") : i18n("On all desktops"));
00051 }
00052
00053 void
00054 WebButtonSticky::clickEvent(int )
00055 {
00056 emit(toggleSticky());
00057 }
00058
00059 }
00060
00061 #include "WebButtonSticky.moc"
00062
This file is part of the documentation for kwin Library Version 3.4.3.