WebButtonMaximize.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "WebButtonMaximize.h"
00023
00024 namespace Web {
00025
00026 static unsigned char maximize_bits[] =
00027 {
00028 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00
00029 };
00030
00031 static unsigned char unmaximize_bits[] =
00032 {
00033 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f
00034 };
00035
00036 WebButtonMaximize::WebButtonMaximize(bool max, QWidget * parent, WebClient* deco)
00037 : WebButton(parent, i18n("Maximize"), deco)
00038 {
00039 QBitmap b(8, 8, max ? unmaximize_bits : maximize_bits, true );
00040 b.setMask(b);
00041 setBitmap(b);
00042 }
00043
00044 void
00045 WebButtonMaximize::slotMaximizeChange(bool max)
00046 {
00047 QBitmap b(8, 8, max ? unmaximize_bits : maximize_bits, true );
00048 b.setMask(b);
00049 setBitmap(b);
00050 setTipText(max ? i18n("Restore") : i18n("Maximize"));
00051 }
00052
00053 void
00054 WebButtonMaximize::clickEvent(int button)
00055 {
00056 emit(maximize(button));
00057 }
00058
00059 }
00060
00061 #include "WebButtonMaximize.moc"
00062
This file is part of the documentation for kwin Library Version 3.2.2.