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