KDEUI
khelpmenu.h
Go to the documentation of this file.
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 <kdeui_export.h> 00026 00027 #include <QtCore/QObject> 00028 #include <QtCore/QString> 00029 00030 class KActionCollection; 00031 class KMenu; 00032 class QWidget; 00033 class QAction; 00034 00035 class KAboutData; 00036 class KHelpMenuPrivate; 00037 00038 00110 class KDEUI_EXPORT KHelpMenu : public QObject 00111 { 00112 Q_OBJECT 00113 00114 public: 00126 explicit KHelpMenu( QWidget *parent=0, const QString &aboutAppText=QString(), 00127 bool showWhatsThis=true ); 00128 00145 KHelpMenu( QWidget *parent, const KAboutData *aboutData, 00146 bool showWhatsThis=true, KActionCollection *actions = 0 ); 00147 00153 ~KHelpMenu(); 00154 00166 KMenu *menu(); 00167 00168 enum MenuId 00169 { 00170 menuHelpContents = 0, 00171 menuWhatsThis = 1, 00172 menuAboutApp = 2, 00173 menuAboutKDE = 3, 00174 menuReportBug = 4, 00175 menuSwitchLanguage = 5 00176 }; 00177 00184 QAction *action( MenuId id ) const; 00185 00186 public Q_SLOTS: 00192 void appHelpActivated(); 00193 00197 void contextHelpActivated(); 00198 00208 void aboutApplication(); 00209 00213 void aboutKDE(); 00214 00218 void reportBug(); 00219 00223 void switchApplicationLanguage(); 00224 00225 private Q_SLOTS: 00231 void menuDestroyed(); 00232 00237 void dialogFinished(); 00238 00244 void timerExpired(); 00245 00246 Q_SIGNALS: 00254 void showAboutApplication(); 00255 00256 private: 00257 KHelpMenuPrivate *const d; 00258 }; 00259 00260 00261 #endif
KDE 4.6 API Reference