~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kexi/widget/tableview/kexitableview_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2002 Till Busch <till@bux.at>
 
3
   Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at>
 
4
   Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
 
5
   Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
 
6
   Copyright (C) 2003-2008 Jarosław Staniek <staniek@kde.org>
 
7
 
 
8
   This program is free software; you can redistribute it and,or
 
9
   modify it under the terms of the GNU Library General Public
 
10
   License as published by the Free Software Foundation; either
 
11
   version 2 of the License, or (at your option) any later version.
 
12
 
 
13
   This program is distributed in the hope that it will be useful,
 
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
   Library General Public License for more details.
 
17
 
 
18
   You should have received a copy of the GNU Library General Public License
 
19
   along with this program; see the file COPYING.  If not, write to
 
20
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
 * Boston, MA 02110-1301, USA.
 
22
 
 
23
   Original Author:  Till Busch <till@bux.at>
 
24
   Original Project: buX (www.bux.at)
 
25
*/
 
26
 
 
27
#ifndef KEXITABLEVIEW_P_H
 
28
#define KEXITABLEVIEW_P_H
 
29
 
 
30
#include "kexitableview.h"
 
31
 
 
32
#include <kexidb/roweditbuffer.h>
 
33
#include <widget/utils/kexidisplayutils.h>
 
34
 
 
35
#include <QEvent>
 
36
#include <QTimer>
 
37
#include <QValidator>
 
38
#include <QPixmap>
 
39
#include <QLabel>
 
40
#include <QList>
 
41
#include <QHash>
 
42
#include <QRubberBand>
 
43
 
 
44
#include <KPushButton>
 
45
#include <KLineEdit>
 
46
#include <KMenu>
 
47
 
 
48
class KexiTableEdit;
 
49
class QLabel;
 
50
 
 
51
//! @short a dynamic tooltip for table view cells
 
52
/*! @internal */
 
53
class KexiTableViewCellToolTip : public QToolTip
 
54
{
 
55
public:
 
56
    KexiTableViewCellToolTip(KexiTableView * tableView);
 
57
    virtual ~KexiTableViewCellToolTip();
 
58
protected:
 
59
    virtual void maybeTip(const QPoint & p);
 
60
 
 
61
    KexiTableView *m_tableView;
 
62
};
 
63
 
 
64
/*! KexiTableView's internal structures
 
65
 @internal */
 
66
class KexiTableViewPrivate
 
67
{
 
68
public:
 
69
 
 
70
    KexiTableViewPrivate(KexiTableView* t);
 
71
    ~KexiTableViewPrivate();
 
72
 
 
73
    void clearVariables();
 
74
 
 
75
    KexiTableView *tv;
 
76
 
 
77
    //! editors: one for each column (indexed by KexiTableViewColumn)
 
78
    QHash<KexiTableViewColumn*, KexiTableEdit*> editors;
 
79
 
 
80
    int rowHeight;
 
81
 
 
82
//Qt4 QPixmap *pBufferPm;
 
83
    QTimer *pUpdateTimer;
 
84
    int menu_id_addRecord;
 
85
    int menu_id_removeRecord;
 
86
 
 
87
#if 0//(js) doesn't work!
 
88
    QTimer *scrollTimer;
 
89
#endif
 
90
 
 
91
    KexiTableView::ScrollDirection scrollDirection;
 
92
 
 
93
    bool editOnDoubleClick;
 
94
 
 
95
    bool needAutoScroll;
 
96
 
 
97
    bool disableDrawContents;
 
98
 
 
99
    /*! true if the navigation panel is enabled (visible) for the view.
 
100
     True by default. */
 
101
    bool navigatorEnabled;
 
102
 
 
103
    /*! true if the context menu is enabled (visible) for the view.
 
104
     True by default. */
 
105
    bool contextMenuEnabled;
 
106
 
 
107
    /*! used to force single skip keyPress event. */
 
108
    bool skipKeyPress;
 
109
 
 
110
    /*! Needed because m_horizontalHeader->isVisible() is not always accurate. True by default.  */
 
111
    bool horizontalHeaderVisible;
 
112
 
 
113
    /*! true if cursor should be moved on mouse release evenr rather than mouse press
 
114
     in handleContentsMousePressOrRelease().
 
115
     False by default. Used by KeixComboBoxPopup. */
 
116
    bool moveCursorOnMouseRelease;
 
117
 
 
118
    bool firstTimeEnsureCellVisible;
 
119
 
 
120
    bool insideResizeEvent;
 
121
 
 
122
    KexiTableView::Appearance appearance;
 
123
 
 
124
    //! brushes, fonts
 
125
    QBrush diagonalGrayPattern;
 
126
 
 
127
    //! Parameters for displaying autonumbers
 
128
    KexiDisplayUtils::DisplayParameters autonumberSignDisplayParameters;
 
129
 
 
130
    //! Parameters for displaying default values
 
131
    KexiDisplayUtils::DisplayParameters defaultValueDisplayParameters;
 
132
 
 
133
    //! Used by delayed mode of maximizeColumnsWidth()
 
134
    QList<int> maximizeColumnsWidthOnShow;
 
135
 
 
136
    /*! Used for delayed call of ensureCellVisible() after show().
 
137
     It's equal to (-1,-1) if ensureCellVisible() shouldn't e called. */
 
138
    QPoint ensureCellVisibleOnShow;
 
139
 
 
140
    /*! @internal Changes bottom margin settings, in pixels.
 
141
     At this time, it's used by KexiComboBoxPopup to decrease margin for popup's table. */
 
142
    int internal_bottomMargin;
 
143
 
 
144
    /*! Helper for "highlighted row" effect. */
 
145
    int highlightedRow;
 
146
 
 
147
    /*! Id of context menu key (cached). */
 
148
    int contextMenuKey;
 
149
 
 
150
    /*! Specifies currently displayed cell tooltip.
 
151
     Value of QPoint(-1,-1) means "no tooltip". */
 
152
    QPoint recentCellWithToolTip;
 
153
 
 
154
    /*! Table cell tooltip */
 
155
    KexiTableViewCellToolTip *cellToolTip;
 
156
 
 
157
    /*! A rubber band for displaying drag indicator. */
 
158
    QRubberBand *dragIndicatorRubberBand;
 
159
};
 
160
 
 
161
#endif