libkdepim

overlaywidget.h
00001 /* -*- c++ -*-
00002  * overlaywidget.h
00003  *
00004  *  Copyright (c) 2004 David Faure <faure@kde.org>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  *
00019  *  In addition, as a special exception, the copyright holders give
00020  *  permission to link the code of this program with any edition of
00021  *  the TQt library by Trolltech AS, Norway (or with modified versions
00022  *  of TQt that use the same license as TQt), and distribute linked
00023  *  combinations including the two.  You must obey the GNU General
00024  *  Public License in all respects for all of the code used other than
00025  *  TQt.  If you modify this file, you may extend this exception to
00026  *  your version of the file, but you are not obligated to do so.  If
00027  *  you do not wish to do so, delete this exception statement from
00028  *  your version.
00029  */
00030 #ifndef OVERLAYWIDGET_H
00031 #define OVERLAYWIDGET_H
00032 
00033 #include <tqhbox.h>
00034 
00035 namespace KPIM {
00036 
00044 class OverlayWidget : public TQHBox
00045 {
00046   Q_OBJECT
00047   TQ_OBJECT
00048 
00049 public:
00050   OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
00051   ~OverlayWidget();
00052 
00053   TQWidget * alignWidget() { return mAlignWidget; }
00054   void setAlignWidget( TQWidget * alignWidget );
00055 
00056 protected:
00057   void resizeEvent( TQResizeEvent* ev );
00058   bool eventFilter( TQObject* o, TQEvent* e);
00059 
00060 private:
00061   void reposition();
00062 
00063 private:
00064   TQWidget * mAlignWidget;
00065 };
00066 
00067 } // namespace
00068 
00069 #endif /* OVERLAYWIDGET_H */
00070