File indexing completed on 2024-05-12 16:40:55
0001 /* This file is part of the KDE project 0002 Copyright (C) 2004-2009 Jarosław Staniek <staniek@kde.org> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KEXIOBJECTINFOLABEL_H 0021 #define KEXIOBJECTINFOLABEL_H 0022 0023 #include "kexiextwidgets_export.h" 0024 0025 #include <QWidget> 0026 0027 //! @short Helper class displaying small icon with class name and object name 0028 /*! The info label is displayed in a form: 0029 <i>[ObjectClassIcon] ClassName "ObjectName"</i> 0030 0031 The <i>ObjectClassIcon</i> is optional. If "ClassName" is empty, the information 0032 is displayed as: 0033 <i>[ObjectClassIcon] ObjectName</i> 0034 0035 Example uses: 0036 - [button_icon] Button "quit" 0037 - [label_icon] Label "welcome" 0038 */ 0039 class KEXIEXTWIDGETS_EXPORT KexiObjectInfoLabel : public QWidget 0040 { 0041 Q_OBJECT 0042 public: 0043 explicit KexiObjectInfoLabel(QWidget* parent); 0044 virtual ~KexiObjectInfoLabel(); 0045 0046 void setObjectClassIconName(const QString &name); 0047 0048 QString objectClassIconName() const; 0049 0050 void setObjectClassName(const QString& name); 0051 0052 QString objectClassName() const; 0053 0054 void setObjectName(const QString& name); 0055 0056 QString objectName() const; 0057 0058 void setBuddy(QWidget * buddy); 0059 protected: 0060 void updateName(); 0061 0062 class Private; 0063 Private * const d; 0064 }; 0065 0066 #endif