blob: 3201e37bd7bdef6436cdddbefe55521f0d732c67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
/*
Copyright (C) 2007 Eike Hein <hein@kde.org>
*/
#include "translucent_widget.h"
#include "translucent_widget.moc"
#include <krootpixmap.h>
TranslucentWidget::TranslucentWidget(TQWidget* parent, const char* name, bool translucency) : TQWidget(parent, name)
{
use_translucency = translucency;
root_pixmap = NULL;
if (use_translucency)
{
root_pixmap = new KRootPixmap(this);
root_pixmap->start();
}
}
TranslucentWidget::~TranslucentWidget()
{
if (root_pixmap) delete root_pixmap;
}
void TranslucentWidget::slotUpdateBackground()
{
// This is wired up to KApplication::backgroundChanged and needed
// to kick KRootPixmap into updating the background again, which
// it likes to forget after having been moved off-screen.
if (root_pixmap) root_pixmap->tqrepaint(true);
}
|