• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDEUI

kdualaction.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002  *
00003  * Copyright (c) 2010 Aurélien Gâteau <agateau@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 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  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301  USA
00019  */
00020 #ifndef KDUALACTION_H
00021 #define KDUALACTION_H
00022 
00023 #include <kdeui_export.h>
00024 #include <kaction.h>
00025 
00026 class KDualActionPrivate;
00027 
00058 class KDEUI_EXPORT KDualAction : public KAction
00059 {
00060     Q_OBJECT
00061 public:
00066     explicit KDualAction(QObject *parent);
00067 
00071     KDualAction(const QString &inactiveText, const QString &activeText, QObject *parent);
00072 
00073     ~KDualAction();
00074 
00078     void setActiveGuiItem(const KGuiItem &);
00079 
00083     KGuiItem activeGuiItem() const;
00084 
00088     void setInactiveGuiItem(const KGuiItem &);
00089 
00093     KGuiItem inactiveGuiItem() const;
00094 
00098     void setActiveIcon(const QIcon &);
00099 
00103     QIcon activeIcon() const;
00104 
00108     void setInactiveIcon(const QIcon &);
00109 
00113     QIcon inactiveIcon() const;
00114 
00118     void setActiveText(const QString &);
00119 
00123     QString activeText() const;
00124 
00128     void setInactiveText(const QString &);
00129 
00133     QString inactiveText() const;
00134 
00138     void setActiveToolTip(const QString &);
00139 
00143     QString activeToolTip() const;
00144 
00148     void setInactiveToolTip(const QString &);
00149 
00153     QString inactiveToolTip() const;
00154 
00158     void setIconForStates(const QIcon &icon);
00159 
00164     bool isActive() const;
00165 
00170     void setAutoToggle(bool);
00171 
00176     bool autoToggle() const;
00177 
00178 public Q_SLOTS:
00183     void setActive(bool state);
00184 
00185 Q_SIGNALS:
00190     void activeChanged(bool);
00191 
00196     void activeChangedByUser(bool);
00197 
00198 private:
00199     Q_PRIVATE_SLOT(d, void slotTriggered())
00200     KDualActionPrivate *const d;
00201     friend class KDualActionPrivate;
00202 };
00203 
00204 #endif /* KDUALACTION_H */

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal