not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / plasma / applets / systemtray / protocols / fdo / fdographicswidget.h
blobf0be2afdf437717bf9bd6a802558d9f3e99a7338
1 /***************************************************************************
2 * fdographicswidget.h *
3 * *
4 * Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
20 ***************************************************************************/
22 #ifndef FDOGRAPHICSWIDGET_H
23 #define FDOGRAPHICSWIDGET_H
25 #include <QtGui/QGraphicsWidget>
26 #include <QtGui/QX11EmbedContainer>
29 namespace SystemTray
32 class FdoGraphicsWidget : public QGraphicsWidget
34 Q_OBJECT
36 public:
37 FdoGraphicsWidget(WId winId, QGraphicsWidget *parent = 0);
38 ~FdoGraphicsWidget();
40 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
42 signals:
43 void clientClosed();
45 protected:
46 void showEvent(QShowEvent *event);
47 void hideEvent(QHideEvent *event);
49 private slots:
50 void setupXEmbedDelegate();
51 void handleClientEmbedded();
52 void handleClientClosed();
53 void handleClientError(QX11EmbedContainer::Error);
54 void updateWidgetBackground();
56 private:
57 class Private;
58 Private* const d;
64 #endif