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 
00169     KHelpMenu( QWidget *parent, const KAboutData *aboutData,
00170            bool showWhatsThis=true, KActionCollection *actions = 0 );
00171 
00177     ~KHelpMenu();
00178 
00186     KPopupMenu *menu();
00187 
00188   public slots:
00194     void appHelpActivated();
00195 
00199     void contextHelpActivated();
00200 
00206     void aboutApplication();
00207 
00211     void aboutKDE();
00212 
00216     void reportBug();
00217 
00218   private slots:
00224     void menuDestroyed();
00225 
00230     void dialogFinished();
00231 
00237     void timerExpired();
00238 
00239   signals:
00247     void showAboutApplication();
00248 
00249   private:
00250     KPopupMenu   *mMenu;
00251     KDialogBase  *mAboutApp;
00252     KAboutKDE    *mAboutKDE;
00253     KBugReport   *mBugReport;
00254 
00255     QString      mAboutAppText;
00256     QWidget      *mParent;
00257 
00258     bool         mShowWhatsThis;
00259 
00260   protected:
00261     virtual void virtual_hook( int id, void* data );
00262   private:
00263     KHelpMenuPrivate *d;
00264 };
00265 
00266 
00267 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:15:03 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001