kexidbutils.h
1/* This file is part of the KDE project
2 Copyright (C) 2006-2007 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KDBWIDGETS_UTILS_H
21#define KDBWIDGETS_UTILS_H
22
23#include <tqpopupmenu.h>
24#include <kexidataiteminterface.h>
25
26TQColor lighterGrayBackgroundColor(const TQPalette& palette);
27
29
31class KexiDBWidgetContextMenuExtender : public TQObject
32{
33 public:
36
38 void createTitle(TQPopupMenu *menu);
39
43
47 static bool updateContextMenuTitleForDataItem(TQPopupMenu *menu, KexiDataItemInterface* iface,
48 const TQString& icon = TQString());
49
50 protected:
51 KexiDataItemInterface* m_iface;
52 TQGuardedPtr<TQPopupMenu> m_contextMenu;
54};
55
56class KexiDBAutoField;
57
60{
61 public:
64
65 virtual bool appendStretchRequired(KexiDBAutoField* autoField) const
66 { Q_UNUSED(autoField); return false; }
67 virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const
68 { Q_UNUSED(autoField); return false; }
69};
70
71#endif
Universal "Auto Field" widget for Kexi forms.
Used for extending editor widgets' context menu.
Definition kexidbutils.h:32
bool m_contextMenuHasTitle
true if TDEPopupTitle has been added to the context menu.
Definition kexidbutils.h:53
void updatePopupMenuActions()
Enables or disables context menu actions that can modify the value.
static bool updateContextMenuTitleForDataItem(TQPopupMenu *menu, KexiDataItemInterface *iface, const TQString &icon=TQString())
void createTitle(TQPopupMenu *menu)
Creates title for context menu menu.
An interface for declaring widgets to be data-aware.
An interface allowing to define custom behaviour for subwidget of the KexiDBAutoField.
Definition kexidbutils.h:60