kcheckaccelerators.h Source File (kdecore Library)

| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kcheckaccelerators.h

    00001 /* This file is part of the KDE libraries
    00002     Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
    00003     Copyright (C) 1998, 1999, 2000 KDE Team
    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 // $Id: kcheckaccelerators.h,v 1.3 2002/10/02 17:27:46 tjansen Exp $
    00022
    00023 #ifndef KCHECKACCELERATORS_H_
    00024 #define KCHECKACCELERATORS_H_
    00025
    00026 #include <qobject.h>
    00027 #include <qkeysequence.h>
    00028 #include <qmap.h>
    00029 #include <qstring.h>
    00030 #include <qtimer.h>
    00031
    00032 class QMenuData;
    00033
    00064 class KCheckAccelerators : public QObject
    00065 {
    00066     Q_OBJECT
    00067     public:
    00072         KCheckAccelerators( QObject* parent );
    00076         bool eventFilter( QObject * , QEvent * e);
    00077     private:
    00078         void checkAccelerators( bool automatic );
    00079         struct AccelInfo {
    00080             QString item;
    00081             QString string;
    00082         };
    00083         typedef QValueList<AccelInfo> AccelInfoList;
    00084         typedef QMap<QChar, AccelInfoList> AccelMap;
    00085         void findAccel( const QString& item, const QString &txt, AccelMap &accels );
    00086         void checkMenuData( const QString& prefix, QMenuData* m );
    00087         void checkMenuData( QMenuData* m );
    00088         QKeySequence key;
    00089         bool alwaysShow;
    00090         bool autoCheck;
    00091         bool block;
    00092         QMap<QString, AccelMap> menuAccels;
    00093         QTimer autoCheckTimer;
    00094     private slots:
    00095         void autoCheckSlot();
    00096 };
    00097
    00098 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:20 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001