kexi

kexirecordmarker.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002 Lucijan Busch <lucijan@gmx.at>
00003    Copyright (C) 2002 Till Busch <till@bux.at>
00004    Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org>
00005    Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
00006 
00007    This program is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this program; see the file COPYING.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef KEXIRECORDMARKER_H
00024 #define KEXIRECORDMARKER_H
00025 
00026 #include <qwidget.h>
00027 
00028 class QImage;
00029 
00031 class KEXIGUIUTILS_EXPORT KexiRecordMarker : public QWidget
00032 {
00033     Q_OBJECT
00034 
00035     public:
00036         KexiRecordMarker(QWidget *parent, const char* name = 0);
00037         ~KexiRecordMarker();
00038 
00039         int rows() const;
00040 
00041         static QImage* penImage();
00042         static QImage* plusImage();
00043 
00044     public slots:
00045         void setOffset(int offset);
00046         void setCellHeight(int cellHeight);
00047         void setCurrentRow(int row);
00048         void setHighlightedRow(int row);
00049 
00051         void setEditRow(int row);
00052         void showInsertRow(bool show);
00053 
00054         QColor selectionBackgroundColor() const;
00055         void setSelectionBackgroundColor(const QColor &color);
00056 
00057         void addLabel(bool upd=true);
00058         void removeLabel(bool upd=true);
00059 
00061         void addLabels(int num, bool upd=true);
00062 
00063         void clear(bool upd=true);
00064 
00065     protected:
00066         virtual void paintEvent(QPaintEvent *e);
00067         
00068         class Private;
00069         Private * const d;
00070 };
00071 
00072 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys