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., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  *
00020  */
00021 
00022 #ifndef _KHELPMENU_H_
00023 #define _KHELPMENU_H_
00024 
00025 #include <qobject.h>
00026 #include <qstring.h>
00027 
00028 #include <kdelibs_export.h>
00029 
00030 class KActionCollection;
00031 class KPopupMenu;
00032 class QWidget;
00033 
00034 class KAboutData;
00035 class KAboutKDE;
00036 class KBugReport;
00037 class KDialogBase;
00038 class KHelpMenuPrivate;
00039 
00040 
00131 class KDEUI_EXPORT KHelpMenu : public QObject
00132 {
00133   Q_OBJECT
00134 
00135   public:
00136     enum MenuId
00137     {
00138       menuHelpContents = 0,
00139       menuWhatsThis = 1,
00140       menuAboutApp = 2,
00141       menuAboutKDE = 3,
00142       menuReportBug = 4,
00143       menuSwitchLanguage = 5
00144     };
00145 
00159     KHelpMenu( QWidget *parent=0, const QString &aboutAppText=QString::null,
00160            bool showWhatsThis=true );
00161 
00178     KHelpMenu( QWidget *parent, const KAboutData *aboutData,
00179            bool showWhatsThis=true, KActionCollection *actions = 0 );
00180 
00186     ~KHelpMenu();
00187 
00195     KPopupMenu *menu();
00196 
00197   public slots:
00203     void appHelpActivated();
00204 
00208     void contextHelpActivated();
00209 
00215     void aboutApplication();
00216 
00220     void aboutKDE();
00221 
00222     void kubuntuTranslate();
00223     void kubuntuGetHelpOnline();
00224 
00228     void reportBug();
00229     
00233     void switchApplicationLanguage();
00234 
00235   private slots:
00241     void menuDestroyed();
00242 
00247     void dialogFinished();
00248 
00254     void timerExpired();
00255 
00256   signals:
00264     void showAboutApplication();
00265 
00266   private:
00267     KPopupMenu   *mMenu;
00268     KDialogBase  *mAboutApp;
00269     KAboutKDE    *mAboutKDE;
00270     KBugReport   *mBugReport;
00271 
00272     QString      mAboutAppText;
00273     QWidget      *mParent;
00274 
00275     bool         mShowWhatsThis;
00276 
00277   protected:
00278     virtual void virtual_hook( int id, void* data );
00279   private:
00280     KHelpMenuPrivate *d;
00281 };
00282 
00283 
00284 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys