File indexing completed on 2024-05-12 16:39:50
0001 /* This file is part of the KDE project 0002 Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at> 0003 Copyright (C) 2004-2009 Jarosław Staniek <staniek@kde.org> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef LIBACTIONWIDGET_H 0022 #define LIBACTIONWIDGET_H 0023 0024 #include "kformdesigner_export.h" 0025 #include "utils.h" 0026 0027 #include <KToggleAction> 0028 0029 namespace KFormDesigner 0030 { 0031 0032 class WidgetInfo; 0033 0034 /** 0035 * KToggleAction subclass which remembers the matching class name. 0036 */ 0037 class KFORMDESIGNER_EXPORT LibActionWidget : public KToggleAction 0038 { 0039 Q_OBJECT 0040 public: 0041 /** LibActionWidget object is initialized to be mutually 0042 exclusive with all other LibActionWidget objects for group @a group. */ 0043 LibActionWidget(ActionGroup *group, WidgetInfo *w); 0044 0045 virtual ~LibActionWidget(); 0046 0047 Q_SIGNALS: 0048 /** 0049 * emits a signal containing the class name 0050 */ 0051 void toggled(const QByteArray &className); 0052 0053 protected Q_SLOTS: 0054 /** reimplemented from KToggleAction */ 0055 virtual void slotToggled(bool checked) override; 0056 0057 private: 0058 class Private; 0059 0060 Private* const d; 0061 }; 0062 0063 } 0064 0065 #endif