kexi

kexipartinfo.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
00003    Copyright (C) 2003,2005 Jaroslaw Staniek <js@iidea.pl>
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 #ifndef KEXIPARTINFO_H
00022 #define KEXIPARTINFO_H
00023 
00024 #include "kexipartmanager.h"
00025 
00026 class KexiMainWindowImpl;
00027 class KexiProject;
00028 class KexiDialogBase;
00029 
00030 namespace KexiPart
00031 {
00032 
00033     class Manager;
00034     class Item;
00035     class Part;
00036 
00040 class KEXICORE_EXPORT Info
00041 {
00042     public:
00043         Info(KService::Ptr service);
00044         ~Info();
00045 
00049         QString groupName() const;
00050 
00054         QCString mimeType() const;
00055 
00056 //      /**
00057 //       * @return the icon for groups
00058 //       */
00059 //      inline QString groupIcon() const { return m_groupIcon; }
00060 
00064         QString itemIcon() const;
00065 
00069         QString createItemIcon() const;
00070 
00074         QString objectName() const;
00075 
00079         int projectPartID() const;
00080 
00084         KService::Ptr ptr() const;
00085 
00089         bool isBroken() const;
00090 
00094         bool isVisibleInNavigator() const;
00095 
00099         bool isDataExportSuppored() const;
00100 
00104         bool isPrintingSuppored() const;
00105 
00106     protected:
00110         Info();
00111 
00112         friend class Manager;
00113         friend class ::KexiProject;
00114         friend class ::KexiMainWindowImpl;
00115         friend class ::KexiDialogBase;
00116 
00120         void setProjectPartID(int id);
00121 
00126         void setBroken(bool broken, const QString& errorMessage);
00127 
00131         QString errorMessage() const;
00132 
00133         void setIdStoredInPartDatabase(bool set);
00134 
00141         bool isIdStoredInPartDatabase() const;
00142 
00143         class Private;
00144         Private *d;
00145 };
00146 
00150 KEXICORE_EXPORT QCString nameForCreateAction(const Info& info);
00151 
00152 }
00153 
00154 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys