kexirecordmarker.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Lucijan Busch <lucijan@gmx.at>
3 Copyright (C) 2002 Till Busch <till@bux.at>
4 Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org>
5 Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21*/
22
23#ifndef KEXIRECORDMARKER_H
24#define KEXIRECORDMARKER_H
25
26#include <tqwidget.h>
27
28class TQImage;
29
31class KEXIGUIUTILS_EXPORT KexiRecordMarker : public TQWidget
32{
33 TQ_OBJECT
34
35
36 public:
37 KexiRecordMarker(TQWidget *parent, const char* name = 0);
39
40 int rows() const;
41
42 static TQImage* penImage();
43 static TQImage* plusImage();
44
45 public slots:
46 void setOffset(int offset);
47 void setCellHeight(int cellHeight);
48 void setCurrentRow(int row);
49 void setHighlightedRow(int row);
50
52 void setEditRow(int row);
53 void showInsertRow(bool show);
54
55 TQColor selectionBackgroundColor() const;
56 void setSelectionBackgroundColor(const TQColor &color);
57
58 void addLabel(bool upd=true);
59 void removeLabel(bool upd=true);
60
62 void addLabels(int num, bool upd=true);
63
64 void clear(bool upd=true);
65
66 protected:
67 virtual void paintEvent(TQPaintEvent *e);
68
69 class Private;
70 Private * const d;
71};
72
73#endif
Record marker, usually displayed at the left side of a table view or a continuous form.