kdeui Library API Documentation

khelpmenu.h

00001 /*
00002  * This file is part of the KDE Libraries
00003  * Copyright (C) 1999-2000 Espen Sand (espen@kde.org)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library 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 GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
00019  *
00020  */
00021 
00022 #ifndef _KHELPMENU_H_
00023 #define _KHELPMENU_H_
00024 
00025 #include <qobject.h>
00026 #include <qstring.h>
00027 
00028 class KActionCollection;
00029 class KPopupMenu;
00030 class QWidget;
00031 
00032 class KAboutData;
00033 class KAboutKDE;
00034 class KBugReport;
00035 class KDialogBase;
00036 class KHelpMenuPrivate;
00037 
00038 
00129 class KHelpMenu : public QObject
00130 {
00131   Q_OBJECT
00132 
00133   public:
00134     enum MenuId
00135     {
00136       menuHelpContents = 0,
00137       menuWhatsThis = 1,
00138       menuAboutApp = 2,
00139       menuAboutKDE = 3,
00140       menuReportBug = 4
00141     };
00142 
00156     KHelpMenu( QWidget *parent=0, const QString &aboutAppText=QString::null,
00157            bool showWhatsThis=true );
00158 
00175     KHelpMenu( QWidget *parent, const KAboutData *aboutData,
00176            bool showWhatsThis=true, KActionCollection *actions = 0 );
00177 
00183     ~KHelpMenu();
00184 
00192     KPopupMenu *menu();
00193 
00194   public slots:
00200     void appHelpActivated();
00201 
00205     void contextHelpActivated();
00206 
00212     void aboutApplication();
00213 
00217     void aboutKDE();
00218 
00222     void reportBug();
00223 
00224   private slots:
00230     void menuDestroyed();
00231 
00236     void dialogFinished();
00237 
00243     void timerExpired();
00244 
00245   signals:
00253     void showAboutApplication();
00254 
00255   private:
00256     KPopupMenu   *mMenu;
00257     KDialogBase  *mAboutApp;
00258     KAboutKDE    *mAboutKDE;
00259     KBugReport   *mBugReport;
00260 
00261     QString      mAboutAppText;
00262     QWidget      *mParent;
00263 
00264     bool         mShowWhatsThis;
00265 
00266   protected:
00267     virtual void virtual_hook( int id, void* data );
00268   private:
00269     KHelpMenuPrivate *d;
00270 };
00271 
00272 
00273 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun May 16 22:02:03 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003