+2003-01-13 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * qgridview.cpp: rename to...
+ * qgridview.C: ...this
+
+ * Makefile.am: distcheck ready
+
+ * Makefile.dialogs: simplify
+
+ * Rename a lot of files from *Dialog.ui to *DialogBase.ui
+
+ * ui/Makefile.am: simplify and distcheck ready, make sure to dist
+ all the ui files.
+
+ * ui/moc/Makefile.am: simplify and distcheck ready
+
+ * moc/Makefile.am: simplify and distcheck ready
+
2003-01-12 Edwin Leuven <e.leuven@uva.nl>
* ui/QPreambleDialog.ui:
* QPreamble.[Ch]:
- * QPreambleDialog.[Ch]:
+ * QPreambleDialog.[Ch]:
* Dialogs.C:
* Dialogs_impl.h:
* Makefile.dialogs: Remove preamble dialog
2003-01-12 Alfredo Braunstein <abraunst@libero.it>
- * QSpellcheckerDialog.C (spellcheck,update_contents): enable/disable
+ * QSpellcheckerDialog.C (spellcheck,update_contents): enable/disable
elements of the dialog.
2003-01-12 Lars Gullik Bjønnes <larsbj@gullik.net>
include $(top_srcdir)/config/common.am
+include $(srcdir)/Makefile.dialogs
SUBDIRS = ui moc
-EXTRA_DIST = Makefile.dialogs QDocument.C QDocument.h \
- QDocumentDialog.C QDocumentDialog.h
+EXTRA_DIST = Makefile.dialogs
noinst_LTLIBRARIES = libqt2.la
AM_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_TRANSLATION
-include $(srcdir)/Makefile.dialogs
-
libqt2_la_SOURCES = \
Alert_pimpl.C \
- qgridview.h \
- qgridview.cpp \
- BulletsModule.C \
- BulletsModule.h \
- QBrowseBox.C \
- QBrowseBox.h \
+ bulletstrings.C bulletstrings.h \
Dialogs.C \
Dialogs2.C \
Dialogs_impl.h \
FileDialog.C \
- FileDialog_private.C \
LyXKeySymFactory.C \
LyXScreenFactory.C \
- Menubar_pimpl.C \
- Menubar_pimpl.h \
- Timeout_pimpl.C \
- Timeout_pimpl.h \
- Toolbar_pimpl.C \
- Toolbar_pimpl.h \
- QCommandBuffer.C \
- QCommandBuffer.h \
- QCommandEdit.C \
- QCommandEdit.h \
- QContentPane.C \
- QContentPane.h \
- QLImage.C \
- QLImage.h \
- QLPainter.C \
- QLPainter.h \
- QLPopupMenu.C \
- QLPopupMenu.h \
- QLyXKeySym.C \
- QLyXKeySym.h \
- Qt2Base.C \
- Qt2Base.h \
- Qt2BC.C \
- Qt2BC.h \
- QtView.h \
- QtView.C \
- QWorkArea.h \
- QWorkArea.C \
+ Menubar_pimpl.C Menubar_pimpl.h \
+ Timeout_pimpl.C Timeout_pimpl.h \
+ QAbout.C QAbout.h \
+ QBibitem.C QBibitem.h \
+ QBibtex.C QBibtex.h \
+ QCharacter.C QCharacter.h \
+ QCitation.C QCitation.h \
+ QDocument.C QDocument.h \
+ QError.C QError.h \
+ QERT.C QERT.h \
+ QExternal.C QExternal.h \
+ QFloat.C QFloat.h \
+ QGraphics.C QGraphics.h \
+ QInclude.C QInclude.h \
+ QIndex.C QIndex.h \
+ QLImage.C QLImage.h \
+ QLog.C QLog.h \
+ QLPainter.C QLPainter.h \
+ QLyXKeySym.C QLyXKeySym.h \
+ QMath.C QMath.h \
+ QMinipage.C QMinipage.h \
+ QParagraph.C QParagraph.h \
+ QPrefs.C QPrefs.h \
+ QPrint.C QPrint.h \
+ QRef.C QRef.h \
+ QSearch.C QSearch.h \
+ QSendto.C QSendto.h \
+ QShowFile.C QShowFile.h \
+ QSpellchecker.C QSpellchecker.h \
+ QTabular.C QTabular.h \
+ QTabularCreate.C QTabularCreate.h \
+ QTexinfo.C QTexinfo.h \
+ QThesaurus.C QThesaurus.h \
+ QToc.C QToc.h \
+ QURL.C QURL.h \
+ QVCLog.C QVCLog.h \
+ QWorkArea.h QWorkArea.C \
+ QWrap.C QWrap.h \
+ Qt2BC.C Qt2BC.h \
+ QtLyXView.h \
WorkAreaFactory.C \
- emptytable.C \
- emptytable.h \
- iconpalette.h \
- iconpalette.C \
- io_callback.h \
- io_callback.C \
- lengthcombo.C \
- lengthcombo.h \
lyx_gui.C \
- qcoloritem.h \
- qcoloritem.C \
- qfontexample.h \
- qfontexample.C \
- qfont_loader.h \
- qfont_loader.C \
+ qcoloritem.h qcoloritem.C \
+ qfontexample.h qfontexample.C \
+ qfont_loader.h qfont_loader.C \
qfont_metrics.C \
qlkey.h \
- qscreen.h \
- qscreen.C \
- qsetborder.h \
- qsetborder.C \
- qt_helpers.h \
- qt_helpers.C \
- qttableview.h \
- qttableview.C \
- $(DIALOGSOURCES)
+ qscreen.h qscreen.C \
+ qt_helpers.h qt_helpers.C \
+ $(MOCFILES)
libqt2.la: $(libqt2_la_OBJECTS) $(libqt2_la_DEPENDENCIES)
# this is the master file from which the dialog file rules are generated
-DIALOGS = \
- QAbout \
- QAskForText \
- QBibitem \
- QBibtex \
- QCharacter \
- QCitation \
- QDocument \
- QError \
- QERT \
- QExternal \
- QFloat \
- QGraphics \
- QInclude \
- QIndex \
- QLog \
- QMath \
- QMinipage \
- QParagraph \
- QPrefs \
- QPrint \
- QRef \
- QSearch \
- QSendto \
- QShowFile \
- QSpellchecker \
- QTabularCreate \
- QTabular \
- QTexinfo \
- QThesaurus \
- QToc \
- QURL \
- QVCLog \
- QWrap
-
-DIALOGSOURCES = \
- QAbout.h QAboutDialog.h \
- QAbout.C QAboutDialog.C \
- QBibitem.h QBibitemDialog.h \
- QBibitem.C QBibitemDialog.C \
- QBibtex.h QBibtexDialog.h \
- QBibtex.C QBibtexDialog.C \
- QCharacter.h QCharacterDialog.h \
- QCharacter.C QCharacterDialog.C \
- QCitation.h QCitationDialog.h \
- QCitation.C QCitationDialog.C \
- QDocument.h QDocumentDialog.h \
- QDocument.C QDocumentDialog.C \
- QDelimiterDialog.h QDelimiterDialog.C \
- QError.h QErrorDialog.h \
- QError.C QErrorDialog.C \
- QERT.h QERTDialog.h \
- QERT.C QERTDialog.C \
- QExternal.h QExternalDialog.h \
- QExternal.C QExternalDialog.C \
- QFloat.h QFloatDialog.h \
- QFloat.C QFloatDialog.C \
- QGraphics.h QGraphicsDialog.h \
- QGraphics.C QGraphicsDialog.C \
- QInclude.h QIncludeDialog.h \
- QInclude.C QIncludeDialog.C \
- QIndex.h QIndexDialog.h \
- QIndex.C QIndexDialog.C \
- QLog.h QLogDialog.h \
- QLog.C QLogDialog.C \
- QMath.h QMathDialog.h \
- QMath.C QMathDialog.C \
- QMathMatrixDialog.h QMathMatrixDialog.C \
- QMinipage.h QMinipageDialog.h \
- QMinipage.C QMinipageDialog.C \
- QParagraph.h QParagraphDialog.h \
- QParagraph.C QParagraphDialog.C \
- QPrefs.h QPrefsDialog.h \
- QPrefs.C QPrefsDialog.C \
- QPrint.h QLPrintDialog.h \
- QPrint.C QLPrintDialog.C \
- QRef.h QRefDialog.h \
- QRef.C QRefDialog.C \
- QSearch.h QSearchDialog.h \
- QSearch.C QSearchDialog.C \
- QSendto.h QSendtoDialog.h \
- QSendto.C QSendtoDialog.C \
- QShowFile.h QShowFileDialog.h \
- QShowFile.C QShowFileDialog.C \
- QSpellchecker.h QSpellcheckerDialog.h \
- QSpellchecker.C QSpellcheckerDialog.C \
- QTabularCreate.h QTabularCreateDialog.h \
- QTabularCreate.C QTabularCreateDialog.C \
- QTabular.h QTabularDialog.h \
- QTabular.C QTabularDialog.C \
- QTexinfo.h QTexinfoDialog.h \
- QTexinfo.C QTexinfoDialog.C \
- QThesaurus.h QThesaurusDialog.h \
- QThesaurus.C QThesaurusDialog.C \
- QToc.h QTocDialog.h \
- QToc.C QTocDialog.C \
- QURL.h QURLDialog.h \
- QURL.C QURLDialog.C \
- QVCLog.h QVCLogDialog.h \
- QVCLog.C QVCLogDialog.C \
- QWrap.h QWrapDialog.h \
- QWrap.C QWrapDialog.C
-
-MOCDIALOGS = \
- QAboutDialog_moc.C \
- QBibitemDialog_moc.C \
- QBibtexDialog_moc.C \
- QCharacterDialog_moc.C \
- QCitationDialog_moc.C \
- QDocumentDialog_moc.C \
- QDelimiterDialog_moc.C \
- QErrorDialog_moc.C \
- QERTDialog_moc.C \
- QExternalDialog_moc.C \
- QFloatDialog_moc.C \
- QGraphicsDialog_moc.C \
- QIncludeDialog_moc.C \
- QIndexDialog_moc.C \
- QLogDialog_moc.C \
- QMathDialog_moc.C \
- QMathMatrixDialog_moc.C \
- QMinipageDialog_moc.C \
- QParagraphDialog_moc.C \
- QPrefsDialog_moc.C \
- QLPrintDialog_moc.C \
- QRefDialog_moc.C \
- QSearchDialog_moc.C \
- QSendtoDialog_moc.C \
- QShowFileDialog_moc.C \
- QSpellcheckerDialog_moc.C \
- QTabularCreateDialog_moc.C \
- QTabularDialog_moc.C \
- QTexinfoDialog_moc.C \
- QThesaurusDialog_moc.C \
- QTocDialog_moc.C \
- QURLDialog_moc.C \
- QVCLogDialog_moc.C \
- QWrapDialog_moc.C
-
-UIDIALOGS = \
- QAboutDialogBase.h \
- QAboutDialogBase.C \
- QAskForTextDialog.h \
- QAskForTextDialog.C \
- QBibitemDialogBase.h \
- QBibitemDialogBase.C \
- QBibtexDialogBase.h \
- QBibtexDialogBase.C \
- QCharacterDialogBase.h \
- QCharacterDialogBase.C \
- QCitationDialogBase.h \
- QCitationDialogBase.C \
- QDocumentDialogBase.h \
- QDocumentDialogBase.C \
- QDelimiterDialogBase.h \
- QDelimiterDialogBase.C \
- QErrorDialogBase.C \
- QErrorDialogBase.h \
- QERTDialogBase.C \
- QERTDialogBase.h \
- QExternalDialogBase.C \
- QExternalDialogBase.h \
- QFloatDialogBase.C \
- QFloatDialogBase.h \
- QGraphicsDialogBase.C \
- QGraphicsDialogBase.h \
- QIncludeDialogBase.h \
- QIncludeDialogBase.C \
- QIndexDialogBase.h \
- QIndexDialogBase.C \
- QLogDialogBase.h \
- QLogDialogBase.C \
- QMathDialogBase.h \
- QMathDialogBase.C \
- QMathMatrixDialogBase.h \
- QMathMatrixDialogBase.C \
- QMinipageDialogBase.h \
- QMinipageDialogBase.C \
- QParagraphDialogBase.h \
- QParagraphDialogBase.C \
- QPrefsDialogBase.h \
- QPrefsDialogBase.C \
- QPrintDialogBase.h \
- QPrintDialogBase.C \
- QRefDialogBase.h \
- QRefDialogBase.C \
- QSearchDialogBase.h \
- QSearchDialogBase.C \
- QSendtoDialogBase.h \
- QSendtoDialogBase.C \
- QShowFileDialogBase.h \
- QShowFileDialogBase.C \
- QSpellcheckerDialogBase.h \
- QSpellcheckerDialogBase.C \
- QTabularCreateDialogBase.h \
- QTabularCreateDialogBase.C \
- QTabularDialogBase.h \
- QTabularDialogBase.C \
- QTexinfoDialogBase.h \
- QTexinfoDialogBase.C \
- QThesaurusDialogBase.h \
- QThesaurusDialogBase.C \
- QTocDialogBase.h \
- QTocDialogBase.C \
- QURLDialogBase.h \
- QURLDialogBase.C \
- QVCLogDialogBase.h \
- QVCLogDialogBase.C \
- QWrapDialogBase.h \
- QWrapDialogBase.C \
- ClassModuleBase.h ClassModuleBase.C \
- PackagesModuleBase.h PackagesModuleBase.C \
- PaperModuleBase.h PaperModuleBase.C \
- MarginsModuleBase.h MarginsModuleBase.C \
- LanguageModuleBase.h LanguageModuleBase.C \
- NumberingModuleBase.h NumberingModuleBase.C \
- BiblioModuleBase.h BiblioModuleBase.C \
- PreambleModuleBase.h PreambleModuleBase.C \
- BulletsModuleBase.h BulletsModuleBase.C \
- QPrefAsciiModule.h QPrefAsciiModule.C \
- QPrefDateModule.h QPrefDateModule.C \
- QPrefKeyboardModule.h QPrefKeyboardModule.C \
- QPrefLatexModule.h QPrefLatexModule.C \
- QPrefScreenFontsModule.h QPrefScreenFontsModule.C \
- QPrefColorsModule.h QPrefColorsModule.C \
- QPrefDisplayModule.h QPrefDisplayModule.C \
- QPrefPathsModule.h QPrefPathsModule.C \
- QPrefSpellcheckerModule.h QPrefSpellcheckerModule.C \
- QPrefConvertersModule.h QPrefConvertersModule.C \
- QPrefFileformatsModule.h QPrefFileformatsModule.C \
- QPrefLanguageModule.h QPrefLanguageModule.C \
- QPrefPrinterModule.h QPrefPrinterModule.C \
- QPrefUIModule.h QPrefUIModule.C
-
- UIMOCDIALOGS = \
- QAboutDialogBase_moc.C \
- QAskForTextDialog_moc.C \
- QBibitemDialogBase_moc.C \
- QBibtexDialogBase_moc.C \
- QCharacterDialogBase_moc.C \
- QCitationDialogBase_moc.C \
- QDocumentDialogBase_moc.C \
- QDelimiterDialogBase_moc.C \
- QErrorDialogBase_moc.C \
- QERTDialogBase_moc.C \
- QExternalDialogBase_moc.C \
- QFloatDialogBase_moc.C \
- QGraphicsDialogBase_moc.C \
- QIncludeDialogBase_moc.C \
- QIndexDialogBase_moc.C \
- QLogDialogBase_moc.C \
- QMathDialogBase_moc.C \
- QMathMatrixDialogBase_moc.C \
- QMinipageDialogBase_moc.C \
- QParagraphDialogBase_moc.C \
- QPrefsDialogBase_moc.C \
- QPrintDialogBase_moc.C \
- QRefDialogBase_moc.C \
- QSearchDialogBase_moc.C \
- QSendtoDialogBase_moc.C \
- QShowFileDialogBase_moc.C \
- QSpellcheckerDialogBase_moc.C \
- QTabularCreateDialogBase_moc.C \
- QTabularDialogBase_moc.C \
- QTexinfoDialogBase_moc.C \
- QThesaurusDialogBase_moc.C \
- QTocDialogBase_moc.C \
- QURLDialogBase_moc.C \
- QVCLogDialogBase_moc.C \
- QWrapDialogBase_moc.C \
- ClassModuleBase_moc.C \
- PackagesModuleBase_moc.C \
- PaperModuleBase_moc.C \
- MarginsModuleBase_moc.C \
- LanguageModuleBase_moc.C \
- NumberingModuleBase_moc.C \
- BiblioModuleBase_moc.C \
- PreambleModuleBase_moc.C \
- BulletsModuleBase_moc.C \
- QPrefAsciiModule_moc.C \
- QPrefDateModule_moc.C \
- QPrefKeyboardModule_moc.C \
- QPrefLatexModule_moc.C \
- QPrefScreenFontsModule_moc.C \
- QPrefColorsModule_moc.C \
- QPrefDisplayModule_moc.C \
- QPrefPathsModule_moc.C \
- QPrefSpellcheckerModule_moc.C \
- QPrefConvertersModule_moc.C \
- QPrefFileformatsModule_moc.C \
- QPrefLanguageModule_moc.C \
- QPrefPrinterModule_moc.C \
- QPrefUIModule_moc.C
+UIFILES = \
+ BiblioModuleBase.ui \
+ BulletsModuleBase.ui \
+ ClassModuleBase.ui \
+ LanguageModuleBase.ui \
+ MarginsModuleBase.ui \
+ NumberingModuleBase.ui \
+ PackagesModuleBase.ui \
+ PaperModuleBase.ui \
+ PreambleModuleBase.ui \
+ QAboutDialogBase.ui \
+ QAskForTextDialog.ui \
+ QBibitemDialogBase.ui \
+ QBibtexDialogBase.ui \
+ QCharacterDialogBase.ui \
+ QCitationDialogBase.ui \
+ QDelimiterDialogBase.ui \
+ QDocumentDialogBase.ui \
+ QErrorDialogBase.ui \
+ QERTDialogBase.ui \
+ QExternalDialogBase.ui \
+ QFloatDialogBase.ui \
+ QGraphicsDialogBase.ui \
+ QIncludeDialogBase.ui \
+ QIndexDialogBase.ui \
+ QLogDialogBase.ui \
+ QMathDialogBase.ui \
+ QMathMatrixDialogBase.ui \
+ QMinipageDialogBase.ui \
+ QParagraphDialogBase.ui \
+ QPrefAsciiModule.ui \
+ QPrefColorsModule.ui \
+ QPrefConvertersModule.ui \
+ QPrefDateModule.ui \
+ QPrefDisplayModule.ui \
+ QPrefFileformatsModule.ui \
+ QPrefKeyboardModule.ui \
+ QPrefLanguageModule.ui \
+ QPrefLatexModule.ui \
+ QPrefPathsModule.ui \
+ QPrefPrinterModule.ui \
+ QPrefScreenFontsModule.ui \
+ QPrefsDialogBase.ui \
+ QPrefSpellcheckerModule.ui \
+ QPrefUIModule.ui \
+ QPrintDialogBase.ui \
+ QRefDialogBase.ui \
+ QSearchDialogBase.ui \
+ QSendtoDialogBase.ui \
+ QShowFileDialogBase.ui \
+ QSpellcheckerDialogBase.ui \
+ QTabularCreateDialogBase.ui \
+ QTabularDialogBase.ui \
+ QTexinfoDialogBase.ui \
+ QThesaurusDialogBase.ui \
+ QTocDialogBase.ui \
+ QURLDialogBase.ui \
+ QVCLogDialogBase.ui \
+ QWrapDialogBase.ui
+
+MOCFILES = \
+ BulletsModule.C BulletsModule.h \
+ emptytable.C emptytable.h \
+ FileDialog_private.C FileDialog_private.h \
+ iconpalette.C iconpalette.h \
+ io_callback.C io_callback.h \
+ lengthcombo.C lengthcombo.h \
+ QAboutDialog.C QAboutDialog.h \
+ QBibitemDialog.C QBibitemDialog.h \
+ QBibtexDialog.C QBibtexDialog.h \
+ QBrowseBox.C QBrowseBox.h \
+ QCharacterDialog.C QCharacterDialog.h \
+ QCitationDialog.C QCitationDialog.h \
+ QCommandBuffer.C QCommandBuffer.h \
+ QCommandEdit.C QCommandEdit.h \
+ QContentPane.C QContentPane.h \
+ QDelimiterDialog.C QDelimiterDialog.h \
+ QDocumentDialog.C QDocumentDialog.h \
+ QErrorDialog.C QErrorDialog.h \
+ QERTDialog.C QERTDialog.h \
+ QExternalDialog.C QExternalDialog.h \
+ QFloatDialog.C QFloatDialog.h \
+ QGraphicsDialog.C QGraphicsDialog.h \
+ qgridview.C qgridview.h \
+ QIncludeDialog.C QIncludeDialog.h \
+ QIndexDialog.C QIndexDialog.h \
+ QLogDialog.C QLogDialog.h \
+ QLPopupMenu.C QLPopupMenu.h \
+ QLPrintDialog.C QLPrintDialog.h \
+ QMathDialog.C QMathDialog.h \
+ QMathMatrixDialog.C QMathMatrixDialog.h \
+ QMinipageDialog.C QMinipageDialog.h \
+ QParagraphDialog.C QParagraphDialog.h \
+ QPrefsDialog.C QPrefsDialog.h \
+ QRefDialog.C QRefDialog.h \
+ QSearchDialog.C QSearchDialog.h \
+ QSendtoDialog.C QSendtoDialog.h \
+ qsetborder.C qsetborder.h \
+ QShowFileDialog.C QShowFileDialog.h \
+ QSpellcheckerDialog.C QSpellcheckerDialog.h \
+ Qt2Base.C Qt2Base.h \
+ QTabularCreateDialog.C QTabularCreateDialog.h \
+ QTabularDialog.C QTabularDialog.h \
+ QTexinfoDialog.C QTexinfoDialog.h \
+ QThesaurusDialog.C QThesaurusDialog.h \
+ QTocDialog.C QTocDialog.h \
+ qttableview.C qttableview.h \
+ QtView.C QtView.h \
+ QURLDialog.C QURLDialog.h \
+ QVCLogDialog.C QVCLogDialog.h \
+ QWrapDialog.C QWrapDialog.h \
+ Toolbar_pimpl.C Toolbar_pimpl.h
include $(top_srcdir)/config/common.am
include $(srcdir)/../Makefile.dialogs
-DISTCLEANFILES += $(MOCDIALOGS)
+DISTCLEANFILES += *.C
noinst_LTLIBRARIES = libqt2moc.la
AM_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_TRANSLATION
-nodist_libqt2moc_la_SOURCES = \
- $(MOCDIALOGS) \
- FileDialog_private_moc.C \
- emptytable_moc.C \
- iconpalette_moc.C \
- lengthcombo_moc.C \
- qsetborder_moc.C \
- qttableview_moc.C \
- qgridview_moc.C \
- QBrowseBox_moc.C \
- BulletsModule_moc.C \
- Toolbar_pimpl_moc.C \
- QCommandBuffer_moc.C \
- QCommandEdit_moc.C \
- QContentPane_moc.C \
- QLPopupMenu_moc.C \
- Qt2Base_moc.C \
- QtView_moc.C \
- io_callback_moc.C \
- $(MOCDIALOGS)
+nodist_libqt2moc_la_SOURCES = $(MOCFILES:.C=_moc.C)
libqt2moc.la: $(libqt2moc_la_OBJECTS) $(libqt2moc_la_DEPENDENCIES)
-%_moc.C: ../%.h
+%_moc.C: $(srcdir)/../%.h
$(MOC) -o $@ $<
-
-distclean-local:
- rm -f *_moc.C
--- /dev/null
+/****************************************************************************
+** $Id: qgridview.C,v 1.1 2003/01/13 10:39:18 larsbj Exp $
+**
+** Implementation of QGridView class
+**
+** Created: 010523
+**
+** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the widgets module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+
+#include "qgridview.h"
+
+#ifndef QT_NO_GRIDVIEW
+
+#include <qpainter.h>
+
+/*!
+ \class QGridView qgridview.h
+ \brief The QGridView class provides an abstract base for fixed-size
+ grids.
+
+ \ingroup abstractwidgets
+
+ A grid view consists of a number of abstract cells organized in rows
+ and columns. The cells have a fixed size and are identified with a
+ row index and a column index. The top-left cell is in row 0, column
+ 0. The bottom-right cell is in row numRows()-1, column numCols()-1.
+
+ You can define \l numRows, \l numCols, \l cellWidth and
+ \l cellHeight. Reimplement the pure virtual function paintCell() to
+ draw the content of a cell.
+
+ With ensureCellVisible(), you can ensure a certain cell is
+ visible. With rowAt() and columnAt() you can find a cell based on
+ the given x- and y-coordinates.
+
+ If you need to monitor changes to the grid's dimensions (i.e. when
+ numRows or numCols is changed), reimplement the dimensionChange()
+ change handler.
+
+ Note: the row, column indices are always given in the order, row
+ (vertical offset) then column (horizontal offset). This order is the
+ opposite of all pixel operations, which are given in the order x
+ (horizontal offset), y (vertical offset).
+
+ QGridView is a very simple abstract class based on QScrollView. It
+ is designed to simplify the task of drawing many cells of the same
+ size in a potentially scrollable canvas. If you need rows and
+ columns in different sizes, use a QTable instead. If you need a
+ simple list of items, use a QListBox. If you need to present
+ hierachical data use a QListView, and if you need random objects at
+ random positions, consider using either a QIconView or a QCanvas.
+
+*/
+
+
+/*!
+ Constructs a grid view.
+
+ The \a parent, \a name and widget flag, \a f, arguments are passed to the
+ QScrollView constructor.
+*/
+QGridView::QGridView( QWidget *parent, const char *name, WFlags f )
+ :QScrollView( parent, name ,f ),nrows(5),ncols(5),cellw(12),cellh(12)
+{
+ viewport()->setBackgroundMode( PaletteBase );
+ setBackgroundMode( PaletteBackground );
+ viewport()->setFocusProxy( this );
+}
+
+/*!
+ Destroys the grid view.
+*/
+QGridView::~QGridView()
+{
+}
+
+void QGridView::updateGrid()
+{
+ resizeContents( ncols * cellw, nrows * cellh );
+}
+
+/*! \property QGridView::numRows
+ \brief The number of rows in the grid
+
+ \sa numCols
+*/
+void QGridView::setNumRows( int numRows )
+{
+ int oldnrows = nrows;
+ nrows = numRows;
+ dimensionChange( oldnrows, ncols );
+ updateGrid();
+}
+
+/*! \property QGridView::numCols
+ \brief The number of columns in the grid
+
+ \sa numRows
+*/
+void QGridView::setNumCols( int numCols )
+{
+ int oldncols = ncols;
+ ncols = numCols;
+ dimensionChange( nrows, oldncols );
+ updateGrid();
+}
+
+/*! \property QGridView::cellWidth
+ \brief The width of a grid column
+
+ All columns in a grid view have the same width.
+
+ \sa cellHeight
+*/
+void QGridView::setCellWidth( int cellWidth )
+{
+ cellw = cellWidth;
+ updateGrid();
+ updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+
+}
+
+/*! \property QGridView::cellHeight
+ \brief The height of a grid row
+
+ All rows in a grid view have the same height.
+
+ \sa cellWidth
+*/
+void QGridView::setCellHeight( int cellHeight )
+{
+ cellh = cellHeight;
+ updateGrid();
+ updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+
+}
+
+/*!
+ Returns the geometry of cell (\a row, \a column) in the content
+ coordinate system.
+
+ \sa cellRect()
+ */
+QRect QGridView::cellGeometry( int row, int column )
+{
+ QRect r;
+ if ( row >= 0 && row < nrows && column >= 0 && column < ncols )
+ r.setRect( cellw * column, cellh * row, cellw, cellh );
+ return r;
+}
+
+/*! Repaints cell (\a row, \a column).
+
+ If \a erase is TRUE, Qt erases the area of the cell before the
+ paintCell() call; otherwise no erasing takes place.
+
+ \sa QWidget::repaint()
+ */
+void QGridView::repaintCell( int row, int column, bool erase )
+{
+ repaintContents( cellGeometry( row, column ), erase );
+}
+
+/*! Updates cell (\a row, \a column).
+
+ \sa QWidget::update()
+ */
+void QGridView::updateCell( int row, int column )
+{
+ updateContents( cellGeometry( row, column ) );
+}
+
+/*!
+ Ensure cell (\a row, \a column) is visible, scrolling the grid view
+ if necessary.
+ */
+void QGridView::ensureCellVisible( int row, int column )
+{
+ QRect r = cellGeometry( row, column );
+ ensureVisible( r.x(), r.y(), r.width(), r.height() );
+}
+
+/*! This function fills the \a cw pixels wide and \a ch pixels high
+ rectangle starting at position (\a cx, \a cy) with the
+ background color using the painter \a p.
+
+ paintEmptyArea() is invoked by drawContents() to erase
+ or fill unused areas.
+*/
+
+void QGridView::paintEmptyArea( QPainter *p, int cx ,int cy, int cw, int ch)
+{
+ if ( gridSize().width() >= contentsWidth() && gridSize().height() >= contentsHeight() )
+ return;
+ // Region of the rect we should draw
+ contentsToViewport( cx, cy, cx, cy );
+ QRegion reg( QRect( cx, cy, cw, ch ) );
+ // Subtract the table from it
+ reg = reg.subtract( QRect( contentsToViewport( QPoint( 0, 0 ) ), gridSize() ) );
+
+ // And draw the rectangles (transformed as needed)
+ QArray<QRect> r = reg.rects();
+ const QBrush &brush = colorGroup().brush(QColorGroup::Background);
+ for ( int i = 0; i < (int)r.count(); ++i)
+ p->fillRect( r[ i ], brush );
+}
+
+/*!\reimp
+ */
+void QGridView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+{
+ int colfirst = columnAt( cx );
+ int collast = columnAt( cx + cw );
+ int rowfirst = rowAt( cy );
+ int rowlast = rowAt( cy + ch );
+
+ if ( rowfirst == -1 || colfirst == -1 ) {
+ paintEmptyArea( p, cx, cy, cw, ch );
+ return;
+ }
+
+ if ( collast < 0 || collast >= ncols )
+ collast = ncols-1;
+ if ( rowlast < 0 || rowlast >= nrows )
+ rowlast = nrows-1;
+
+ // Go through the rows
+ for ( int r = rowfirst; r <= rowlast; ++r ) {
+ // get row position and height
+ int rowp = r * cellh;
+
+ // Go through the columns in the row r
+ // if we know from where to where, go through [colfirst, collast],
+ // else go through all of them
+ for ( int c = colfirst; c <= collast; ++c ) {
+ // get position and width of column c
+ int colp = c * cellw;
+ // Translate painter and draw the cell
+ p->translate( colp, rowp );
+ paintCell( p, r, c );
+ p->translate( -colp, -rowp );
+ }
+ }
+
+ // Paint empty rects
+ paintEmptyArea( p, cx, cy, cw, ch );
+}
+
+/*!
+ \reimp
+
+ (Implemented to get rid of a compiler warning.)
+*/
+void QGridView::drawContents( QPainter * )
+{
+}
+
+/*! \fn void QGridView::dimensionChange( int oldNumRows, int oldNumCols )
+
+ This change handler is called whenever any of the grid's dimensions
+ changes. \a oldNumRows and \a oldNumCols contain the old dimensions,
+ numRows() and numCols() contain the new dimensions.
+ */
+void QGridView::dimensionChange( int, int ) {}
+
+
+
+/*! \fn int QGridView::rowAt( int y ) const
+
+ Returns the number of the row at position \a y. \a y must be given in
+ content coordinates.
+
+ \sa columnAt()
+ */
+
+/*! \fn int QGridView::columnAt( int x ) const
+
+ Returns the number of the column at position \a x. \a x must be
+ given in content coordinates.
+
+ \sa rowAt()
+ */
+
+/*!
+ \fn void QGridView::paintCell( QPainter *p, int row, int col )
+
+ This pure virtual function is called to paint the single cell at
+ (\a row, \a col) using painter \a p. The painter must be open when
+ paintCell() is called and must remain open.
+
+ The coordinate system is \link QPainter::translate() translated \endlink
+ so that the origin is at the top-left corner of the cell to be
+ painted, i.e. \e cell coordinates. Do not scale or shear the coordinate
+ system (or if you do, restore the transformation matrix before you
+ return).
+
+ The painter is not clipped by default in order to get maximum
+ efficiency. If you want clipping, use
+
+ \code
+ p->setClipRect( cellRect(), QPainter::CoordPainter );
+ //... your drawing code
+ p->setClipping( FALSE );
+
+ \endcode
+
+*/
+
+/*! \fn QRect QGridView::cellRect() const
+
+ Returns the geometry of a cell in a cell's coordinate system. This
+ is a convenience function useful in paintCell(). It is equivalent to
+ QRect( 0, 0, cellWidth(), cellHeight() ).
+
+ \sa cellGeometry()
+
+ */
+
+/*!\fn QSize QGridView::gridSize() const
+
+ Returns the size of the grid in pixels.
+
+ */
+
+#endif // QT_NO_GRIDVIEW
+++ /dev/null
-/****************************************************************************
-** $Id: qgridview.cpp,v 1.1 2002/10/09 08:59:02 leuven Exp $
-**
-** Implementation of QGridView class
-**
-** Created: 010523
-**
-** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
-**
-** This file is part of the widgets module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-
-#include "qgridview.h"
-
-#ifndef QT_NO_GRIDVIEW
-
-#include <qpainter.h>
-
-/*!
- \class QGridView qgridview.h
- \brief The QGridView class provides an abstract base for fixed-size
- grids.
-
- \ingroup abstractwidgets
-
- A grid view consists of a number of abstract cells organized in rows
- and columns. The cells have a fixed size and are identified with a
- row index and a column index. The top-left cell is in row 0, column
- 0. The bottom-right cell is in row numRows()-1, column numCols()-1.
-
- You can define \l numRows, \l numCols, \l cellWidth and
- \l cellHeight. Reimplement the pure virtual function paintCell() to
- draw the content of a cell.
-
- With ensureCellVisible(), you can ensure a certain cell is
- visible. With rowAt() and columnAt() you can find a cell based on
- the given x- and y-coordinates.
-
- If you need to monitor changes to the grid's dimensions (i.e. when
- numRows or numCols is changed), reimplement the dimensionChange()
- change handler.
-
- Note: the row, column indices are always given in the order, row
- (vertical offset) then column (horizontal offset). This order is the
- opposite of all pixel operations, which are given in the order x
- (horizontal offset), y (vertical offset).
-
- QGridView is a very simple abstract class based on QScrollView. It
- is designed to simplify the task of drawing many cells of the same
- size in a potentially scrollable canvas. If you need rows and
- columns in different sizes, use a QTable instead. If you need a
- simple list of items, use a QListBox. If you need to present
- hierachical data use a QListView, and if you need random objects at
- random positions, consider using either a QIconView or a QCanvas.
-
-*/
-
-
-/*!
- Constructs a grid view.
-
- The \a parent, \a name and widget flag, \a f, arguments are passed to the
- QScrollView constructor.
-*/
-QGridView::QGridView( QWidget *parent, const char *name, WFlags f )
- :QScrollView( parent, name ,f ),nrows(5),ncols(5),cellw(12),cellh(12)
-{
- viewport()->setBackgroundMode( PaletteBase );
- setBackgroundMode( PaletteBackground );
- viewport()->setFocusProxy( this );
-}
-
-/*!
- Destroys the grid view.
-*/
-QGridView::~QGridView()
-{
-}
-
-void QGridView::updateGrid()
-{
- resizeContents( ncols * cellw, nrows * cellh );
-}
-
-/*! \property QGridView::numRows
- \brief The number of rows in the grid
-
- \sa numCols
-*/
-void QGridView::setNumRows( int numRows )
-{
- int oldnrows = nrows;
- nrows = numRows;
- dimensionChange( oldnrows, ncols );
- updateGrid();
-}
-
-/*! \property QGridView::numCols
- \brief The number of columns in the grid
-
- \sa numRows
-*/
-void QGridView::setNumCols( int numCols )
-{
- int oldncols = ncols;
- ncols = numCols;
- dimensionChange( nrows, oldncols );
- updateGrid();
-}
-
-/*! \property QGridView::cellWidth
- \brief The width of a grid column
-
- All columns in a grid view have the same width.
-
- \sa cellHeight
-*/
-void QGridView::setCellWidth( int cellWidth )
-{
- cellw = cellWidth;
- updateGrid();
- updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
-
-}
-
-/*! \property QGridView::cellHeight
- \brief The height of a grid row
-
- All rows in a grid view have the same height.
-
- \sa cellWidth
-*/
-void QGridView::setCellHeight( int cellHeight )
-{
- cellh = cellHeight;
- updateGrid();
- updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
-
-}
-
-/*!
- Returns the geometry of cell (\a row, \a column) in the content
- coordinate system.
-
- \sa cellRect()
- */
-QRect QGridView::cellGeometry( int row, int column )
-{
- QRect r;
- if ( row >= 0 && row < nrows && column >= 0 && column < ncols )
- r.setRect( cellw * column, cellh * row, cellw, cellh );
- return r;
-}
-
-/*! Repaints cell (\a row, \a column).
-
- If \a erase is TRUE, Qt erases the area of the cell before the
- paintCell() call; otherwise no erasing takes place.
-
- \sa QWidget::repaint()
- */
-void QGridView::repaintCell( int row, int column, bool erase )
-{
- repaintContents( cellGeometry( row, column ), erase );
-}
-
-/*! Updates cell (\a row, \a column).
-
- \sa QWidget::update()
- */
-void QGridView::updateCell( int row, int column )
-{
- updateContents( cellGeometry( row, column ) );
-}
-
-/*!
- Ensure cell (\a row, \a column) is visible, scrolling the grid view
- if necessary.
- */
-void QGridView::ensureCellVisible( int row, int column )
-{
- QRect r = cellGeometry( row, column );
- ensureVisible( r.x(), r.y(), r.width(), r.height() );
-}
-
-/*! This function fills the \a cw pixels wide and \a ch pixels high
- rectangle starting at position (\a cx, \a cy) with the
- background color using the painter \a p.
-
- paintEmptyArea() is invoked by drawContents() to erase
- or fill unused areas.
-*/
-
-void QGridView::paintEmptyArea( QPainter *p, int cx ,int cy, int cw, int ch)
-{
- if ( gridSize().width() >= contentsWidth() && gridSize().height() >= contentsHeight() )
- return;
- // Region of the rect we should draw
- contentsToViewport( cx, cy, cx, cy );
- QRegion reg( QRect( cx, cy, cw, ch ) );
- // Subtract the table from it
- reg = reg.subtract( QRect( contentsToViewport( QPoint( 0, 0 ) ), gridSize() ) );
-
- // And draw the rectangles (transformed as needed)
- QArray<QRect> r = reg.rects();
- const QBrush &brush = colorGroup().brush(QColorGroup::Background);
- for ( int i = 0; i < (int)r.count(); ++i)
- p->fillRect( r[ i ], brush );
-}
-
-/*!\reimp
- */
-void QGridView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
-{
- int colfirst = columnAt( cx );
- int collast = columnAt( cx + cw );
- int rowfirst = rowAt( cy );
- int rowlast = rowAt( cy + ch );
-
- if ( rowfirst == -1 || colfirst == -1 ) {
- paintEmptyArea( p, cx, cy, cw, ch );
- return;
- }
-
- if ( collast < 0 || collast >= ncols )
- collast = ncols-1;
- if ( rowlast < 0 || rowlast >= nrows )
- rowlast = nrows-1;
-
- // Go through the rows
- for ( int r = rowfirst; r <= rowlast; ++r ) {
- // get row position and height
- int rowp = r * cellh;
-
- // Go through the columns in the row r
- // if we know from where to where, go through [colfirst, collast],
- // else go through all of them
- for ( int c = colfirst; c <= collast; ++c ) {
- // get position and width of column c
- int colp = c * cellw;
- // Translate painter and draw the cell
- p->translate( colp, rowp );
- paintCell( p, r, c );
- p->translate( -colp, -rowp );
- }
- }
-
- // Paint empty rects
- paintEmptyArea( p, cx, cy, cw, ch );
-}
-
-/*!
- \reimp
-
- (Implemented to get rid of a compiler warning.)
-*/
-void QGridView::drawContents( QPainter * )
-{
-}
-
-/*! \fn void QGridView::dimensionChange( int oldNumRows, int oldNumCols )
-
- This change handler is called whenever any of the grid's dimensions
- changes. \a oldNumRows and \a oldNumCols contain the old dimensions,
- numRows() and numCols() contain the new dimensions.
- */
-void QGridView::dimensionChange( int, int ) {}
-
-
-
-/*! \fn int QGridView::rowAt( int y ) const
-
- Returns the number of the row at position \a y. \a y must be given in
- content coordinates.
-
- \sa columnAt()
- */
-
-/*! \fn int QGridView::columnAt( int x ) const
-
- Returns the number of the column at position \a x. \a x must be
- given in content coordinates.
-
- \sa rowAt()
- */
-
-/*!
- \fn void QGridView::paintCell( QPainter *p, int row, int col )
-
- This pure virtual function is called to paint the single cell at
- (\a row, \a col) using painter \a p. The painter must be open when
- paintCell() is called and must remain open.
-
- The coordinate system is \link QPainter::translate() translated \endlink
- so that the origin is at the top-left corner of the cell to be
- painted, i.e. \e cell coordinates. Do not scale or shear the coordinate
- system (or if you do, restore the transformation matrix before you
- return).
-
- The painter is not clipped by default in order to get maximum
- efficiency. If you want clipping, use
-
- \code
- p->setClipRect( cellRect(), QPainter::CoordPainter );
- //... your drawing code
- p->setClipping( FALSE );
-
- \endcode
-
-*/
-
-/*! \fn QRect QGridView::cellRect() const
-
- Returns the geometry of a cell in a cell's coordinate system. This
- is a convenience function useful in paintCell(). It is equivalent to
- QRect( 0, 0, cellWidth(), cellHeight() ).
-
- \sa cellGeometry()
-
- */
-
-/*!\fn QSize QGridView::gridSize() const
-
- Returns the size of the grid in pixels.
-
- */
-
-#endif // QT_NO_GRIDVIEW