Kexi API Documentation (2.0 alpha)

kexitabledesignerview_p.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KEXIALTERTABLEDIALOG_P_H
00021 #define KEXIALTERTABLEDIALOG_P_H
00022 
00023 #include "kexitabledesignerview.h"
00024 #include <kcommand.h>
00025 
00026 class KexiDataAwarePropertySet;
00027 
00029 #define COLUMN_ID_ICON 0
00030 #define COLUMN_ID_CAPTION 1
00031 #define COLUMN_ID_TYPE 2
00032 #define COLUMN_ID_DESC 3
00033 
00037 class CommandGroup : public KMacroCommand
00038 {
00039     public:
00040         CommandGroup( const QString & name )
00041             : KMacroCommand(name)
00042         {}
00043         virtual ~CommandGroup() {} 
00044         const QPtrList<KCommand>& commands() const { return m_commands; }
00045 };
00046 
00050 class CommandHistory : public KCommandHistory
00051 {
00052     Q_OBJECT
00053     public:
00054         CommandHistory(KActionCollection *actionCollection, bool withMenus = true);
00055 
00056         const QPtrList<KCommand>& commands() const { return m_commandsToUndo; }
00057 
00058         void addCommand(KCommand *command, bool execute = true);
00059 
00060     public slots:
00061         virtual void undo();
00062         virtual void redo();
00063 
00064     protected:
00065         QPtrList<KCommand> m_commandsToUndo, m_commandsToRedo;
00066 };
00067 
00068 //----------------------------------------------
00069 
00071 class KexiTableDesignerViewPrivate
00072 {
00073     public:
00074         KexiTableDesignerViewPrivate(KexiTableDesignerView* aDesignerView);
00075         ~KexiTableDesignerViewPrivate();
00076 
00077         int generateUniqueId();
00078 
00097         void setPropertyValueIfNeeded( const KoProperty::Set& set, const QCString& propertyName, 
00098             const QVariant& newValue, CommandGroup* commandGroup, 
00099             bool forceAddCommand = false, bool rememberOldValue = true,
00100             QStringList* const slist = 0, QStringList* const nlist = 0);
00101 
00103         void setPropertyValueIfNeeded( 
00104             const KoProperty::Set& set, const QCString& propertyName, 
00105             const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup, 
00106             bool forceAddCommand = false, bool rememberOldValue = true,
00107             QStringList* const slist = 0, QStringList* const nlist = 0);
00108 
00114         void setVisibilityIfNeeded( const KoProperty::Set& set, KoProperty::Property* prop, 
00115             bool visible, bool &changed, CommandGroup *commandGroup );
00116 
00117         bool updatePropertiesVisibility(KexiDB::Field::Type fieldType, KoProperty::Set &set,
00118             CommandGroup *commandGroup = 0);
00119 
00120         QString messageForSavingChanges(bool &emptyTable);
00121 
00125         void updateIconForItem(KexiTableItem &item, KoProperty::Set& set);
00126 
00127         KexiTableDesignerView* designerView;
00128 
00129         KexiTableView *view; 
00130 
00131         KexiTableViewData *data;
00132 
00133         KexiDataAwarePropertySet *sets;
00134 
00135         int row; 
00136 
00137         KToggleAction *action_toggle_pkey;
00138 
00139         KPopupTitle *contextMenuTitle;
00140 
00141         int uniqueIdCounter;
00142 
00144         int maxTypeNameTextWidth;
00146         bool dontAskOnStoreData : 1;
00147 
00148         bool slotTogglePrimaryKeyCalled : 1;
00149 
00150         bool primaryKeyExists : 1;
00152         bool slotPropertyChanged_primaryKey_enabled : 1;
00154         bool slotPropertyChanged_subType_enabled : 1;
00156         bool addHistoryCommand_in_slotPropertyChanged_enabled : 1;
00158         bool addHistoryCommand_in_slotRowUpdated_enabled : 1;
00160         bool addHistoryCommand_in_slotAboutToDeleteRow_enabled : 1;
00162         bool addHistoryCommand_in_slotRowInserted_enabled : 1;
00163 
00165         bool slotBeforeCellChanged_enabled : 1;
00166 
00170         bool tempStoreDataUsingRealAlterTable : 1;
00171 
00175         tristate recentResultOfStoreData;
00176 
00177         KActionCollection* historyActionCollection;
00178         CommandHistory* history;
00179 
00182         QAsciiDict<char> internalPropertyNames;
00183 };
00184 
00185 #endif
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:48:39 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003