From 7bc57326e69b9c3f0eaeda63e4a49b67ba611426 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 8 Jun 2024 15:05:55 +0900 Subject: Rename style nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- changes-3.5 | 2 +- doc/changes.doc | 2 +- doc/classchart.doc | 8 +- doc/customstyles.doc | 10 +- doc/features.doc | 4 +- doc/html/annotated.html | 12 +- doc/html/appearance.html | 4 +- doc/html/classchart.html | 8 +- doc/html/classes.html | 12 +- doc/html/customstyles.html | 10 +- doc/html/emb-features.html | 4 +- doc/html/functions.html | 176 +- doc/html/graphics.html | 2 +- doc/html/headerfilesynonyms | 4 +- doc/html/headers.html | 8 +- doc/html/helpsystem.html | 2 +- doc/html/helpviewer-example.html | 2 +- doc/html/hierarchy.html | 12 +- doc/html/index | 234 +- doc/html/listboxcombo-example.html | 2 +- doc/html/mdi-example.html | 2 +- doc/html/ntqaction.html | 2 +- doc/html/ntqapplication.html | 22 +- doc/html/ntqcdestyle.html | 2 +- doc/html/ntqcommonstyle.html | 4 +- doc/html/ntqframe.html | 4 +- doc/html/ntqmessagebox.html | 4 +- doc/html/ntqmotifstyle.html | 2 +- doc/html/ntqpainter.html | 24 +- doc/html/ntqplatinumstyle.html | 2 +- doc/html/ntqpopupmenu.html | 2 +- doc/html/ntqsgistyle.html | 2 +- doc/html/ntqsimplerichtext.html | 10 +- doc/html/ntqsplitter.html | 2 +- doc/html/ntqstyle.html | 1220 -------- doc/html/ntqstylefactory.html | 80 - doc/html/ntqstyleplugin.html | 97 - doc/html/ntqstylesheet.html | 383 --- doc/html/ntqt.html | 6 +- doc/html/ntqwhatsthis.html | 4 +- doc/html/pictures.html | 2 +- doc/html/plugins-howto.html | 12 +- doc/html/plugins.html | 2 +- doc/html/porting.html | 10 +- doc/html/propertydocs | 6 +- doc/html/qaction-application-example.html | 2 +- doc/html/qcdestyle-members.html | 42 +- doc/html/qcommonstyle-h.html | 2 +- doc/html/qcommonstyle-members.html | 42 +- doc/html/qmacstyle-members.html | 42 +- doc/html/qmacstyle.html | 6 +- doc/html/qmotifplusstyle-members.html | 42 +- doc/html/qmotifstyle-members.html | 42 +- doc/html/qnamespace-h.html | 4 +- doc/html/qplatinumstyle-members.html | 42 +- doc/html/qsgistyle-members.html | 42 +- doc/html/qstyle-h.html | 801 ------ doc/html/qstyle-members.html | 111 - doc/html/qstylefactory-h.html | 107 - doc/html/qstylefactory-members.html | 48 - doc/html/qstyleoption-members.html | 64 - doc/html/qstyleoption.html | 297 -- doc/html/qstyleplugin-h.html | 117 - doc/html/qstyleplugin-members.html | 50 - doc/html/qstylesheet-h.html | 298 -- doc/html/qstylesheet-members.html | 99 - doc/html/qstylesheetitem-members.html | 94 - doc/html/qstylesheetitem.html | 491 ---- doc/html/qt.dcf | 280 +- doc/html/qwindowsstyle-members.html | 42 +- doc/html/simple-application-example.html | 2 +- doc/html/simple-application.html | 2 +- doc/html/text.html | 4 +- doc/html/themes-example.html | 144 +- doc/html/titleindex | 32 +- doc/html/tqobject.html | 2 +- doc/html/tqstyle-h.html | 801 ++++++ doc/html/tqstyle-members.html | 111 + doc/html/tqstyle.html | 1220 ++++++++ doc/html/tqstylefactory-h.html | 107 + doc/html/tqstylefactory-members.html | 48 + doc/html/tqstylefactory.html | 80 + doc/html/tqstyleoption-members.html | 64 + doc/html/tqstyleoption.html | 297 ++ doc/html/tqstyleplugin-h.html | 117 + doc/html/tqstyleplugin-members.html | 50 + doc/html/tqstyleplugin.html | 97 + doc/html/tqstylesheet-h.html | 298 ++ doc/html/tqstylesheet-members.html | 99 + doc/html/tqstylesheet.html | 383 +++ doc/html/tqstylesheetitem-members.html | 94 + doc/html/tqstylesheetitem.html | 491 ++++ doc/html/tqtextbrowser.html | 2 +- doc/html/tqtextedit-h.html | 2 +- doc/html/tqtextedit.html | 24 +- doc/html/tqwidget.html | 12 +- doc/html/whatsthis | 12 +- doc/man/man3/tqaction.3qt | 2 +- doc/man/man3/tqapplication.3qt | 30 +- doc/man/man3/tqcdestyle.3qt | 2 +- doc/man/man3/tqcommonstyle.3qt | 4 +- doc/man/man3/tqdict.3qt | 4 +- doc/man/man3/tqframe.3qt | 4 +- doc/man/man3/tqmacstyle.3qt | 8 +- doc/man/man3/tqmessagebox.3qt | 2 +- doc/man/man3/tqmotifstyle.3qt | 2 +- doc/man/man3/tqobject.3qt | 2 +- doc/man/man3/tqpainter.3qt | 24 +- doc/man/man3/tqplatinumstyle.3qt | 2 +- doc/man/man3/tqpopupmenu.3qt | 2 +- doc/man/man3/tqsgistyle.3qt | 2 +- doc/man/man3/tqsimplerichtext.3qt | 14 +- doc/man/man3/tqsplitter.3qt | 2 +- doc/man/man3/tqstyle.3qt | 722 ++--- doc/man/man3/tqstylefactory.3qt | 24 +- doc/man/man3/tqstyleoption.3qt | 120 +- doc/man/man3/tqstyleplugin.3qt | 28 +- doc/man/man3/tqstylesheet.3qt | 58 +- doc/man/man3/tqstylesheetitem.3qt | 196 +- doc/man/man3/tqt.3qt | 6 +- doc/man/man3/tqtextbrowser.3qt | 2 +- doc/man/man3/tqtextedit.3qt | 24 +- doc/man/man3/tqwhatsthis.3qt | 4 +- doc/man/man3/tqwidget.3qt | 20 +- doc/pictures.doc | 2 +- doc/plugins-howto.doc | 14 +- doc/porting3.doc | 14 +- doc/qdict.doc | 4 +- examples/README | 2 +- examples/demo/dnd/styledbutton.cpp | 2 +- examples/demo/frame.cpp | 2 +- examples/demo/textdrawing/helpwindow.cpp | 2 +- examples/helpviewer/helpwindow.cpp | 2 +- examples/listboxcombo/listboxcombo.cpp | 2 +- examples/themes/themes.cpp | 2 +- examples/themes/wood.cpp | 2 +- examples/widgets/main.cpp | 2 +- include/ntqstyle.h | 1 - include/ntqstylefactory.h | 1 - include/ntqstyleplugin.h | 1 - include/ntqstylesheet.h | 1 - include/private/qstyleinterface_p.h | 1 - include/private/tqstyleinterface_p.h | 1 + include/tqstyle.h | 1 + include/tqstylefactory.h | 1 + include/tqstyleplugin.h | 1 + include/tqstylesheet.h | 1 + plugins/src/accessible/widgets/qaccessiblemenu.cpp | 2 +- .../src/accessible/widgets/qaccessiblewidget.cpp | 2 +- plugins/src/styles/cde/main.cpp | 2 +- plugins/src/styles/compact/main.cpp | 2 +- plugins/src/styles/motif/main.cpp | 2 +- plugins/src/styles/motifplus/main.cpp | 2 +- plugins/src/styles/platinum/main.cpp | 2 +- plugins/src/styles/sgi/main.cpp | 2 +- plugins/src/styles/windows/main.cpp | 2 +- src/dialogs/qcolordialog.cpp | 2 +- src/dialogs/qerrormessage.cpp | 2 +- src/dialogs/qfiledialog.cpp | 2 +- src/dialogs/qfontdialog.cpp | 2 +- src/dialogs/qmessagebox.cpp | 2 +- src/dialogs/qprintdialog.cpp | 2 +- src/dialogs/qprogressdialog.cpp | 2 +- src/kernel/ntqnamespace.h | 4 +- src/kernel/ntqstyle.h | 1243 --------- src/kernel/ntqstylesheet.h | 253 -- src/kernel/ntqt.h | 10 +- src/kernel/qapplication.cpp | 4 +- src/kernel/qapplication_x11.cpp | 2 +- src/kernel/qrichtext.cpp | 4 +- src/kernel/qrichtext_p.h | 2 +- src/kernel/qsizegrip.cpp | 2 +- src/kernel/qstyle.cpp | 2911 -------------------- src/kernel/qstylesheet.cpp | 1623 ----------- src/kernel/qt_kernel.pri | 8 +- src/kernel/qt_pch.h | 2 +- src/kernel/tqobject.cpp | 2 +- src/kernel/tqstyle.cpp | 2911 ++++++++++++++++++++ src/kernel/tqstyle.h | 1243 +++++++++ src/kernel/tqstylesheet.cpp | 1623 +++++++++++ src/kernel/tqstylesheet.h | 253 ++ src/kernel/tqwidget.cpp | 4 +- src/qt.pro | 4 +- src/styles/ntqcommonstyle.h | 2 +- src/styles/ntqstylefactory.h | 62 - src/styles/ntqstyleplugin.h | 72 - src/styles/qstylefactory.cpp | 268 -- src/styles/qstyleinterface_p.h | 76 - src/styles/qstyleplugin.cpp | 185 -- src/styles/qt_styles.pri | 10 +- src/styles/tqstylefactory.cpp | 268 ++ src/styles/tqstylefactory.h | 62 + src/styles/tqstyleinterface_p.h | 76 + src/styles/tqstyleplugin.cpp | 185 ++ src/styles/tqstyleplugin.h | 72 + src/table/qtable.cpp | 2 +- src/tools/qfeatures.txt | 2 +- src/widgets/qcheckbox.cpp | 2 +- src/widgets/qcombobox.cpp | 2 +- src/widgets/qdatetimeedit.cpp | 2 +- src/widgets/qdial.cpp | 2 +- src/widgets/qdialogbuttons.cpp | 2 +- src/widgets/qdockwindow.cpp | 2 +- src/widgets/qframe.cpp | 2 +- src/widgets/qgroupbox.cpp | 2 +- src/widgets/qheader.cpp | 2 +- src/widgets/qlabel.cpp | 4 +- src/widgets/qlineedit.cpp | 2 +- src/widgets/qlistbox.cpp | 2 +- src/widgets/qlistview.cpp | 4 +- src/widgets/qmainwindow.cpp | 2 +- src/widgets/qmenubar.cpp | 2 +- src/widgets/qpopupmenu.cpp | 2 +- src/widgets/qprogressbar.cpp | 2 +- src/widgets/qpushbutton.cpp | 2 +- src/widgets/qradiobutton.cpp | 2 +- src/widgets/qscrollbar.cpp | 2 +- src/widgets/qscrollview.cpp | 2 +- src/widgets/qslider.cpp | 2 +- src/widgets/qspinbox.cpp | 2 +- src/widgets/qspinwidget.cpp | 2 +- src/widgets/qsplitter.cpp | 2 +- src/widgets/qstatusbar.cpp | 2 +- src/widgets/qtabbar.cpp | 2 +- src/widgets/qtabwidget.cpp | 2 +- src/widgets/qtitlebar.cpp | 4 +- src/widgets/qtoolbar.cpp | 2 +- src/widgets/qtoolbox.cpp | 2 +- src/widgets/qtoolbutton.cpp | 2 +- src/widgets/qwhatsthis.cpp | 2 +- src/widgets/tqiconview.cpp | 2 +- src/widgets/tqtextedit.cpp | 4 +- src/widgets/tqtextedit.h | 2 +- src/workspace/qworkspace.cpp | 2 +- tools/assistant/mainwindow.ui | 2 +- tools/assistant/tabbedbrowser.ui | 2 +- tools/assistant/tabbedbrowser.ui.h | 2 +- tools/designer/designer/actiondnd.cpp | 2 +- tools/designer/designer/mainwindow.cpp | 4 +- tools/designer/designer/mainwindowactions.cpp | 2 +- tools/designer/designer/menubareditor.cpp | 2 +- tools/designer/designer/popupmenueditor.cpp | 2 +- tools/designer/designer/propertyeditor.cpp | 2 +- tools/designer/designer/styledbutton.cpp | 2 +- tools/designer/designer/widgetaction.cpp | 4 +- tools/qtconfig/colorbutton.cpp | 2 +- tools/qtconfig/mainwindow.cpp | 4 +- 247 files changed, 12597 insertions(+), 12597 deletions(-) delete mode 100644 doc/html/ntqstyle.html delete mode 100644 doc/html/ntqstylefactory.html delete mode 100644 doc/html/ntqstyleplugin.html delete mode 100644 doc/html/ntqstylesheet.html delete mode 100644 doc/html/qstyle-h.html delete mode 100644 doc/html/qstyle-members.html delete mode 100644 doc/html/qstylefactory-h.html delete mode 100644 doc/html/qstylefactory-members.html delete mode 100644 doc/html/qstyleoption-members.html delete mode 100644 doc/html/qstyleoption.html delete mode 100644 doc/html/qstyleplugin-h.html delete mode 100644 doc/html/qstyleplugin-members.html delete mode 100644 doc/html/qstylesheet-h.html delete mode 100644 doc/html/qstylesheet-members.html delete mode 100644 doc/html/qstylesheetitem-members.html delete mode 100644 doc/html/qstylesheetitem.html create mode 100644 doc/html/tqstyle-h.html create mode 100644 doc/html/tqstyle-members.html create mode 100644 doc/html/tqstyle.html create mode 100644 doc/html/tqstylefactory-h.html create mode 100644 doc/html/tqstylefactory-members.html create mode 100644 doc/html/tqstylefactory.html create mode 100644 doc/html/tqstyleoption-members.html create mode 100644 doc/html/tqstyleoption.html create mode 100644 doc/html/tqstyleplugin-h.html create mode 100644 doc/html/tqstyleplugin-members.html create mode 100644 doc/html/tqstyleplugin.html create mode 100644 doc/html/tqstylesheet-h.html create mode 100644 doc/html/tqstylesheet-members.html create mode 100644 doc/html/tqstylesheet.html create mode 100644 doc/html/tqstylesheetitem-members.html create mode 100644 doc/html/tqstylesheetitem.html delete mode 120000 include/ntqstyle.h delete mode 120000 include/ntqstylefactory.h delete mode 120000 include/ntqstyleplugin.h delete mode 120000 include/ntqstylesheet.h delete mode 120000 include/private/qstyleinterface_p.h create mode 120000 include/private/tqstyleinterface_p.h create mode 120000 include/tqstyle.h create mode 120000 include/tqstylefactory.h create mode 120000 include/tqstyleplugin.h create mode 120000 include/tqstylesheet.h delete mode 100644 src/kernel/ntqstyle.h delete mode 100644 src/kernel/ntqstylesheet.h delete mode 100644 src/kernel/qstyle.cpp delete mode 100644 src/kernel/qstylesheet.cpp create mode 100644 src/kernel/tqstyle.cpp create mode 100644 src/kernel/tqstyle.h create mode 100644 src/kernel/tqstylesheet.cpp create mode 100644 src/kernel/tqstylesheet.h delete mode 100644 src/styles/ntqstylefactory.h delete mode 100644 src/styles/ntqstyleplugin.h delete mode 100644 src/styles/qstylefactory.cpp delete mode 100644 src/styles/qstyleinterface_p.h delete mode 100644 src/styles/qstyleplugin.cpp create mode 100644 src/styles/tqstylefactory.cpp create mode 100644 src/styles/tqstylefactory.h create mode 100644 src/styles/tqstyleinterface_p.h create mode 100644 src/styles/tqstyleplugin.cpp create mode 100644 src/styles/tqstyleplugin.h diff --git a/changes-3.5 b/changes-3.5 index 15164c40..9aee75af 100644 --- a/changes-3.5 +++ b/changes-3.5 @@ -1,5 +1,5 @@ Qt 3.5 is a new feature release. It is not backwards compatible with any -prior TQt3 version due to changes in the QStyle API. +prior Qt3 version due to changes in the QStyle API. **************************************************************************** * General * diff --git a/doc/changes.doc b/doc/changes.doc index 82c767f0..402f096b 100644 --- a/doc/changes.doc +++ b/doc/changes.doc @@ -131,7 +131,7 @@ loading of shared libraries. Access to the shared libraries uses a COM-like interface. QPluginManager makes it trivial to implement plugin support in applications. The TQt library is able to load additional styles, database drivers and text codecs from plugins which -implement the relevant interfaces, e.g. QStyleFactoryInterface, +implement the relevant interfaces, e.g. TQStyleFactoryInterface, TQSqlDriverInterface or TQTextCodecInterface. It is possible to remove unused components from the TQt library, and easy to extend any application with 3rd party styles, database drivers or text codecs. diff --git a/doc/classchart.doc b/doc/classchart.doc index e9dad385..9f9b0c1d 100644 --- a/doc/classchart.doc +++ b/doc/classchart.doc @@ -69,7 +69,7 @@ - + @@ -122,8 +122,8 @@ - - + + @@ -229,7 +229,7 @@ - + diff --git a/doc/customstyles.doc b/doc/customstyles.doc index ea0bf0c9..2b4b02b3 100644 --- a/doc/customstyles.doc +++ b/doc/customstyles.doc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Documentation for creating custom styles with QStyle +** Documentation for creating custom styles with TQStyle ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** @@ -74,7 +74,7 @@ example we will inherit from QWindowsStyle. Depending on which parts of the base style you want to change, you must re-implement the functions that are used to draw those parts -of the interface. If you take a look at the \l{QStyle} documentation, +of the interface. If you take a look at the \l{TQStyle} documentation, you will find a list of the different primitives, controls and complex controls. In this example we will first change the look of the standard arrows that are used in the QWindowsStyle. The arrows are @@ -96,7 +96,7 @@ public: const QRect & r, const QColorGroup & cg, SFlags flags = Style_Default, - const QStyleOption & = QStyleOption::Default ) const; + const TQStyleOption & = TQStyleOption::Default ) const; private: // Disabled copy constructor and operator= @@ -110,7 +110,7 @@ style. TQObject is the base class for all style classes in Qt, and a TQObject inherently cannot be copied since there are some aspects of it that are not copyable. -From the QStyle docs we see that \c PE_ArrowUp, \c PE_ArrowDown, \c +From the TQStyle docs we see that \c PE_ArrowUp, \c PE_ArrowDown, \c PE_ArrowLeft and \c PE_ArrowRight are the primitives we need to do something with. We get the following in our drawPrimitive() function: @@ -128,7 +128,7 @@ void CustomStyle::drawPrimitive( PrimitiveElement pe, const QRect & r, const QColorGroup & cg, SFlags flags, - const QStyleOption & opt ) const + const TQStyleOption & opt ) const { // we are only interested in the arrows if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) { diff --git a/doc/features.doc b/doc/features.doc index 8af5d3e3..cadb3aaf 100644 --- a/doc/features.doc +++ b/doc/features.doc @@ -113,7 +113,7 @@ The available options are: and tagging typed data (eg. text, images, colors) (\l QMimeSource) \i   \row \i TQT_NO_RICHTEXT - \i HTML-like text (\l QStyleSheet, \l QLabel) + \i HTML-like text (\l TQStyleSheet, \l QLabel) \i TQT_NO_MIME \row \i TQT_NO_DRAGANDDROP \i Drag-and-drop data between applications (\l QDragObject) @@ -176,7 +176,7 @@ The available options are: \header \i31 Painting/drawing \row \i TQT_NO_COLORNAMES \i Color names such as "red", used by some \l TQColor constructors - and by some HTML documents (\l TQColor, \l QStyleSheet) + and by some HTML documents (\l TQColor, \l TQStyleSheet) \i   \row \i TQT_NO_TRANSFORMATIONS \i Used by a number of classes in Qt. With this, rotation and diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 231fe7f2..7517ba52 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -362,12 +362,12 @@ body { background: #ffffff; color: black; } TQStrListIteratorIterator for the TQStrList and TQStrIList classes TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array TQStringListList of strings -TQStyleThe look and feel of a GUI -TQStyleFactoryCreates TQStyle objects -TQStyleOptionOptional parameters for TQStyle functions -TQStylePluginAbstract base for custom TQStyle plugins -TQStyleSheetCollection of styles for rich text rendering and a generator of tags -TQStyleSheetItemEncapsulation of a set of text styles +TQStyleThe look and feel of a GUI +TQStyleFactoryCreates TQStyle objects +TQStyleOptionOptional parameters for TQStyle functions +TQStylePluginAbstract base for custom TQStyle plugins +TQStyleSheetCollection of styles for rich text rendering and a generator of tags +TQStyleSheetItemEncapsulation of a set of text styles TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters TQTabThe structures in a TQTabBar TQTabBarTab bar, e.g. for use in tabbed dialogs diff --git a/doc/html/appearance.html b/doc/html/appearance.html index 61552401..40bcbaeb 100644 --- a/doc/html/appearance.html +++ b/doc/html/appearance.html @@ -64,8 +64,8 @@ style. TQSizeGripCorner-grip for resizing a top-level window TQSizePolicyLayout attribute describing horizontal and vertical resizing policy TQSpacerItemBlank space in a layout -TQStyleThe look and feel of a GUI -TQStyleOptionOptional parameters for TQStyle functions +TQStyleThe look and feel of a GUI +TQStyleOptionOptional parameters for TQStyle functions TQVBoxVertical geometry management of its child widgets TQVBoxLayoutLines up widgets vertically TQVButtonGroupOrganizes TQButton widgets in a vertical column diff --git a/doc/html/classchart.html b/doc/html/classchart.html index ede41237..0a7f061e 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -59,7 +59,7 @@ body { background: #ffffff; color: black; } - + @@ -112,8 +112,8 @@ body { background: #ffffff; color: black; } - - + + @@ -219,7 +219,7 @@ body { background: #ffffff; color: black; } - + diff --git a/doc/html/classes.html b/doc/html/classes.html index e2626d7a..26a56a3e 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -869,7 +869,7 @@ classes, see TQt's Main Classes. P TQPaintDevice -TQStyle +TQStyle TQXmlLocator @@ -880,7 +880,7 @@ classes, see TQt's Main Classes. TQPaintDeviceMetrics -TQStyleFactory +TQStyleFactory TQXmlNamespaceSupport @@ -891,7 +891,7 @@ classes, see TQt's Main Classes. TQPainter -TQStyleOption +TQStyleOption TQXmlParseException @@ -902,7 +902,7 @@ classes, see TQt's Main Classes. TQPaintEvent -TQStylePlugin +TQStylePlugin TQXmlReader @@ -913,7 +913,7 @@ classes, see TQt's Main Classes. TQPair -TQStyleSheet +TQStyleSheet TQXmlSimpleReader @@ -924,7 +924,7 @@ classes, see TQt's Main Classes. TQPalette -TQStyleSheetItem +TQStyleSheetItem diff --git a/doc/html/customstyles.html b/doc/html/customstyles.html index 16de1540..6ff40962 100644 --- a/doc/html/customstyles.html +++ b/doc/html/customstyles.html @@ -63,7 +63,7 @@ example we will inherit from TQWindowsStyle.

Depending on which parts of the base style you want to change, you must re-implement the functions that are used to draw those parts -of the interface. If you take a look at the TQStyle documentation, +of the interface. If you take a look at the TQStyle documentation, you will find a list of the different primitives, controls and complex controls. In this example we will first change the look of the standard arrows that are used in the TQWindowsStyle. The arrows are @@ -84,7 +84,7 @@ public: const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, - const TQStyleOption & = TQStyleOption::Default ) const; + const TQStyleOption & = TQStyleOption::Default ) const; private: // Disabled copy constructor and operator= @@ -97,7 +97,7 @@ private: style. TQObject is the base class for all style classes in TQt, and a TQObject inherently cannot be copied since there are some aspects of it that are not copyable. -

From the TQStyle docs we see that PE_ArrowUp, PE_ArrowDown, PE_ArrowLeft and PE_ArrowRight are the primitives we need to do +

From the TQStyle docs we see that PE_ArrowUp, PE_ArrowDown, PE_ArrowLeft and PE_ArrowRight are the primitives we need to do something with. We get the following in our drawPrimitive() function:

 CustomStyle::CustomStyle()
@@ -113,7 +113,7 @@ void CustomStyle::drawPrimitive( PrimitiveElement pe,
                                  const TQRect & r,
                                  const TQColorGroup & cg,
                                  SFlags flags,
-                                 const TQStyleOption & opt ) const
+                                 const TQStyleOption & opt ) const
 {
     // we are only interested in the arrows
     if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) {
@@ -164,7 +164,7 @@ void CustomStyle::drawPrimitive( PrimitiveElement pe,
         p->drawPolygon( pa );
     } else {
         // let the base style handle the other primitives
-        TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, data );
+        TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, data );
     }
 }
 
diff --git a/doc/html/emb-features.html b/doc/html/emb-features.html index 7c778ab1..a560ee84 100644 --- a/doc/html/emb-features.html +++ b/doc/html/emb-features.html @@ -96,7 +96,7 @@ for all Unicode characters. and tagging typed data (eg. text, images, colors) (TQMimeSource)   TQT_NO_RICHTEXT -HTML-like text (TQStyleSheet, TQLabel) +HTML-like text (TQStyleSheet, TQLabel) TQT_NO_MIME TQT_NO_DRAGANDDROP Drag-and-drop data between applications (TQDragObject) @@ -154,7 +154,7 @@ with local file retrieval included (TQNetworkP Painting/drawing TQT_NO_COLORNAMES Color names such as "red", used by some TQColor constructors -and by some HTML documents (TQColor, TQStyleSheet) +and by some HTML documents (TQColor, TQStyleSheet)   TQT_NO_TRANSFORMATIONS Used by a number of classes in TQt. With this, rotation and diff --git a/doc/html/functions.html b/doc/html/functions.html index 54888907..920d5484 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -132,7 +132,7 @@ abort: TQMessageBox TQSimpleRichText TQWidget
  • advance: TQCanvas TQCanvasItem TQCanvasSprite
  • afterSeek: TQSqlQuery
  • alignment: - TQGroupBox TQLabel TQLayoutItem TQLineEdit TQMultiLineEdit TQStyleSheetItem TQTableItem TQTextEdit
  • alignmentRect: + TQGroupBox TQLabel TQLayoutItem TQLineEdit TQMultiLineEdit TQStyleSheetItem TQTableItem TQTextEdit
  • alignmentRect: TQLayout
  • all: TQMacMime TQWindowsMime
  • allColumnsShowFocus: TQListView
  • allGray: @@ -141,7 +141,7 @@ abort: TQApplication
  • alloc: TQColor TQScreen
  • allocation: TQWSWindow
  • allowedInContext: - TQStyleSheetItem
  • allowsErrorInteraction: + TQStyleSheetItem
  • allowsErrorInteraction: TQSessionManager
  • allowsInteraction: TQSessionManager
  • alpha: TQGLFormat
  • anchorAt: @@ -173,7 +173,7 @@ abort: TQApplication TQNPInstance
  • arrangeItemsInGrid: TQIconView
  • arrangement: TQIconView
  • arrowType: - TQStyleOption
  • asBitArray: + TQStyleOption
  • asBitArray: TQVariant
  • asBitmap: TQVariant
  • asBool: TQVariant
  • asBrush: @@ -371,7 +371,7 @@ c: TQXmlContentHandler
  • checkConnectArgs: TQObject
  • checkConnection: TQNetworkProtocol
  • checkListItem: - TQStyleOption
  • checkOverflow: + TQStyleOption
  • checkOverflow: TQLCDNumber
  • child: TQChildEvent TQObject
  • childAt: TQWidget
  • childCount: @@ -454,7 +454,7 @@ c: TQListView
  • collidesWith: TQCanvasItem
  • collisions: TQCanvas TQCanvasItem
  • color: - TQBrush TQCanvasText TQColorGroup TQImage TQPalette TQPen TQStyleOption TQStyleSheetItem TQTextEdit
  • colorGroup: + TQBrush TQCanvasText TQColorGroup TQImage TQPalette TQPen TQStyleOption TQStyleSheetItem TQTextEdit
  • colorGroup: TQWidget
  • colorMode: TQPrinter
  • colorNames: TQColor
  • colorSpec: @@ -535,7 +535,7 @@ c: TQGLWidget TQSimpleRichText TQTextEdit TQTranslatorMessage
  • contextMenuEvent: TQWidget
  • contextMenuRequested: TQIconView TQListBox TQListView TQTable
  • contexts: - TQStyleSheetItem
  • control: + TQStyleSheetItem
  • control: TQAxBase
  • controlAt: TQAccessibleInterface
  • controlPoints: TQCanvasSpline
  • controllingUnknown: @@ -545,7 +545,7 @@ c: TQImage
  • convertFromImage: TQPixmap
  • convertFromMime: TQMacMime TQWindowsMime
  • convertFromPlainText: - TQStyleSheet
  • convertSeparators: + TQStyleSheet
  • convertSeparators: TQDir
  • convertToAbs: TQDir TQFileInfo
  • convertToGLFormat: TQGLWidget
  • convertToImage: @@ -563,7 +563,7 @@ c: TQMacMime
  • country: TQLocale
  • countryToString: TQLocale
  • create: - TQAxFactory TQGLContext TQGfxDriverFactory TQGfxDriverPlugin TQImage TQKbdDriverFactory TQKbdDriverPlugin TQMouseDriverFactory TQMouseDriverPlugin TQNPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidget TQWidgetFactory TQWidgetPlugin
  • createAggregate: + TQAxFactory TQGLContext TQGfxDriverFactory TQGfxDriverPlugin TQImage TQKbdDriverFactory TQKbdDriverPlugin TQMouseDriverFactory TQMouseDriverPlugin TQNPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidget TQWidgetFactory TQWidgetPlugin
  • createAggregate: TQAxBindable
  • createAlphaMask: TQImage
  • createAttribute: TQDomDocument
  • createAttributeNS: @@ -670,7 +670,7 @@ dark: TQDateTimeEdit
  • dateFormat: TQDataTable
  • dateTime: TQDateTimeEdit
  • day: - TQDate TQStyleOption
  • dayOfWeek: + TQDate TQStyleOption
  • dayOfWeek: TQDate
  • dayOfYear: TQDate
  • daysInMonth: TQDate
  • daysInYear: @@ -695,12 +695,12 @@ dark: TQPixmap
  • defaultOverlayFormat: TQGLFormat
  • defaultRenameAction: TQListView
  • defaultSheet: - TQStyleSheet
  • defaultValue: + TQStyleSheet
  • defaultValue: TQSqlFieldInfo
  • defineIOHandler: TQImageIO
  • definesFontItalic: - TQStyleSheetItem
  • definesFontStrikeOut: - TQStyleSheetItem
  • definesFontUnderline: - TQStyleSheetItem
  • del: + TQStyleSheetItem
  • definesFontStrikeOut: + TQStyleSheetItem
  • definesFontUnderline: + TQStyleSheetItem
  • del: TQDataBrowser TQLineEdit TQSqlCursor TQTextEdit
  • delay: TQToolTipGroup
  • delayedCloseFinished: TQSocket
  • deleteAllCodecs: @@ -755,7 +755,7 @@ dark: TQMovie
  • disconnectUpdate: TQMovie
  • display: TQLCDNumber TQTimeEdit TQWhatsThis
  • displayMode: - TQStyleSheetItem
  • displayText: + TQStyleSheetItem
  • displayText: TQLineEdit
  • doAutoScroll: TQIconView TQListView
  • doDefaultAction: TQAccessibleInterface
  • doKeyboardAction: @@ -798,19 +798,19 @@ dark: TQButton
  • drawButtonLabel: TQButton
  • drawChord: TQPainter
  • drawComplexControl: - TQStyle
  • drawComplexControlMask: - TQStyle
  • drawContents: + TQStyle
  • drawComplexControlMask: + TQStyle
  • drawContents: TQCanvasView TQFrame TQLCDNumber TQLabel TQMenuBar TQPopupMenu TQScrollView TQSplashScreen TQTable
  • drawContentsOffset: TQListView TQScrollView
  • drawControl: - TQStyle
  • drawControlMask: - TQStyle
  • drawConvexPolygon: + TQStyle
  • drawControlMask: + TQStyle
  • drawConvexPolygon: TQPainter
  • drawCubicBezier: TQPainter
  • drawEllipse: TQPainter
  • drawForeground: TQCanvas
  • drawFrame: TQFrame
  • drawImage: TQPainter
  • drawItem: - TQPopupMenu TQStyle
  • drawLine: + TQPopupMenu TQStyle
  • drawLine: TQPainter
  • drawLineSegments: TQPainter
  • drawPicture: TQPainter
  • drawPie: @@ -820,7 +820,7 @@ dark: TQPainter
  • drawPolygon: TQPainter
  • drawPolyline: TQPainter
  • drawPrimitive: - TQStyle
  • drawRect: + TQStyle
  • drawRect: TQPainter
  • drawRiffles: TQPlatinumStyle
  • drawRoundRect: TQPainter
  • drawRubber: @@ -907,11 +907,11 @@ echoMode: TQWidget
  • eraseRect: TQPainter
  • erased: TQPaintEvent
  • error: - TQAssistantClient TQAxScript TQAxScriptManager TQFtp TQHttp TQSocket TQSocketDevice TQStyleSheet TQXmlErrorHandler
  • errorCode: + TQAssistantClient TQAxScript TQAxScriptManager TQFtp TQHttp TQSocket TQSocketDevice TQStyleSheet TQXmlErrorHandler
  • errorCode: TQNetworkOperation
  • errorHandler: TQXmlReader
  • errorString: TQFile TQFtp TQHttp TQRegExp TQXmlContentHandler TQXmlDTDHandler TQXmlDeclHandler TQXmlEntityResolver TQXmlErrorHandler TQXmlLexicalHandler
  • escape: - TQRegExp TQStyleSheet
  • event: + TQRegExp TQStyleSheet
  • event: TQObject TQWidget
  • eventFilter: TQListView TQObject TQScrollView TQSpinBox
  • eventLoop: TQApplication
  • eventsID: @@ -1000,14 +1000,14 @@ falseText: TQApplication TQFocusData TQWidget
  • font: TQApplication TQCanvasText TQFontDatabase TQPainter TQToolTip TQWidget
  • fontChange: TQWidget
  • fontFamily: - TQStyleSheetItem
  • fontInfo: + TQStyleSheetItem
  • fontInfo: TQPainter TQWidget
  • fontItalic: - TQStyleSheetItem
  • fontMetrics: + TQStyleSheetItem
  • fontMetrics: TQApplication TQPainter TQWidget
  • fontSize: - TQStyleSheetItem
  • fontStrikeOut: - TQStyleSheetItem
  • fontUnderline: - TQStyleSheetItem
  • fontWeight: - TQStyleSheetItem
  • forceShow: + TQStyleSheetItem
  • fontStrikeOut: + TQStyleSheetItem
  • fontUnderline: + TQStyleSheetItem
  • fontWeight: + TQStyleSheetItem
  • forceShow: TQProgressDialog
  • foreground: TQColorGroup
  • foregroundColor: TQWidget
  • form: @@ -1027,8 +1027,8 @@ falseText: TQMovie
  • framePixmap: TQMovie
  • frameRect: TQFrame
  • frameShadow: - TQFrame TQStyleOption
  • frameShape: - TQFrame TQStyleOption
  • frameSize: + TQFrame TQStyleOption
  • frameShape: + TQFrame TQStyleOption
  • frameSize: TQWidget
  • frameStyle: TQFrame
  • frameWidth: TQFrame
  • free: @@ -1167,7 +1167,7 @@ hScrollBarMode: TQTranslatorMessage
  • head: TQHttp TQPtrQueue
  • header: TQListView
  • headerSection: - TQStyleOption
  • headerWidth: + TQStyleOption
  • headerWidth: TQHeader
  • height: TQCanvas TQCanvasEllipse TQCanvasRectangle TQCanvasSprite TQDirectPainter TQFontMetrics TQIconViewItem TQImage TQListBoxItem TQListBoxPixmap TQListBoxText TQListViewItem TQPaintDeviceMetrics TQPixmap TQRect TQScreen TQSimpleRichText TQSize TQWidget
  • heightForWidth: TQBoxLayout TQGridLayout TQLayoutItem TQMenuBar TQTextEdit TQWidget
  • heightMM: @@ -1312,7 +1312,7 @@ icon: TQDropEvent
  • isActive: TQAccessible TQCanvasItem TQPainter TQSqlQuery TQSqlResult TQTableSelection TQTimer
  • isActiveWindow: TQWidget TQXtWidget
  • isAnchor: - TQStyleSheetItem
  • isAsynchronous: + TQStyleSheetItem
  • isAsynchronous: TQIODevice
  • isAttr: TQDomAttr TQDomNode
  • isAutoRepeat: TQKeyEvent
  • isAvailable: @@ -1339,7 +1339,7 @@ icon: TQListBoxItem
  • isCursorVisible: TQWSServer
  • isCustomizable: TQMainWindow
  • isDefault: - TQPushButton TQStyleOption
  • isDefaultUp: + TQPushButton TQStyleOption
  • isDefaultUp: TQMenuBar
  • isDescending: TQSqlIndex
  • isDesktop: TQWidget
  • isDialog: @@ -1487,7 +1487,7 @@ icon: TQDns
  • isWritable: TQFileInfo TQIODevice TQUrlInfo
  • italic: TQFont TQFontDatabase TQFontInfo TQTextEdit
  • item: - TQDomNamedNodeMap TQDomNodeList TQListBox TQStyleSheet TQTable TQToolBox
  • itemAbove: + TQDomNamedNodeMap TQDomNodeList TQListBox TQStyleSheet TQTable TQToolBox
  • itemAbove: TQListViewItem
  • itemAt: TQListBox TQListView
  • itemBelow: TQListViewItem
  • itemChanged: @@ -1499,7 +1499,7 @@ icon: TQListView
  • itemParameter: TQMenuData TQPopupMenu
  • itemPos: TQListView TQListViewItem
  • itemRect: - TQListBox TQListView TQStyle
  • itemRemoved: + TQListBox TQListView TQStyle
  • itemRemoved: TQToolBox
  • itemRenamed: TQIconView TQListView
  • itemTextBackground: TQIconView
  • itemTextPos: @@ -1522,7 +1522,7 @@ key: TQTabBar
  • keyboardGrabber: TQWidget
  • keyboardHandler: TQWSServer
  • keys: - TQGfxDriverFactory TQGfxDriverPlugin TQHttpHeader TQImageFormatPlugin TQKbdDriverFactory TQKbdDriverPlugin TQMap TQMouseDriverFactory TQMouseDriverPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidgetPlugin
  • keysToValue: + TQGfxDriverFactory TQGfxDriverPlugin TQHttpHeader TQImageFormatPlugin TQKbdDriverFactory TQKbdDriverPlugin TQMap TQMouseDriverFactory TQMouseDriverPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidgetPlugin
  • keysToValue: TQMetaProperty
  • kill: TQProcess
  • killLine: TQMultiLineEdit
  • killTimer: @@ -1581,7 +1581,7 @@ label: TQDial TQDirectPainter TQRangeControl TQScrollBar TQSlider TQSpinBox
  • lineUp: TQDockArea
  • lineUpDockWindows: TQMainWindow
  • lineWidth: - TQFontMetrics TQFrame TQStyleOption
  • lines: + TQFontMetrics TQFrame TQStyleOption
  • lines: TQTextEdit
  • linesOfParagraph: TQTextEdit
  • linestep: TQScreen
  • link: @@ -1593,9 +1593,9 @@ label: TQComboBox TQListBoxItem
  • listChildren: TQUrlOperator
  • listInfo: TQFtp
  • listStyle: - TQStyleSheetItem
  • listView: + TQStyleSheetItem
  • listView: TQListViewItem
  • listViewItem: - TQStyleOption
  • listen: + TQStyleOption
  • listen: TQSocketDevice
  • load: TQAxScript TQAxScriptManager TQImage TQLibrary TQPicture TQPixmap TQTranslator
  • loadCharmap: TQTextCodec
  • loadCharmapFile: @@ -1612,8 +1612,8 @@ label: TQApplication TQMutex
  • logicalDpiX: TQPaintDeviceMetrics
  • logicalDpiY: TQPaintDeviceMetrics
  • logicalFontSize: - TQStyleSheetItem
  • logicalFontSizeStep: - TQStyleSheetItem
  • login: + TQStyleSheetItem
  • logicalFontSizeStep: + TQStyleSheetItem
  • login: TQFtp
  • longDayName: TQDate
  • longMonthName: TQDate
  • loopLevel: @@ -1660,7 +1660,7 @@ m11: TQHeader
  • mapValueToText: TQSpinBox
  • mapped: TQSignalMapper
  • margin: - TQFrame TQLayout TQStyleSheetItem TQTabWidget
  • margins: + TQFrame TQLayout TQStyleSheetItem TQTabWidget
  • margins: TQPrinter
  • markedText: TQMultiLineEdit
  • mask: TQCursor TQPixmap
  • match: @@ -1671,7 +1671,7 @@ m11: TQColor
  • maxCost: TQAsciiCache TQCache TQIntCache
  • maxCount: TQComboBox
  • maxIconWidth: - TQStyleOption
  • maxItemTextLength: + TQStyleOption
  • maxItemTextLength: TQIconView
  • maxItemWidth: TQIconView TQListBox
  • maxLength: TQLineEdit
  • maxLogLines: @@ -1695,7 +1695,7 @@ m11: TQMenuBar TQMenuData
  • menuDelPopup: TQMenuData
  • menuInsPopup: TQMenuData
  • menuItem: - TQStyleOption
  • menuStateChanged: + TQStyleOption
  • menuStateChanged: TQMenuBar TQMenuData
  • menuText: TQAction
  • message: TQErrorMessage TQSplashScreen TQStatusBar TQXmlParseException
  • messageChanged: @@ -1708,9 +1708,9 @@ m11: TQTextCodecPlugin
  • microFocusHint: TQWidget
  • mid: TQCString TQColorGroup TQString
  • midLineWidth: - TQFrame TQStyleOption
  • midlight: + TQFrame TQStyleOption
  • midlight: TQColorGroup
  • mightBeRichText: - TQStyleSheet
  • mimeFor: + TQStyleSheet
  • mimeFor: TQMacMime TQWindowsMime
  • mimeName: TQEucJpCodec TQEucKrCodec TQHebrewCodec TQJisCodec TQSjisCodec TQTextCodec
  • mimeSourceFactory: TQTextEdit
  • minLeftBearing: @@ -1774,7 +1774,7 @@ m11: TQListViewItem
  • mutex: TQMutexLocker
  • name: - TQColor TQDomAttr TQDomDocumentType TQFile TQLocale TQMetaProperty TQObject TQSqlCursor TQSqlField TQSqlFieldInfo TQSqlIndex TQStyleSheetItem TQTextCodec TQUrlInfo TQWSWindow
  • nameFilter: + TQColor TQDomAttr TQDomDocumentType TQFile TQLocale TQMetaProperty TQObject TQSqlCursor TQSqlField TQSqlFieldInfo TQSqlIndex TQStyleSheetItem TQTextCodec TQUrlInfo TQWSWindow
  • nameFilter: TQDir TQUrlOperator
  • nameToType: TQVariant
  • namedItem: TQDomNamedNodeMap TQDomNode
  • namedItemNS: @@ -1895,7 +1895,7 @@ object: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage TQUuid
  • operator<<: TQBitArray TQBrush TQCString TQColor TQColorGroup TQCursor TQDataStream TQDate TQDateTime TQDockArea TQDomNode TQFont TQImage TQKeySequence TQMainWindow TQMap TQMemArray TQPalette TQPen TQPicture TQPixmap TQPoint TQPointArray TQRect TQRegion TQSize TQSplitter TQString TQTextStream TQTime TQUuid TQValueList TQWMatrix
  • operator<=: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage
  • operator=: - TQAsciiCacheIterator TQAsciiDict TQBitArray TQBitVal TQBitmap TQBrush TQCString TQCacheIterator TQColor TQColorGroup TQCursor TQDeepCopy TQDict TQDir TQDomAttr TQDomCDATASection TQDomCharacterData TQDomComment TQDomDocument TQDomDocumentFragment TQDomDocumentType TQDomElement TQDomEntity TQDomEntityReference TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQDomNotation TQDomProcessingInstruction TQDomText TQFileInfo TQFont TQFontInfo TQFontMetrics TQGLColormap TQGuardedPtr TQHostAddress TQHttpHeader TQIconSet TQImage TQIntCacheIterator TQIntDict fnord TQKeySequence TQLayoutIterator TQListViewItemIterator TQLocale TQMap TQMemArray TQMovie TQObjectList TQObjectListIterator TQPair TQPalette TQPen TQPicture TQPixmap TQPointArray TQPtrDict TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRegExp TQRegion TQSqlCursor TQSqlError TQSqlField TQSqlFieldInfo TQSqlIndex TQSqlQuery TQSqlRecord TQStrList TQString TQStyleSheetItem TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueVector TQVariant
  • operator==: + TQAsciiCacheIterator TQAsciiDict TQBitArray TQBitVal TQBitmap TQBrush TQCString TQCacheIterator TQColor TQColorGroup TQCursor TQDeepCopy TQDict TQDir TQDomAttr TQDomCDATASection TQDomCharacterData TQDomComment TQDomDocument TQDomDocumentFragment TQDomDocumentType TQDomElement TQDomEntity TQDomEntityReference TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQDomNotation TQDomProcessingInstruction TQDomText TQFileInfo TQFont TQFontInfo TQFontMetrics TQGLColormap TQGuardedPtr TQHostAddress TQHttpHeader TQIconSet TQImage TQIntCacheIterator TQIntDict fnord TQKeySequence TQLayoutIterator TQListViewItemIterator TQLocale TQMap TQMemArray TQMovie TQObjectList TQObjectListIterator TQPair TQPalette TQPen TQPicture TQPixmap TQPointArray TQPtrDict TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRegExp TQRegion TQSqlCursor TQSqlError TQSqlField TQSqlFieldInfo TQSqlIndex TQSqlQuery TQSqlRecord TQStrList TQString TQStyleSheetItem TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueVector TQVariant
  • operator==: TQBrush TQCString TQChar TQColor TQColorGroup TQDate TQDateTime TQDir TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQFont TQGuardedPtr TQHostAddress TQImage TQKeySequence TQMapConstIterator TQMapIterator TQMemArray TQPalette TQPen TQPoint TQPtrList TQPtrVector TQRect TQRegExp TQRegion TQSize TQSizePolicy TQSqlField TQSqlFieldInfo TQString TQTableSelection TQTime TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueListConstIterator TQValueListIterator TQValueVector TQVariant TQWMatrix
  • operator>: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage TQUuid
  • operator>=: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage
  • operator>>: @@ -1989,7 +1989,7 @@ packImage: TQIconViewItem TQLabel
  • pixel: TQColor TQImage
  • pixelIndex: TQImage
  • pixelMetric: - TQStyle
  • pixelSize: + TQStyle
  • pixelSize: TQFont TQFontInfo
  • pixelType: TQScreen
  • pixmap: TQBrush TQButton TQCheckBox TQClipboard TQComboBox TQDragObject TQFileIconProvider TQIconSet TQIconViewItem TQLabel TQListBox TQListBoxItem TQListBoxPixmap TQListViewItem TQMenuData TQPopupMenu TQPushButton TQRadioButton TQSplashScreen TQTable TQTableItem
  • pixmapDepth: @@ -2009,8 +2009,8 @@ packImage: TQFont
  • pointSizes: TQFontDatabase
  • points: TQCanvasPolygon
  • polish: - TQApplication TQStyle TQWidget
  • polishPopupMenu: - TQStyle
  • pop: + TQApplication TQStyle TQWidget
  • polishPopupMenu: + TQStyle
  • pop: TQPtrStack TQValueStack
  • popContext: TQXmlNamespaceSupport
  • pop_back: TQValueList TQValueVector
  • pop_front: @@ -2126,8 +2126,8 @@ tqAddPostRoutine: TQAxAggregated TQAxBase TQAxScriptEngine
  • queryList: TQObject
  • queryParent: TQAccessibleInterface
  • querySubControl: - TQStyle
  • querySubControlMetrics: - TQStyle
  • querySubObject: + TQStyle
  • querySubControlMetrics: + TQStyle
  • querySubObject: TQAxBase TQAxObject TQAxWidget
  • question: TQMessageBox
  • quit: TQApplication
  • qwsDecoration: @@ -2186,7 +2186,7 @@ rBottom: TQDataView TQSqlDatabase TQSqlDriver
  • recordInfo: TQSqlDatabase TQSqlDriver
  • recordType: TQDns
  • rect: - TQAccessibleInterface TQCanvas TQCanvasRectangle TQDirectPainter TQIconViewItem TQImage TQPaintEvent TQPixmap TQRect TQStyleOption TQTab TQWidget
  • rects: + TQAccessibleInterface TQCanvas TQCanvasRectangle TQDirectPainter TQIconViewItem TQImage TQPaintEvent TQPixmap TQRect TQStyleOption TQTab TQWidget
  • rects: TQRegion
  • red: TQColor
  • redirect: TQPainter
  • redo: @@ -2358,7 +2358,7 @@ sRect: TQDomNode TQImage TQPainter TQPicture TQPixmap TQScreen TQTranslator
  • saveState: TQApplication
  • scale: TQImage TQPainter TQSize TQWMatrix
  • scaleFont: - TQStyleSheet
  • scaleHeight: + TQStyleSheet
  • scaleHeight: TQImage
  • scaleWidth: TQImage
  • scanLine: TQImage
  • screen: @@ -2416,7 +2416,7 @@ sRect: TQIconView TQListBox TQListView TQTable
  • selectionStart: TQLineEdit
  • selfMask: TQPixmap
  • selfNesting: - TQStyleSheetItem
  • send: + TQStyleSheetItem
  • send: TQCopChannel
  • sendBufferSize: TQSocketDevice
  • sendEvent: TQApplication
  • sendIMEvent: @@ -2444,12 +2444,12 @@ sRect: TQHostAddress
  • setAddressReusable: TQSocketDevice
  • setAdvancePeriod: TQCanvas
  • setAlignment: - TQGroupBox TQLabel TQLayoutItem TQLineEdit TQMultiLineEdit TQStyleSheetItem TQTextEdit
  • setAllChanged: + TQGroupBox TQLabel TQLayoutItem TQLineEdit TQMultiLineEdit TQStyleSheetItem TQTextEdit
  • setAllChanged: TQCanvas
  • setAllColumnsShowFocus: TQListView
  • setAlpha: TQGLFormat
  • setAlphaBuffer: TQImage
  • setAnchor: - TQStyleSheetItem
  • setAngles: + TQStyleSheetItem
  • setAngles: TQCanvasEllipse
  • setAnimated: TQCanvasItem
  • setApplyButton: TQTabDialog
  • setAppropriate: @@ -2537,7 +2537,7 @@ sRect: TQGridLayout
  • setColStretch: TQGridLayout
  • setCollapsible: TQSplitter
  • setColor: - TQBrush TQCanvasText TQColorDrag TQColorGroup TQImage TQPalette TQPen TQStyleSheetItem TQTextEdit
  • setColorMode: + TQBrush TQCanvasText TQColorDrag TQColorGroup TQImage TQPalette TQPen TQStyleSheetItem TQTextEdit
  • setColorMode: TQPrinter
  • setColorSpec: TQApplication
  • setColormap: TQGLWidget
  • setColumn: @@ -2568,7 +2568,7 @@ sRect: TQScrollView
  • setContentsPreview: TQFileDialog
  • setContentsPreviewEnabled: TQFileDialog
  • setContexts: - TQStyleSheetItem
  • setControl: + TQStyleSheetItem
  • setControl: TQAxBase
  • setControlPoints: TQCanvasSpline
  • setCoords: TQRect
  • setCornerWidget: @@ -2611,7 +2611,7 @@ sRect: TQPixmap
  • setDefaultOverlayFormat: TQGLFormat
  • setDefaultRenameAction: TQListView
  • setDefaultSheet: - TQStyleSheet
  • setDefaultUp: + TQStyleSheet
  • setDefaultUp: TQMenuBar
  • setDelay: TQToolTipGroup
  • setDepth: TQGLFormat
  • setDescending: @@ -2627,7 +2627,7 @@ sRect: TQAction TQPalette TQWidget
  • setDiscardCommand: TQSessionManager
  • setDisplay: TQTimeEdit
  • setDisplayMode: - TQStyleSheetItem
  • setDocName: + TQStyleSheetItem
  • setDocName: TQPrinter
  • setDockEnabled: TQMainWindow
  • setDockMenuEnabled: TQMainWindow
  • setDockWindowsMovable: @@ -2693,12 +2693,12 @@ sRect: TQMacStyle
  • setFocusStyle: TQTable
  • setFont: TQApplication TQCanvasText TQComboBox TQCustomMenuItem TQLabel TQPainter TQTabDialog TQToolTip TQWSInputMethod TQWhatsThis TQWidget
  • setFontFamily: - TQStyleSheetItem
  • setFontItalic: - TQStyleSheetItem
  • setFontSize: - TQStyleSheetItem
  • setFontStrikeOut: - TQStyleSheetItem
  • setFontUnderline: - TQStyleSheetItem
  • setFontWeight: - TQStyleSheetItem
  • setForm: + TQStyleSheetItem
  • setFontItalic: + TQStyleSheetItem
  • setFontSize: + TQStyleSheetItem
  • setFontStrikeOut: + TQStyleSheetItem
  • setFontUnderline: + TQStyleSheetItem
  • setFontWeight: + TQStyleSheetItem
  • setForm: TQDataBrowser TQDataView
  • setFormat: TQGLContext TQImageIO TQSyntaxHighlighter
  • setForwardOnly: TQSqlQuery TQSqlResult
  • setFrame: @@ -2793,16 +2793,16 @@ sRect: TQFrame
  • setLinkUnderline: TQTextEdit
  • setListBox: TQComboBox
  • setListStyle: - TQStyleSheetItem
  • setLocalData: + TQStyleSheetItem
  • setLocalData: TQThreadStorage
  • setLogicalFontSize: - TQStyleSheetItem
  • setLogicalFontSizeStep: - TQStyleSheetItem
  • setLooping: + TQStyleSheetItem
  • setLogicalFontSizeStep: + TQStyleSheetItem
  • setLooping: TQImageConsumer
  • setLoops: TQSound
  • setMainWidget: TQApplication
  • setManagerProperty: TQSessionManager
  • setMapping: TQSignalMapper
  • setMargin: - TQFrame TQLayout TQStyleSheetItem TQTabWidget
  • setMargins: + TQFrame TQLayout TQStyleSheetItem TQTabWidget
  • setMargins: TQPrinter TQScrollView
  • setMask: TQPixmap TQWidget
  • setMatchAllDirs: TQDir
  • setMatrix: @@ -2986,7 +2986,7 @@ sRect: TQListView
  • setSelectionAttributes: TQTextEdit
  • setSelectionMode: TQIconView TQListBox TQListView TQTable
  • setSelfNesting: - TQStyleSheetItem
  • setSendBufferSize: + TQStyleSheetItem
  • setSendBufferSize: TQSocketDevice
  • setSeparator: TQDateEdit TQTimeEdit
  • setSequence: TQCanvasSprite
  • setShape: @@ -3117,7 +3117,7 @@ sRect: TQSizePolicy
  • setVerStretch: TQSizePolicy
  • setVersion: TQDataStream
  • setVerticalAlignment: - TQStyleSheetItem TQTextEdit
  • setVerticallyStretchable: + TQStyleSheetItem TQTextEdit
  • setVerticallyStretchable: TQDockWindow
  • setViewMode: TQFileDialog
  • setViewXForm: TQPainter
  • setViewport: @@ -3128,7 +3128,7 @@ sRect: TQFont
  • setWhatsThis: TQAccel TQAction TQMenuData TQPopupMenu
  • setWheelScrollLines: TQApplication
  • setWhiteSpaceMode: - TQStyleSheetItem
  • setWidget: + TQStyleSheetItem
  • setWidget: TQDockWindow
  • setWidgetSizePolicy: TQMacStyle
  • setWidth: TQPen TQRect TQSimpleRichText TQSize
  • setWildcard: @@ -3189,7 +3189,7 @@ sRect: TQTimer
  • size: TQAsciiCache TQAsciiDict TQBitArray TQCache TQCanvas TQCanvasRectangle TQDict TQDirectPainter TQFile TQFileInfo TQFontMetrics TQGLColormap TQIODevice TQIconViewItem TQImage TQIntCache TQIntDict TQMap TQMemArray TQPicture TQPixmap TQPtrDict TQPtrVector TQRect TQResizeEvent TQSocket TQSqlQuery TQSqlResult TQUrlInfo TQValueList TQValueVector TQWidget
  • sizeChange: TQHeader
  • sizeFromContents: - TQStyle
  • sizeHint: + TQStyle
  • sizeHint: TQBoxLayout TQCanvasView TQCustomMenuItem TQGridLayout TQLayoutItem TQLineEdit TQProgressDialog TQSizeGrip TQSpacerItem TQTableItem TQWidget TQWidgetItem
  • sizeIncrement: TQWidget
  • sizeLimit: TQComboBox
  • sizePolicy: @@ -3285,13 +3285,13 @@ sRect: TQCString TQString
  • style: TQApplication TQBrush TQPen TQWidget
  • styleChange: TQWidget
  • styleHint: - TQFont TQFontInfo TQStyle
  • stylePixmap: - TQStyle
  • styleSheet: - TQStyleSheetItem TQTextEdit
  • styleStrategy: + TQFont TQFontInfo TQStyle
  • stylePixmap: + TQStyle
  • styleSheet: + TQStyleSheetItem TQTextEdit
  • styleStrategy: TQFont
  • styleString: TQFontDatabase
  • styles: TQFontDatabase
  • subRect: - TQStyle
  • subkeyList: + TQStyle
  • subkeyList: TQSettings
  • substitute: TQFont
  • substitutes: TQFont
  • substitutions: @@ -3322,7 +3322,7 @@ sRect: TQImage
  • systemId: TQDomDocumentType TQDomEntity TQDomNotation TQXmlParseException
  • tab: - TQStyleOption TQTabBar
  • tabArray: + TQStyleOption TQTabBar
  • tabArray: TQPainter
  • tabAt: TQTabBar
  • tabBar: TQTabDialog TQTabWidget
  • tabChangesFocus: @@ -3335,11 +3335,11 @@ tab: TQTextEdit
  • tabStops: TQPainter
  • tabToolTip: TQTabWidget
  • tabWidth: - TQStyleOption
  • table: + TQStyleOption
  • table: TQTableItem
  • tables: TQSqlDatabase TQSqlDriver
  • tabletEvent: TQWidget
  • tag: - TQStyleSheet
  • tagName: + TQStyleSheet
  • tagName: TQDomElement
  • take: TQAsciiCache TQAsciiDict TQCache TQDict TQIntCache TQIntDict TQPtrDict TQPtrList TQPtrVector
  • takeCurrent: TQGLayoutIterator TQLayoutIterator
  • takeDefaultFactory: @@ -3493,7 +3493,7 @@ tab: TQVariant
  • ucs2: TQString
  • unPolish: - TQStyle
  • uncache: + TQStyle
  • uncache: TQScreen
  • underline: TQFont TQTextEdit
  • underlinePos: TQFontMetrics
  • undo: @@ -3573,7 +3573,7 @@ vScrollBarMode: TQSizePolicy
  • verStretch: TQSizePolicy
  • version: TQDataStream TQUuid
  • verticalAlignment: - TQStyleSheetItem
  • verticalHeader: + TQStyleSheetItem
  • verticalHeader: TQTable
  • verticalScrollBar: TQScrollView
  • verticalSliderPressed: TQScrollView
  • verticalSliderReleased: @@ -3588,7 +3588,7 @@ vScrollBarMode: TQScrollView
  • visibleWidget: TQWidgetStack
  • visibleWidth: TQScrollView
  • visualRect: - TQStyle
  • + TQStyle
  • wait: TQThread TQWaitCondition
  • waitForMore: TQSocket TQSocketDevice
  • wakeAll: @@ -3604,8 +3604,8 @@ wait: TQWhatsThis
  • wheelEvent: TQWidget
  • wheelScrollLines: TQApplication
  • whiteSpaceMode: - TQStyleSheetItem
  • widget: - TQAxAggregated TQDockWindow TQLayoutItem TQNPInstance TQSqlForm TQStyleOption TQWidgetItem TQWidgetStack
  • widgetAt: + TQStyleSheetItem
  • widget: + TQAxAggregated TQDockWindow TQLayoutItem TQNPInstance TQSqlForm TQStyleOption TQWidgetItem TQWidgetStack
  • widgetAt: TQApplication
  • widgetSizePolicy: TQMacStyle
  • widgetToField: TQSqlForm
  • widgets: diff --git a/doc/html/graphics.html b/doc/html/graphics.html index baba6b33..8d63c30d 100644 --- a/doc/html/graphics.html +++ b/doc/html/graphics.html @@ -90,7 +90,7 @@ coordinate system. TQRectDefines a rectangle in the plane TQRegionClip region for a painter TQSizeDefines the size of a two-dimensional object -TQStyleSheetCollection of styles for rich text rendering and a generator of tags +TQStyleSheetCollection of styles for rich text rendering and a generator of tags TQWMatrix2D transformations of a coordinate system diff --git a/doc/html/headerfilesynonyms b/doc/html/headerfilesynonyms index bc5db6a6..60e35841 100644 --- a/doc/html/headerfilesynonyms +++ b/doc/html/headerfilesynonyms @@ -136,8 +136,8 @@ qcharref.h tqstring.h qconststring.h tqstring.h tqstrlistiterator.h tqstrlist.h tqstrilist.h tqstrlist.h -qstyleoption.h ntqstyle.h -qstylesheetitem.h ntqstylesheet.h +tqstyleoption.h tqstyle.h +tqstylesheetitem.h tqstylesheet.h qtab.h ntqtabbar.h qtableselection.h ntqtable.h qtableitem.h ntqtable.h diff --git a/doc/html/headers.html b/doc/html/headers.html index 0b2540ee..2b7644ca 100644 --- a/doc/html/headers.html +++ b/doc/html/headers.html @@ -244,10 +244,10 @@ body { background: #ffffff; color: black; }
  • tqstring.h
  • tqstringlist.h
  • tqstrlist.h -
  • ntqstyle.h -
  • ntqstylefactory.h -
  • ntqstyleplugin.h -
  • ntqstylesheet.h +
  • tqstyle.h +
  • tqstylefactory.h +
  • tqstyleplugin.h +
  • tqstylesheet.h
  • ntqsyntaxhighlighter.h
  • ntqtabbar.h
  • ntqtabdialog.h diff --git a/doc/html/helpsystem.html b/doc/html/helpsystem.html index c9dcc58d..350aac47 100644 --- a/doc/html/helpsystem.html +++ b/doc/html/helpsystem.html @@ -49,7 +49,7 @@ help is a digression from their real task.

    -
    TQStatusBarHorizontal bar suitable for presenting status information -
    TQStyleSheetCollection of styles for rich text rendering and a generator of tags +
    TQStyleSheetCollection of styles for rich text rendering and a generator of tags
    TQTextBrowserRich text browser with hypertext navigation
    TQToolTipTool tips (balloon help) for any widget or rectangular part of a widget
    TQToolTipGroupCollects tool tips into related groups diff --git a/doc/html/helpviewer-example.html b/doc/html/helpviewer-example.html index 44bf2de7..4992d3dd 100644 --- a/doc/html/helpviewer-example.html +++ b/doc/html/helpviewer-example.html @@ -125,7 +125,7 @@ private: #include <tqiconset.h> #include <ntqfile.h> #include <tqtextstream.h> -#include <ntqstylesheet.h> +#include <tqstylesheet.h> #include <ntqmessagebox.h> #include <ntqfiledialog.h> #include <ntqapplication.h> diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html index 7b62374f..c38689fa 100644 --- a/doc/html/hierarchy.html +++ b/doc/html/hierarchy.html @@ -247,9 +247,9 @@ classes in the TQt API.
  • TQSqlRecordInfo
  • TQSqlResult
  • TQString -
  • TQStyleFactory -
  • TQStyleOption -
  • TQStylePlugin +
  • TQStyleFactory +
  • TQStyleOption +
  • TQStylePlugin
  • TQt -
  • TQStyleSheet +
  • TQStyleSheet
  • TQTimer
  • TQToolTipGroup
  • TQTranslator @@ -509,7 +509,7 @@ classes in the TQt API.
  • TQDirectPainter
  • TQPen -
  • TQStyleSheetItem +
  • TQStyleSheetItem
  • TQSyntaxHighlighter
  • TQTab
  • TQTableItem diff --git a/doc/html/index b/doc/html/index index fc324b50..48a02c0c 100644 --- a/doc/html/index +++ b/doc/html/index @@ -6204,123 +6204,123 @@ "TQStringList::join" tqstringlist.html#join "TQStringList::sort" tqstringlist.html#sort "TQStringList::split" tqstringlist.html#split -"QStyle" ntqstyle.html -"QStyle::ComplexControl" ntqstyle.html#ComplexControl -"QStyle::ContentsType" ntqstyle.html#ContentsType -"QStyle::ControlElement" ntqstyle.html#ControlElement -"QStyle::PixelMetric" ntqstyle.html#PixelMetric -"QStyle::PrimitiveElement" ntqstyle.html#PrimitiveElement -"QStyle::StyleFlags" ntqstyle.html#StyleFlags -"QStyle::StyleHint" ntqstyle.html#StyleHint -"QStyle::StylePixmap" ntqstyle.html#StylePixmap -"QStyle::SubControl" ntqstyle.html#SubControl -"QStyle::SubRect" ntqstyle.html#SubRect -"QStyle::drawComplexControl" ntqstyle.html#drawComplexControl -"QStyle::drawComplexControlMask" ntqstyle.html#drawComplexControlMask -"QStyle::drawControl" ntqstyle.html#drawControl -"QStyle::drawControlMask" ntqstyle.html#drawControlMask -"QStyle::drawItem" ntqstyle.html#drawItem -"QStyle::drawPrimitive" ntqstyle.html#drawPrimitive -"QStyle::itemRect" ntqstyle.html#itemRect -"QStyle::pixelMetric" ntqstyle.html#pixelMetric -"QStyle::polish" ntqstyle.html#polish -"QStyle::polishPopupMenu" ntqstyle.html#polishPopupMenu -"QStyle::querySubControl" ntqstyle.html#querySubControl -"QStyle::querySubControlMetrics" ntqstyle.html#querySubControlMetrics -"QStyle::sizeFromContents" ntqstyle.html#sizeFromContents -"QStyle::styleHint" ntqstyle.html#styleHint -"QStyle::stylePixmap" ntqstyle.html#stylePixmap -"QStyle::subRect" ntqstyle.html#subRect -"QStyle::unPolish" ntqstyle.html#unPolish -"QStyle::visualRect" ntqstyle.html#visualRect -"QStyle::~QStyle" ntqstyle.html#~QStyle -"QStyleFactory" ntqstylefactory.html -"QStyleFactory::create" ntqstylefactory.html#create -"QStyleFactory::keys" ntqstylefactory.html#keys -"QStyleOption" qstyleoption.html -"QStyleOption::StyleOptionDefault" qstyleoption.html#StyleOptionDefault -"QStyleOption::arrowType" qstyleoption.html#arrowType -"QStyleOption::checkListItem" qstyleoption.html#checkListItem -"QStyleOption::color" qstyleoption.html#color -"QStyleOption::day" qstyleoption.html#day -"QStyleOption::frameShadow" qstyleoption.html#frameShadow -"QStyleOption::frameShape" qstyleoption.html#frameShape -"QStyleOption::headerSection" qstyleoption.html#headerSection -"QStyleOption::isDefault" qstyleoption.html#isDefault -"QStyleOption::lineWidth" qstyleoption.html#lineWidth -"QStyleOption::listViewItem" qstyleoption.html#listViewItem -"QStyleOption::maxIconWidth" qstyleoption.html#maxIconWidth -"QStyleOption::menuItem" qstyleoption.html#menuItem -"QStyleOption::midLineWidth" qstyleoption.html#midLineWidth -"QStyleOption::rect" qstyleoption.html#rect -"QStyleOption::tab" qstyleoption.html#tab -"QStyleOption::tabWidth" qstyleoption.html#tabWidth -"QStyleOption::widget" qstyleoption.html#widget -"QStylePlugin" ntqstyleplugin.html -"QStylePlugin::create" ntqstyleplugin.html#create -"QStylePlugin::keys" ntqstyleplugin.html#keys -"QStylePlugin::~QStylePlugin" ntqstyleplugin.html#~QStylePlugin -"QStyleSheet" ntqstylesheet.html -"QStyleSheet::convertFromPlainText" ntqstylesheet.html#convertFromPlainText -"QStyleSheet::defaultSheet" ntqstylesheet.html#defaultSheet -"QStyleSheet::error" ntqstylesheet.html#error -"QStyleSheet::escape" ntqstylesheet.html#escape -"QStyleSheet::item" ntqstylesheet.html#item -"QStyleSheet::mightBeRichText" ntqstylesheet.html#mightBeRichText -"QStyleSheet::scaleFont" ntqstylesheet.html#scaleFont -"QStyleSheet::setDefaultSheet" ntqstylesheet.html#setDefaultSheet -"QStyleSheet::tag" ntqstylesheet.html#tag -"QStyleSheet::~QStyleSheet" ntqstylesheet.html#~QStyleSheet -"QStyleSheetItem" qstylesheetitem.html -"QStyleSheetItem::DisplayMode" qstylesheetitem.html#DisplayMode -"QStyleSheetItem::ListStyle" qstylesheetitem.html#ListStyle -"QStyleSheetItem::Margin" qstylesheetitem.html#Margin -"QStyleSheetItem::VerticalAlignment" qstylesheetitem.html#VerticalAlignment -"QStyleSheetItem::WhiteSpaceMode" qstylesheetitem.html#WhiteSpaceMode -"QStyleSheetItem::alignment" qstylesheetitem.html#alignment -"QStyleSheetItem::allowedInContext" qstylesheetitem.html#allowedInContext -"QStyleSheetItem::color" qstylesheetitem.html#color -"QStyleSheetItem::contexts" qstylesheetitem.html#contexts -"QStyleSheetItem::definesFontItalic" qstylesheetitem.html#definesFontItalic -"QStyleSheetItem::definesFontStrikeOut" qstylesheetitem.html#definesFontStrikeOut -"QStyleSheetItem::definesFontUnderline" qstylesheetitem.html#definesFontUnderline -"QStyleSheetItem::displayMode" qstylesheetitem.html#displayMode -"QStyleSheetItem::fontFamily" qstylesheetitem.html#fontFamily -"QStyleSheetItem::fontItalic" qstylesheetitem.html#fontItalic -"QStyleSheetItem::fontSize" qstylesheetitem.html#fontSize -"QStyleSheetItem::fontStrikeOut" qstylesheetitem.html#fontStrikeOut -"QStyleSheetItem::fontUnderline" qstylesheetitem.html#fontUnderline -"QStyleSheetItem::fontWeight" qstylesheetitem.html#fontWeight -"QStyleSheetItem::isAnchor" qstylesheetitem.html#isAnchor -"QStyleSheetItem::listStyle" qstylesheetitem.html#listStyle -"QStyleSheetItem::logicalFontSize" qstylesheetitem.html#logicalFontSize -"QStyleSheetItem::logicalFontSizeStep" qstylesheetitem.html#logicalFontSizeStep -"QStyleSheetItem::margin" qstylesheetitem.html#margin -"QStyleSheetItem::name" qstylesheetitem.html#name -"QStyleSheetItem::operator=" qstylesheetitem.html#operator-eq -"QStyleSheetItem::selfNesting" qstylesheetitem.html#selfNesting -"QStyleSheetItem::setAlignment" qstylesheetitem.html#setAlignment -"QStyleSheetItem::setAnchor" qstylesheetitem.html#setAnchor -"QStyleSheetItem::setColor" qstylesheetitem.html#setColor -"QStyleSheetItem::setContexts" qstylesheetitem.html#setContexts -"QStyleSheetItem::setDisplayMode" qstylesheetitem.html#setDisplayMode -"QStyleSheetItem::setFontFamily" qstylesheetitem.html#setFontFamily -"QStyleSheetItem::setFontItalic" qstylesheetitem.html#setFontItalic -"QStyleSheetItem::setFontSize" qstylesheetitem.html#setFontSize -"QStyleSheetItem::setFontStrikeOut" qstylesheetitem.html#setFontStrikeOut -"QStyleSheetItem::setFontUnderline" qstylesheetitem.html#setFontUnderline -"QStyleSheetItem::setFontWeight" qstylesheetitem.html#setFontWeight -"QStyleSheetItem::setListStyle" qstylesheetitem.html#setListStyle -"QStyleSheetItem::setLogicalFontSize" qstylesheetitem.html#setLogicalFontSize -"QStyleSheetItem::setLogicalFontSizeStep" qstylesheetitem.html#setLogicalFontSizeStep -"QStyleSheetItem::setMargin" qstylesheetitem.html#setMargin -"QStyleSheetItem::setSelfNesting" qstylesheetitem.html#setSelfNesting -"QStyleSheetItem::setVerticalAlignment" qstylesheetitem.html#setVerticalAlignment -"QStyleSheetItem::setWhiteSpaceMode" qstylesheetitem.html#setWhiteSpaceMode -"QStyleSheetItem::styleSheet" qstylesheetitem.html#styleSheet -"QStyleSheetItem::verticalAlignment" qstylesheetitem.html#verticalAlignment -"QStyleSheetItem::whiteSpaceMode" qstylesheetitem.html#whiteSpaceMode -"QStyleSheetItem::~QStyleSheetItem" qstylesheetitem.html#~QStyleSheetItem +"TQStyle" tqstyle.html +"TQStyle::ComplexControl" tqstyle.html#ComplexControl +"TQStyle::ContentsType" tqstyle.html#ContentsType +"TQStyle::ControlElement" tqstyle.html#ControlElement +"TQStyle::PixelMetric" tqstyle.html#PixelMetric +"TQStyle::PrimitiveElement" tqstyle.html#PrimitiveElement +"TQStyle::StyleFlags" tqstyle.html#StyleFlags +"TQStyle::StyleHint" tqstyle.html#StyleHint +"TQStyle::StylePixmap" tqstyle.html#StylePixmap +"TQStyle::SubControl" tqstyle.html#SubControl +"TQStyle::SubRect" tqstyle.html#SubRect +"TQStyle::drawComplexControl" tqstyle.html#drawComplexControl +"TQStyle::drawComplexControlMask" tqstyle.html#drawComplexControlMask +"TQStyle::drawControl" tqstyle.html#drawControl +"TQStyle::drawControlMask" tqstyle.html#drawControlMask +"TQStyle::drawItem" tqstyle.html#drawItem +"TQStyle::drawPrimitive" tqstyle.html#drawPrimitive +"TQStyle::itemRect" tqstyle.html#itemRect +"TQStyle::pixelMetric" tqstyle.html#pixelMetric +"TQStyle::polish" tqstyle.html#polish +"TQStyle::polishPopupMenu" tqstyle.html#polishPopupMenu +"TQStyle::querySubControl" tqstyle.html#querySubControl +"TQStyle::querySubControlMetrics" tqstyle.html#querySubControlMetrics +"TQStyle::sizeFromContents" tqstyle.html#sizeFromContents +"TQStyle::styleHint" tqstyle.html#styleHint +"TQStyle::stylePixmap" tqstyle.html#stylePixmap +"TQStyle::subRect" tqstyle.html#subRect +"TQStyle::unPolish" tqstyle.html#unPolish +"TQStyle::visualRect" tqstyle.html#visualRect +"TQStyle::~TQStyle" tqstyle.html#~TQStyle +"TQStyleFactory" tqstylefactory.html +"TQStyleFactory::create" tqstylefactory.html#create +"TQStyleFactory::keys" tqstylefactory.html#keys +"TQStyleOption" tqstyleoption.html +"TQStyleOption::StyleOptionDefault" tqstyleoption.html#StyleOptionDefault +"TQStyleOption::arrowType" tqstyleoption.html#arrowType +"TQStyleOption::checkListItem" tqstyleoption.html#checkListItem +"TQStyleOption::color" tqstyleoption.html#color +"TQStyleOption::day" tqstyleoption.html#day +"TQStyleOption::frameShadow" tqstyleoption.html#frameShadow +"TQStyleOption::frameShape" tqstyleoption.html#frameShape +"TQStyleOption::headerSection" tqstyleoption.html#headerSection +"TQStyleOption::isDefault" tqstyleoption.html#isDefault +"TQStyleOption::lineWidth" tqstyleoption.html#lineWidth +"TQStyleOption::listViewItem" tqstyleoption.html#listViewItem +"TQStyleOption::maxIconWidth" tqstyleoption.html#maxIconWidth +"TQStyleOption::menuItem" tqstyleoption.html#menuItem +"TQStyleOption::midLineWidth" tqstyleoption.html#midLineWidth +"TQStyleOption::rect" tqstyleoption.html#rect +"TQStyleOption::tab" tqstyleoption.html#tab +"TQStyleOption::tabWidth" tqstyleoption.html#tabWidth +"TQStyleOption::widget" tqstyleoption.html#widget +"TQStylePlugin" tqstyleplugin.html +"TQStylePlugin::create" tqstyleplugin.html#create +"TQStylePlugin::keys" tqstyleplugin.html#keys +"TQStylePlugin::~TQStylePlugin" tqstyleplugin.html#~TQStylePlugin +"TQStyleSheet" tqstylesheet.html +"TQStyleSheet::convertFromPlainText" tqstylesheet.html#convertFromPlainText +"TQStyleSheet::defaultSheet" tqstylesheet.html#defaultSheet +"TQStyleSheet::error" tqstylesheet.html#error +"TQStyleSheet::escape" tqstylesheet.html#escape +"TQStyleSheet::item" tqstylesheet.html#item +"TQStyleSheet::mightBeRichText" tqstylesheet.html#mightBeRichText +"TQStyleSheet::scaleFont" tqstylesheet.html#scaleFont +"TQStyleSheet::setDefaultSheet" tqstylesheet.html#setDefaultSheet +"TQStyleSheet::tag" tqstylesheet.html#tag +"TQStyleSheet::~TQStyleSheet" tqstylesheet.html#~TQStyleSheet +"TQStyleSheetItem" tqstylesheetitem.html +"TQStyleSheetItem::DisplayMode" tqstylesheetitem.html#DisplayMode +"TQStyleSheetItem::ListStyle" tqstylesheetitem.html#ListStyle +"TQStyleSheetItem::Margin" tqstylesheetitem.html#Margin +"TQStyleSheetItem::VerticalAlignment" tqstylesheetitem.html#VerticalAlignment +"TQStyleSheetItem::WhiteSpaceMode" tqstylesheetitem.html#WhiteSpaceMode +"TQStyleSheetItem::alignment" tqstylesheetitem.html#alignment +"TQStyleSheetItem::allowedInContext" tqstylesheetitem.html#allowedInContext +"TQStyleSheetItem::color" tqstylesheetitem.html#color +"TQStyleSheetItem::contexts" tqstylesheetitem.html#contexts +"TQStyleSheetItem::definesFontItalic" tqstylesheetitem.html#definesFontItalic +"TQStyleSheetItem::definesFontStrikeOut" tqstylesheetitem.html#definesFontStrikeOut +"TQStyleSheetItem::definesFontUnderline" tqstylesheetitem.html#definesFontUnderline +"TQStyleSheetItem::displayMode" tqstylesheetitem.html#displayMode +"TQStyleSheetItem::fontFamily" tqstylesheetitem.html#fontFamily +"TQStyleSheetItem::fontItalic" tqstylesheetitem.html#fontItalic +"TQStyleSheetItem::fontSize" tqstylesheetitem.html#fontSize +"TQStyleSheetItem::fontStrikeOut" tqstylesheetitem.html#fontStrikeOut +"TQStyleSheetItem::fontUnderline" tqstylesheetitem.html#fontUnderline +"TQStyleSheetItem::fontWeight" tqstylesheetitem.html#fontWeight +"TQStyleSheetItem::isAnchor" tqstylesheetitem.html#isAnchor +"TQStyleSheetItem::listStyle" tqstylesheetitem.html#listStyle +"TQStyleSheetItem::logicalFontSize" tqstylesheetitem.html#logicalFontSize +"TQStyleSheetItem::logicalFontSizeStep" tqstylesheetitem.html#logicalFontSizeStep +"TQStyleSheetItem::margin" tqstylesheetitem.html#margin +"TQStyleSheetItem::name" tqstylesheetitem.html#name +"TQStyleSheetItem::operator=" tqstylesheetitem.html#operator-eq +"TQStyleSheetItem::selfNesting" tqstylesheetitem.html#selfNesting +"TQStyleSheetItem::setAlignment" tqstylesheetitem.html#setAlignment +"TQStyleSheetItem::setAnchor" tqstylesheetitem.html#setAnchor +"TQStyleSheetItem::setColor" tqstylesheetitem.html#setColor +"TQStyleSheetItem::setContexts" tqstylesheetitem.html#setContexts +"TQStyleSheetItem::setDisplayMode" tqstylesheetitem.html#setDisplayMode +"TQStyleSheetItem::setFontFamily" tqstylesheetitem.html#setFontFamily +"TQStyleSheetItem::setFontItalic" tqstylesheetitem.html#setFontItalic +"TQStyleSheetItem::setFontSize" tqstylesheetitem.html#setFontSize +"TQStyleSheetItem::setFontStrikeOut" tqstylesheetitem.html#setFontStrikeOut +"TQStyleSheetItem::setFontUnderline" tqstylesheetitem.html#setFontUnderline +"TQStyleSheetItem::setFontWeight" tqstylesheetitem.html#setFontWeight +"TQStyleSheetItem::setListStyle" tqstylesheetitem.html#setListStyle +"TQStyleSheetItem::setLogicalFontSize" tqstylesheetitem.html#setLogicalFontSize +"TQStyleSheetItem::setLogicalFontSizeStep" tqstylesheetitem.html#setLogicalFontSizeStep +"TQStyleSheetItem::setMargin" tqstylesheetitem.html#setMargin +"TQStyleSheetItem::setSelfNesting" tqstylesheetitem.html#setSelfNesting +"TQStyleSheetItem::setVerticalAlignment" tqstylesheetitem.html#setVerticalAlignment +"TQStyleSheetItem::setWhiteSpaceMode" tqstylesheetitem.html#setWhiteSpaceMode +"TQStyleSheetItem::styleSheet" tqstylesheetitem.html#styleSheet +"TQStyleSheetItem::verticalAlignment" tqstylesheetitem.html#verticalAlignment +"TQStyleSheetItem::whiteSpaceMode" tqstylesheetitem.html#whiteSpaceMode +"TQStyleSheetItem::~TQStyleSheetItem" tqstylesheetitem.html#~TQStyleSheetItem "QSvgDevice::boundingRect" qsvgdevice.html#boundingRect "QSvgDevice::load" qsvgdevice.html#load "QSvgDevice::metric" qsvgdevice.html#metric diff --git a/doc/html/listboxcombo-example.html b/doc/html/listboxcombo-example.html index 64212e49..091cfb27 100644 --- a/doc/html/listboxcombo-example.html +++ b/doc/html/listboxcombo-example.html @@ -99,7 +99,7 @@ protected slots: #include <ntqlabel.h> #include <tqimage.h> #include <ntqpainter.h> -#include <ntqstyle.h> +#include <tqstyle.h> class MyListBoxItem : public TQListBoxItem diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index f74c89a9..546e1676 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -533,7 +533,7 @@ void MDIWindow::print( TQPrinter int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(medit->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(medit->text()), TQFont(), medit->context(), medit->styleSheet(), diff --git a/doc/html/ntqaction.html b/doc/html/ntqaction.html index 1f28dcb6..490fcd13 100644 --- a/doc/html/ntqaction.html +++ b/doc/html/ntqaction.html @@ -502,7 +502,7 @@ appear at all.

    This property holds the action's "What's This?" help text.

    The whats this text is used to provide a brief description of the action. The text may contain rich text (HTML-like tags -- see -TQStyleSheet for the list of supported tags). There is no default +TQStyleSheet for the list of supported tags). There is no default "What's This" text.

    See also TQWhatsThis. diff --git a/doc/html/ntqapplication.html b/doc/html/ntqapplication.html index 8f532528..80800e19 100644 --- a/doc/html/ntqapplication.html +++ b/doc/html/ntqapplication.html @@ -209,7 +209,7 @@ events to widgets.

  • It parses common command line arguments and sets its internal state accordingly. See the constructor documentation below for more details about this.

  • It defines the application's look and feel, which is -encapsulated in a TQStyle object. This can be changed at runtime +encapsulated in a TQStyle object. This can be changed at runtime with setStyle().

  • It specifies how the application is to allocate colors. See setColorSpec() for details. @@ -1075,7 +1075,7 @@ may be used to do some style-based central customization of widgets.

    Note that you are not limited to the public functions of TQWidget. Instead, based on meta information like TQObject::className() you are able to customize any kind of widget. -

    See also TQStyle::polish(), TQWidget::polish(), setPalette(), and setFont(). +

    See also TQStyle::polish(), TQWidget::polish(), setPalette(), and setFont().

    void TQApplication::postEvent ( TQObject * receiver, TQEvent * event ) [static]

    Note: This function is thread-safe when TQt is built withthread support.

    @@ -1515,8 +1515,8 @@ inherit className (as reported by TQOb className is left 0, the change affects all widgets, thus overriding any previously set class specific palettes.

    The palette may be changed according to the current GUI style in -TQStyle::polish(). -

    See also TQWidget::palette, palette(), and TQStyle::polish(). +TQStyle::polish(). +

    See also TQWidget::palette, palette(), and TQStyle::polish().

    Examples: i18n/main.cpp, themes/metal.cpp, themes/themes.cpp, and themes/wood.cpp.

    void TQApplication::setReverseLayout ( bool b ) [static] @@ -1539,7 +1539,7 @@ Sets the distance after which a drag should start to l pixels. Sets the time after which a drag should start to ms ms.

    See also startDragTime(). -

    void TQApplication::setStyle ( TQStyle * style ) [static] +

    void TQApplication::setStyle ( TQStyle * style ) [static]

    Sets the application's GUI style to style. Ownership of the style object is transferred to TQApplication, so TQApplication will delete @@ -1553,14 +1553,14 @@ the style object on application exit or when a new style is set. the initial colors or the system defaults. This is necessary since certain styles have to adapt the color palette to be fully style-guide compliant. -

    See also style(), TQStyle, setPalette(), and desktopSettingsAware(). +

    See also style(), TQStyle, setPalette(), and desktopSettingsAware().

    Example: themes/themes.cpp. -

    TQStyle * TQApplication::setStyle ( const TQString & style ) [static] +

    TQStyle * TQApplication::setStyle ( const TQString & style ) [static]

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Requests a TQStyle object for style from the TQStyleFactory. -

    The string must be one of the TQStyleFactory::keys(), typically one +

    Requests a TQStyle object for style from the TQStyleFactory. +

    The string must be one of the TQStyleFactory::keys(), typically one of "windows", "motif", "cde", "motifplus", "platinum", "sgi" and "compact". Depending on the platform, "windowsxp", "aqua" or "macintosh" may be available. @@ -1623,10 +1623,10 @@ Returns TRUE if an application object has not been created yet; otherwise returns FALSE.

    See also closingDown(). -

    TQStyle & TQApplication::style () [static] +

    TQStyle & TQApplication::style () [static]

    Returns the application's style object. -

    See also setStyle() and TQStyle. +

    See also setStyle() and TQStyle.

    void TQApplication::syncX () [static]

    diff --git a/doc/html/ntqcdestyle.html b/doc/html/ntqcdestyle.html index a0b65d13..9a4f50fb 100644 --- a/doc/html/ntqcdestyle.html +++ b/doc/html/ntqcdestyle.html @@ -53,7 +53,7 @@ checkboxes. Together with a dark background and a bright text/foreground color, the style looks quite attractive (at least for Motif fans).

    Note that the functions provided by TQCDEStyle are -reimplementations of TQStyle functions; see TQStyle for their +reimplementations of TQStyle functions; see TQStyle for their documentation.

    See also Widget Appearance and Style. diff --git a/doc/html/ntqcommonstyle.html b/doc/html/ntqcommonstyle.html index 5d46a613..35445ecb 100644 --- a/doc/html/ntqcommonstyle.html +++ b/doc/html/ntqcommonstyle.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

    The TQCommonStyle class encapsulates the common Look and Feel of a GUI. More...

    #include <ntqcommonstyle.h> -

    Inherits TQStyle. +

    Inherits TQStyle.

    Inherited by TQMotifStyle and TQWindowsStyle.

    List of all member functions.

    Public Members

    @@ -49,7 +49,7 @@ The TQCommonStyle class encapsulates the common Look and Feel of a GUI.

    This abstract class implements some of the widget's look and feel that is common to all GUI styles provided and shipped as part of TQt. -

    All the functions are documented in TQStyle. +

    All the functions are documented in TQStyle.

    See also Widget Appearance and Style.


    Member Function Documentation

    diff --git a/doc/html/ntqframe.html b/doc/html/ntqframe.html index cc60ee7e..c414306d 100644 --- a/doc/html/ntqframe.html +++ b/doc/html/ntqframe.html @@ -167,11 +167,11 @@ look depends upon the current GUI style.
  • TQFrame::TabWidgetPanel - is used to draw a frame suitable for tab widgets. The look depends upon the current GUI style.
  • TQFrame::MShape - internal mask -

    When it does not call TQStyle, Shape interacts with TQFrame::Shadow, +

    When it does not call TQStyle, Shape interacts with TQFrame::Shadow, the lineWidth() and the midLineWidth() to create the total result. See the picture of the frames in the class description. -

    See also TQFrame::Shadow, TQFrame::style(), and TQStyle::drawPrimitive(). +

    See also TQFrame::Shadow, TQFrame::style(), and TQStyle::drawPrimitive().


    Member Function Documentation

    TQFrame::TQFrame ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) diff --git a/doc/html/ntqmessagebox.html b/doc/html/ntqmessagebox.html index 06393793..1525fe6f 100644 --- a/doc/html/ntqmessagebox.html +++ b/doc/html/ntqmessagebox.html @@ -153,10 +153,10 @@ errors which can't be easily fixed:

    The text part of all message box messages can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. See -TQStyleSheet::defaultSheet() for details. With certain strings that +TQStyleSheet::defaultSheet() for details. With certain strings that contain XML meta characters, the auto-rich text detection may fail, interpreting plain text incorrectly as rich text. In these -rare cases, use TQStyleSheet::convertFromPlainText() to convert +rare cases, use TQStyleSheet::convertFromPlainText() to convert your plain text string to a visually equivalent rich text string or set the text format explicitly with setTextFormat().

    Note that the Microsoft Windows User Interface Guidelines diff --git a/doc/html/ntqmotifstyle.html b/doc/html/ntqmotifstyle.html index 64f27b36..85858c78 100644 --- a/doc/html/ntqmotifstyle.html +++ b/doc/html/ntqmotifstyle.html @@ -71,7 +71,7 @@ simple inversion between the base and the text color.

    The effect will show up the next time an application palette is set via TQApplication::setPalette(). The current color palette of the application remains unchanged. -

    See also TQStyle::polish(). +

    See also TQStyle::polish().

    bool TQMotifStyle::useHighlightColors () const

    diff --git a/doc/html/ntqpainter.html b/doc/html/ntqpainter.html index 7f51d407..1e4d450d 100644 --- a/doc/html/ntqpainter.html +++ b/doc/html/ntqpainter.html @@ -1520,9 +1520,9 @@ using the painter p.

    If you want to use a TQFrame widget instead, you can make it display a plain rectangle, for example TQFrame::setFrameStyle( TQFrame::Box | TQFrame::Plain ).

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawShadeRect() and TQStyle::drawPrimitive(). +

    See also qDrawShadeRect() and TQStyle::drawPrimitive().

    void qDrawShadeLine ( TQPainter * p, int x1, int y1, int x2, int y2, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth )

    @@ -1541,9 +1541,9 @@ drawn in the TQColorGroup::mid() color.

    If you want to use a TQFrame widget instead, you can make it display a shaded line, for example TQFrame::setFrameStyle( TQFrame::HLine | TQFrame::Sunken ).

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawShadeRect(), qDrawShadePanel(), and TQStyle::drawPrimitive(). +

    See also qDrawShadeRect(), qDrawShadePanel(), and TQStyle::drawPrimitive().

    void qDrawShadePanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, const TQBrush * fill )

    @@ -1558,9 +1558,9 @@ the painter p.

    If you want to use a TQFrame widget instead, you can make it display a shaded panel, for example TQFrame::setFrameStyle( TQFrame::Panel | TQFrame::Sunken ).

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and TQStyle::drawPrimitive(). +

    See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and TQStyle::drawPrimitive().

    void qDrawShadeRect ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth, const TQBrush * fill )

    @@ -1579,9 +1579,9 @@ drawn in the TQColorGroup::mid() color.

    If you want to use a TQFrame widget instead, you can make it display a shaded rectangle, for example TQFrame::setFrameStyle( TQFrame::Box | TQFrame::Raised ).

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), TQStyle::drawItem(), TQStyle::drawControl(), and TQStyle::drawComplexControl(). +

    See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), TQStyle::drawItem(), TQStyle::drawControl(), and TQStyle::drawComplexControl().

    void qDrawWinButton ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill )

    @@ -1593,9 +1593,9 @@ widgets that follow the current GUI style.

    The line width is 2 pixels.

    The button's interior is filled with the *fill brush unless fill is 0.

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawWinPanel() and TQStyle::drawControl(). +

    See also qDrawWinPanel() and TQStyle::drawControl().

    void qDrawWinPanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill )

    @@ -1609,9 +1609,9 @@ widgets that follow the current GUI style.

    If you want to use a TQFrame widget instead, you can make it display a shaded panel, for example TQFrame::setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ).

    Warning: This function does not look at TQWidget::style() or -TQApplication::style(). Use the drawing functions in TQStyle to make +TQApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. -

    See also qDrawShadePanel(), qDrawWinButton(), and TQStyle::drawPrimitive(). +

    See also qDrawShadePanel(), qDrawWinButton(), and TQStyle::drawPrimitive().


    diff --git a/doc/html/ntqplatinumstyle.html b/doc/html/ntqplatinumstyle.html index 82f60043..5510a93b 100644 --- a/doc/html/ntqplatinumstyle.html +++ b/doc/html/ntqplatinumstyle.html @@ -52,7 +52,7 @@ The TQPlatinumStyle class provides Mac/Platinum look and feel.

    This class implements the Platinum look and feel. It's an experimental class that tries to resemble a Macinosh-like GUI -style with the TQStyle system. The emulation is currently far from +style with the TQStyle system. The emulation is currently far from perfect.

    See also TQAquaStyle and Widget Appearance and Style. diff --git a/doc/html/ntqpopupmenu.html b/doc/html/ntqpopupmenu.html index 8c7cfe4a..4b0ce758 100644 --- a/doc/html/ntqpopupmenu.html +++ b/doc/html/ntqpopupmenu.html @@ -295,7 +295,7 @@ Draws menu item mi in the area x, y, w, painter p. The item is drawn active if act is TRUE or drawn inactive if act is FALSE. The rightmost tab_ pixels are used for accelerator text. -

    See also TQStyle::drawControl(). +

    See also TQStyle::drawControl().

    int TQPopupMenu::exec ()

    diff --git a/doc/html/ntqsgistyle.html b/doc/html/ntqsgistyle.html index 3c1f8c8e..6e87b625 100644 --- a/doc/html/ntqsgistyle.html +++ b/doc/html/ntqsgistyle.html @@ -47,7 +47,7 @@ body { background: #ffffff; color: black; } The TQSGIStyle class provides SGI/Irix look and feel.

    This class implements the SGI look and feel. It resembles the -SGI/Irix Motif GUI style as closely as TQStyle allows. +SGI/Irix Motif GUI style as closely as TQStyle allows.

    See also Widget Appearance and Style.


    Member Function Documentation

    diff --git a/doc/html/ntqsimplerichtext.html b/doc/html/ntqsimplerichtext.html index 2bc8af8b..36f26494 100644 --- a/doc/html/ntqsimplerichtext.html +++ b/doc/html/ntqsimplerichtext.html @@ -62,7 +62,7 @@ The TQSimpleRichText class provides a small displayable piece of rich text.

    This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A -TQStyleSheet is needed to interpret the tags and format the rich +TQStyleSheet is needed to interpret the tags and format the rich text. TQt provides a default HTML-like style sheet, but you may define custom style sheets.

    Once created, the rich text object can be queried for its width(), @@ -83,7 +83,7 @@ laid out properly on the page.

    See also Text Related Classes.


    Member Function Documentation

    -

    TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 ) +

    TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )

    Constructs a TQSimpleRichText from the rich text string text and the font fnt. @@ -102,9 +102,9 @@ to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details.

    The sheet is an optional style sheet. If it is 0, the default -style sheet will be used (see TQStyleSheet::defaultSheet()). +style sheet will be used (see TQStyleSheet::defaultSheet()). -

    TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE ) +

    TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )

    Constructs a TQSimpleRichText from the rich text string text and the font fnt. @@ -120,7 +120,7 @@ to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details.

    The sheet is an optional style sheet. If it is 0, the default -style sheet will be used (see TQStyleSheet::defaultSheet()). +style sheet will be used (see TQStyleSheet::defaultSheet()).

    This constructor is useful for creating a TQSimpleRichText object suitable for printing. Set pageBreak to be the height of the contents area of the pages. diff --git a/doc/html/ntqsplitter.html b/doc/html/ntqsplitter.html index 46eabb1a..be8ee2cf 100644 --- a/doc/html/ntqsplitter.html +++ b/doc/html/ntqsplitter.html @@ -169,7 +169,7 @@ See the "childrenCollapsible This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

    Draws the splitter handle in the rectangle described by x, y, w, h using painter p. -

    See also TQStyle::drawPrimitive(). +

    See also TQStyle::drawPrimitive().

    void TQSplitter::getRange ( int id, int * min, int * max ) [protected]

    diff --git a/doc/html/ntqstyle.html b/doc/html/ntqstyle.html deleted file mode 100644 index 2e0c8a32..00000000 --- a/doc/html/ntqstyle.html +++ /dev/null @@ -1,1220 +0,0 @@ - - - - - -TQStyle Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStyle Class Reference

    - -

    The TQStyle class specifies the look and feel of a GUI. -More... -

    #include <ntqstyle.h> -

    Inherits TQObject. -

    Inherited by TQCommonStyle. -

    List of all member functions. -

    Public Members

    -
      -
    • TQStyle ()
    • -
    • virtual ~TQStyle ()
    • -
    • virtual void polish ( TQWidget * )
    • -
    • virtual void unPolish ( TQWidget * )
    • -
    • virtual void polish ( TQApplication * )
    • -
    • virtual void unPolish ( TQApplication * )
    • -
    • virtual void polish ( TQPalette & )
    • -
    • virtual void polishPopupMenu ( TQPopupMenu * ) = 0
    • -
    • virtual TQRect itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const
    • -
    • virtual void drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const
    • -
    • enum PrimitiveElement { PE_ButtonCommand, PE_ButtonDefault, PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect, PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft, PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus, PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask, PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask, PE_DockWindowHandle, PE_DockWindowSeparator, PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup, PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase, PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection, PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark, PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage, PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst, PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit, PE_PanelTabWidget, PE_WindowFrame, PE_CheckListController, PE_CheckListIndicator, PE_CheckListExclusiveIndicator, PE_PanelGroupBox, PE_RubberBand, PE_CustomBase = 0xf000000 }
    • -
    • enum StyleFlags { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }
    • -
    • virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • enum ControlElement { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea, CE_PopupMenuScroller, CE_DockWindowEmptyArea, CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra, CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }
    • -
    • virtual void drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • virtual void drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • enum SubRect { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply, SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort, SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom, SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }
    • -
    • virtual TQRect subRect ( SubRect subrect, const TQWidget * widget ) const = 0
    • -
    • enum ComplexControl { CC_SpinWidget, CC_ComboBox, CC_ScrollBar, CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase = 0xf0000000 }
    • -
    • enum SubControl { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }
    • -
    • virtual void drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • virtual void drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • virtual TQRect querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • virtual SubControl querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • enum PixelMetric { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_PopupMenuScrollerHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize, PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing, PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }
    • -
    • virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const = 0
    • -
    • enum ContentsType { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip, CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }
    • -
    • virtual TQSize sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • enum StyleHint { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable, SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor, SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator, SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }
    • -
    • virtual int styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const = 0
    • -
    • enum StylePixmap { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion, SP_CustomBase = 0xf0000000 }
    • -
    • virtual TQPixmap stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
    • -
    • int defaultFrameWidth () const  (obsolete)
    • -
    • void tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const  (obsolete)
    • -
    • TQSize scrollBarExtent () const  (obsolete)
    • -
    -

    Static Public Members

    -
      -
    • TQRect visualRect ( const TQRect & logical, const TQWidget * w )
    • -
    • TQRect visualRect ( const TQRect & logical, const TQRect & bounding )
    • -
    -

    Detailed Description

    - - -The TQStyle class specifies the look and feel of a GUI. - -

    A large number of GUI elements are common to many widgets. The -TQStyle class allows the look of these elements to be modified -across all widgets that use the TQStyle functions. It also -provides two feel options: Motif and Windows. -

    Although it is not possible to fully enumerate the look of -graphical elements and the feel of widgets in a GUI, TQStyle -provides a considerable amount of control and customisability. -

    In TQt 1.x the look and feel option for widgets was specified by a -single value: the GUIStyle. Starting with TQt 2.0, this notion was -expanded to allow the look to be specified by virtual drawing -functions. -

    Derived classes may reimplement some or all of the drawing -functions to modify the look of all widgets that use those -functions. -

    Languages written from right to left (such as Arabic and Hebrew) -usually also mirror the whole layout of widgets. If you design a -style, you should take special care when drawing asymmetric -elements to make sure that they also look correct in a mirrored -layout. You can start your application with -reverse to check -the mirrored layout. Also notice, that for a reversed layout, the -light usually comes from top right instead of top left. -

    The actual reverse layout is performed automatically when -possible. However, for the sake of flexibility, the translation -cannot be performed everywhere. The documentation for each -function in the TQStyle API states whether the function -expects/returns logical or screen coordinates. Using logical -coordinates (in ComplexControls, for example) provides great -flexibility in controlling the look of a widget. Use visualRect() -when necessary to translate logical coordinates into screen -coordinates for drawing. -

    In TQt versions prior to 3.0, if you wanted a low level route into -changing the appearance of a widget, you would reimplement -polish(). With the new 3.0 style engine the recommended approach -is to reimplement the draw functions, for example drawItem(), -drawPrimitive(), drawControl(), drawControlMask(), -drawComplexControl() and drawComplexControlMask(). Each of these -functions is called with a range of parameters that provide -information that you can use to determine how to draw them, e.g. -style flags, rectangle, color group, etc. -

    For information on changing elements of an existing style or -creating your own style see the Style - overview. -

    Styles can also be created as plugins. -

    See also Widget Appearance and Style. - -


    Member Type Documentation

    -

    TQStyle::ComplexControl

    - -

    This enum represents a ComplexControl. ComplexControls have -different behaviour depending upon where the user clicks on them -or which keys are pressed. -

      -
    • TQStyle::CC_SpinWidget -
    • TQStyle::CC_ComboBox -
    • TQStyle::CC_ScrollBar -
    • TQStyle::CC_Slider -
    • TQStyle::CC_ToolButton -
    • TQStyle::CC_TitleBar -
    • TQStyle::CC_ListView -

      -
    • TQStyle::CC_CustomBase - base value for custom ControlElements. All -values above this are reserved for custom use. Therefore, -custom values must be greater than this value. -

    See also SubControl and drawComplexControl(). - -

    TQStyle::ContentsType

    - -

    This enum represents a ContentsType. It is used to calculate sizes -for the contents of various widgets. -

      -
    • TQStyle::CT_PushButton -
    • TQStyle::CT_CheckBox -
    • TQStyle::CT_RadioButton -
    • TQStyle::CT_ToolButton -
    • TQStyle::CT_ComboBox -
    • TQStyle::CT_Splitter -
    • TQStyle::CT_DockWindow -
    • TQStyle::CT_ProgressBar -
    • TQStyle::CT_PopupMenuItem -
    • TQStyle::CT_TabBarTab -
    • TQStyle::CT_Slider -
    • TQStyle::CT_Header -
    • TQStyle::CT_LineEdit -
    • TQStyle::CT_MenuBar -
    • TQStyle::CT_SpinBox -
    • TQStyle::CT_SizeGrip -
    • TQStyle::CT_TabWidget -
    • TQStyle::CT_DialogButtons -
    • TQStyle::CT_CustomBase - base value for custom ControlElements. All -values above this are reserved for custom use. Custom values -must be greater than this value. -

    See also sizeFromContents(). - -

    TQStyle::ControlElement

    - -

    This enum represents a ControlElement. A ControlElement is part of -a widget that performs some action or displays information to the -user. -

      -
    • TQStyle::CE_PushButton - the bevel and default indicator of a TQPushButton. -
    • TQStyle::CE_PushButtonLabel - the label (iconset with text or pixmap) -of a TQPushButton. -
    • TQStyle::CE_CheckBox - the indicator of a TQCheckBox. -
    • TQStyle::CE_CheckBoxLabel - the label (text or pixmap) of a TQCheckBox. -
    • TQStyle::CE_RadioButton - the indicator of a TQRadioButton. -
    • TQStyle::CE_RadioButtonLabel - the label (text or pixmap) of a TQRadioButton. -
    • TQStyle::CE_TabBarTab - the tab within a TQTabBar (a TQTab). -
    • TQStyle::CE_TabBarLabel - the label within a TQTab. -
    • TQStyle::CE_ProgressBarGroove - the groove where the progress -indicator is drawn in a TQProgressBar. -
    • TQStyle::CE_ProgressBarContents - the progress indicator of a TQProgressBar. -
    • TQStyle::CE_ProgressBarLabel - the text label of a TQProgressBar. -
    • TQStyle::CE_PopupMenuItem - a menu item in a TQPopupMenu. -
    • TQStyle::CE_PopupMenuScroller - scrolling areas in a popumenu when the -style supports scrolling. -
    • TQStyle::CE_PopupMenuHorizontalExtra - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra -
    • TQStyle::CE_PopupMenuVerticalExtra - extra frame area set aside with PM_PopupMenuFrameVerticalExtra -
    • TQStyle::CE_MenuBarItem - a menu item in a TQMenuBar. -
    • TQStyle::CE_ToolButtonLabel - a tool button's label. -
    • TQStyle::CE_MenuBarEmptyArea - the empty area of a TQMenuBar. -
    • TQStyle::CE_DockWindowEmptyArea - the empty area of a TQDockWindow. -
    • TQStyle::CE_ToolBoxTab - the toolbox's tab area -
    • TQStyle::CE_HeaderLabel - the header's label -
    • TQStyle::CE_CustomBase - base value for custom ControlElements. All values above -this are reserved for custom use. Therefore, custom values must be -greater than this value. -

    See also drawControl(). - -

    TQStyle::PixelMetric

    - -

    This enum represents a PixelMetric. A PixelMetric is a style -dependent size represented as a single pixel value. -

      -
    • TQStyle::PM_ButtonMargin - amount of whitespace between pushbutton -labels and the frame. -
    • TQStyle::PM_ButtonDefaultIndicator - width of the default-button indicator frame. -
    • TQStyle::PM_MenuButtonIndicator - width of the menu button indicator -proportional to the widget height. -
    • TQStyle::PM_ButtonShiftHorizontal - horizontal contents shift of a -button when the button is down. -
    • TQStyle::PM_ButtonShiftVertical - vertical contents shift of a button when the -button is down. -
    • TQStyle::PM_DefaultFrameWidth - default frame width, usually 2. -
    • TQStyle::PM_SpinBoxFrameWidth - frame width of a spin box. -
    • TQStyle::PM_MDIFrameWidth - frame width of an MDI window. -
    • TQStyle::PM_MDIMinimizedWidth - width of a minimized MSI window. -
    • TQStyle::PM_MaximumDragDistance - Some feels require the scrollbar or -other sliders to jump back to the original position when the -mouse pointer is too far away while dragging. A value of -1 -disables this behavior. -
    • TQStyle::PM_ScrollBarExtent - width of a vertical scrollbar and the -height of a horizontal scrollbar. -
    • TQStyle::PM_ScrollBarSliderMin - the minimum height of a vertical -scrollbar's slider and the minimum width of a horiztonal -scrollbar slider. -
    • TQStyle::PM_SliderThickness - total slider thickness. -
    • TQStyle::PM_SliderControlThickness - thickness of the slider handle. -
    • TQStyle::PM_SliderLength - length of the slider. -
    • TQStyle::PM_SliderTickmarkOffset - the offset between the tickmarks -and the slider. -
    • TQStyle::PM_SliderSpaceAvailable - the available space for the slider to move. -
    • TQStyle::PM_DockWindowSeparatorExtent - width of a separator in a -horiztonal dock window and the height of a separator in a -vertical dock window. -
    • TQStyle::PM_DockWindowHandleExtent - width of the handle in a -horizontal dock window and the height of the handle in a -vertical dock window. -
    • TQStyle::PM_DockWindowFrameWidth - frame width of a dock window. -
    • TQStyle::PM_MenuBarFrameWidth - frame width of a menubar. -
    • TQStyle::PM_MenuBarItemSpacing - spacing between menubar items. -
    • TQStyle::PM_ToolBarItemSpacing - spacing between toolbar items. -
    • TQStyle::PM_TabBarTabOverlap - number of pixels the tabs should overlap. -
    • TQStyle::PM_TabBarTabHSpace - extra space added to the tab width. -
    • TQStyle::PM_TabBarTabVSpace - extra space added to the tab height. -
    • TQStyle::PM_TabBarBaseHeight - height of the area between the tab bar -and the tab pages. -
    • TQStyle::PM_TabBarBaseOverlap - number of pixels the tab bar overlaps -the tab bar base. -
    • TQStyle::PM_TabBarScrollButtonWidth -
    • TQStyle::PM_TabBarTabShiftHorizontal - horizontal pixel shift when a -tab is selected. -
    • TQStyle::PM_TabBarTabShiftVertical - vertical pixel shift when a -tab is selected. -
    • TQStyle::PM_ProgressBarChunkWidth - width of a chunk in a progress bar indicator. -
    • TQStyle::PM_SplitterWidth - width of a splitter. -
    • TQStyle::PM_TitleBarHeight - height of the title bar. -
    • TQStyle::PM_PopupMenuFrameHorizontalExtra - additional border, e.g. for panels -
    • TQStyle::PM_PopupMenuFrameVerticalExtra - additional border, e.g. for panels -
    • TQStyle::PM_IndicatorWidth - width of a check box indicator. -
    • TQStyle::PM_IndicatorHeight - height of a checkbox indicator. -
    • TQStyle::PM_ExclusiveIndicatorWidth - width of a radio button indicator. -
    • TQStyle::PM_ExclusiveIndicatorHeight - height of a radio button indicator. -
    • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. -
    • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. -
    • TQStyle::PM_CheckListButtonSize - area (width/height) of the -checkbox/radiobutton in a TQCheckListItem -
    • TQStyle::PM_CheckListControllerSize - area (width/height) of the -controller in a TQCheckListItem -
    • TQStyle::PM_DialogButtonsSeparator - distance between buttons in a dialog buttons widget. -
    • TQStyle::PM_DialogButtonsButtonWidth - minimum width of a button in a dialog buttons widget. -
    • TQStyle::PM_DialogButtonsButtonHeight - minimum height of a button in a dialog buttons widget. -
    • TQStyle::PM_HeaderMarkSize -
    • TQStyle::PM_HeaderGripMargin -
    • TQStyle::PM_HeaderMargin -
    • TQStyle::PM_CustomBase - base value for custom ControlElements. All -values above this are reserved for custom use. Therefore, -custom values must be greater than this value. -

    See also pixelMetric(). - -

    TQStyle::PrimitiveElement

    - -

    This enum represents the PrimitiveElements of a style. A -PrimitiveElement is a common GUI element, such as a checkbox -indicator or pushbutton bevel. -

      -
    • TQStyle::PE_ButtonCommand - button used to initiate an action, for -example, a TQPushButton. -
    • TQStyle::PE_ButtonDefault - this button is the default button, e.g. -in a dialog. -
    • TQStyle::PE_ButtonBevel - generic button bevel. -
    • TQStyle::PE_ButtonTool - tool button, for example, a TQToolButton. -
    • TQStyle::PE_ButtonDropDown - drop down button, for example, a tool -button that displays a popup menu, for example, TQPopupMenu. -

      -
    • TQStyle::PE_FocusRect - generic focus indicator. -

      -
    • TQStyle::PE_ArrowUp - up arrow. -
    • TQStyle::PE_ArrowDown - down arrow. -
    • TQStyle::PE_ArrowRight - right arrow. -
    • TQStyle::PE_ArrowLeft - left arrow. -

      -
    • TQStyle::PE_SpinWidgetUp - up symbol for a spin widget, for example a -TQSpinBox. -
    • TQStyle::PE_SpinWidgetDown - down symbol for a spin widget. -
    • TQStyle::PE_SpinWidgetPlus - increase symbol for a spin widget. -
    • TQStyle::PE_SpinWidgetMinus - decrease symbol for a spin widget. -

      -
    • TQStyle::PE_Indicator - on/off indicator, for example, a TQCheckBox. -
    • TQStyle::PE_IndicatorMask - bitmap mask for an indicator. -
    • TQStyle::PE_ExclusiveIndicator - exclusive on/off indicator, for -example, a TQRadioButton. -
    • TQStyle::PE_ExclusiveIndicatorMask - bitmap mask for an exclusive indicator. -

      -
    • TQStyle::PE_DockWindowHandle - tear off handle for dock windows and -toolbars, for example TQDockWindows and TQToolBars. -
    • TQStyle::PE_DockWindowSeparator - item separator for dock window and -toolbar contents. -
    • TQStyle::PE_DockWindowResizeHandle - resize handle for dock windows. -
    • TQStyle::PE_Splitter - splitter handle; see also TQSplitter. -

      -
    • TQStyle::PE_Panel - generic panel frame; see also TQFrame. -
    • TQStyle::PE_PanelPopup - panel frame for popup windows/menus; see also -TQPopupMenu. -
    • TQStyle::PE_PanelMenuBar - panel frame for menu bars. -
    • TQStyle::PE_PanelDockWindow - panel frame for dock windows and toolbars. -
    • TQStyle::PE_PanelTabWidget - panel frame for tab widgets. -
    • TQStyle::PE_PanelLineEdit - panel frame for line edits. -
    • TQStyle::PE_PanelGroupBox - panel frame for group boxes. -
    • TQStyle::PE_TabBarBase - area below tabs in a tab widget, for example, -TQTab. -

      -
    • TQStyle::PE_HeaderSection - section of a list or table header; see also -TQHeader. -
    • TQStyle::PE_HeaderArrow - arrow used to indicate sorting on a list or table -header -
    • TQStyle::PE_StatusBarSection - section of a status bar; see also -TQStatusBar. -

      -
    • TQStyle::PE_GroupBoxFrame - frame around a group box; see also -TQGroupBox. -
    • TQStyle::PE_WindowFrame - frame around a MDI window or a docking window -

      -
    • TQStyle::PE_Separator - generic separator. -

      -
    • TQStyle::PE_SizeGrip - window resize handle; see also TQSizeGrip. -

      -
    • TQStyle::PE_CheckMark - generic check mark; see also TQCheckBox. -

      -
    • TQStyle::PE_ScrollBarAddLine - scrollbar line increase indicator -(i.e. scroll down); see also TQScrollBar. -
    • TQStyle::PE_ScrollBarSubLine - scrollbar line decrease indicator (i.e. scroll up). -
    • TQStyle::PE_ScrollBarAddPage - scolllbar page increase indicator (i.e. page down). -
    • TQStyle::PE_ScrollBarSubPage - scrollbar page decrease indicator (i.e. page up). -
    • TQStyle::PE_ScrollBarSlider - scrollbar slider -
    • TQStyle::PE_ScrollBarFirst - scrollbar first line indicator (i.e. home). -
    • TQStyle::PE_ScrollBarLast - scrollbar last line indicator (i.e. end). -

      -
    • TQStyle::PE_ProgressBarChunk - section of a progress bar indicator; see -also TQProgressBar. -
    • TQStyle::PE_CheckListController - controller part of a listview item -
    • TQStyle::PE_CheckListIndicator - checkbox part of a listview item -
    • TQStyle::PE_CheckListExclusiveIndicator - radiobutton part of a listview item -
    • TQStyle::PE_RubberBand - rubber band used in such things as iconview -
    • TQStyle::PE_CustomBase - base value for custom PrimitiveElements. -All values above this are reserved for custom use. Custom -values must be greater than this value. -

    See also drawPrimitive(). - -

    TQStyle::StyleFlags

    - -

    This enum represents flags for drawing PrimitiveElements. Not all -primitives use all of these flags. Note that these flags may mean -different things to different primitives. For an explanation of -the relationship between primitives and their flags, as well as -the different meanings of the flags, see the Style overview. -

      -
    • TQStyle::Style_Default -
    • TQStyle::Style_Enabled -
    • TQStyle::Style_Raised -
    • TQStyle::Style_Sunken -
    • TQStyle::Style_Off -
    • TQStyle::Style_NoChange -
    • TQStyle::Style_On -
    • TQStyle::Style_Down -
    • TQStyle::Style_Horizontal -
    • TQStyle::Style_HasFocus -
    • TQStyle::Style_Top -
    • TQStyle::Style_Bottom -
    • TQStyle::Style_FocusAtBorder -
    • TQStyle::Style_AutoRaise -
    • TQStyle::Style_MouseOver -
    • TQStyle::Style_Up -
    • TQStyle::Style_Selected -
    • TQStyle::Style_HasFocus -
    • TQStyle::Style_Active -
    • TQStyle::Style_ButtonDefault -

    See also drawPrimitive(). - -

    TQStyle::StyleHint

    - -

    This enum represents a StyleHint. A StyleHint is a general look -and/or feel hint. -

      -
    • TQStyle::SH_EtchDisabledText - disabled text is "etched" like Windows. -
    • TQStyle::SH_GUIStyle - the GUI style to use. -
    • TQStyle::SH_ScrollBar_BackgroundMode - the background mode for a -TQScrollBar. Possible values are any of those in the BackgroundMode enum. -
    • TQStyle::SH_ScrollBar_MiddleClickAbsolutePosition - a boolean value. -If TRUE, middle clicking on a scrollbar causes the slider to -jump to that position. If FALSE, the middle clicking is -ignored. -
    • TQStyle::SH_ScrollBar_LeftClickAbsolutePosition - a boolean value. -If TRUE, left clicking on a scrollbar causes the slider to -jump to that position. If FALSE, the left clicking will -behave as appropriate for each control. -
    • TQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl - a boolean -value. If TRUE, when clicking a scrollbar SubControl, holding -the mouse button down and moving the pointer outside the -SubControl, the scrollbar continues to scroll. If FALSE, the -scollbar stops scrolling when the pointer leaves the -SubControl. -
    • TQStyle::SH_TabBar_Alignment - the alignment for tabs in a -TQTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. -
    • TQStyle::SH_Header_ArrowAlignment - the placement of the sorting -indicator may appear in list or table headers. Possible values -are TQt::Left or TQt::Right. -
    • TQStyle::SH_Slider_SnapToValue - sliders snap to values while moving, -like Windows -
    • TQStyle::SH_Slider_SloppyKeyEvents - key presses handled in a sloppy -manner, i.e. left on a vertical slider subtracts a line. -
    • TQStyle::SH_ProgressDialog_CenterCancelButton - center button on -progress dialogs, like Motif, otherwise right aligned. -
    • TQStyle::SH_ProgressDialog_TextLabelAlignment - TQt::AlignmentFlags -- -text label alignment in progress dialogs; Center on windows, -Auto|VCenter otherwise. -
    • TQStyle::SH_PrintDialog_RightAlignButtons - right align buttons in -the print dialog, like Windows. -
    • TQStyle::SH_MainWindow_SpaceBelowMenuBar - 1 or 2 pixel space between -the menubar and the dockarea, like Windows. -
    • TQStyle::SH_FontDialog_SelectAssociatedText - select the text in the -line edit, or when selecting an item from the listbox, or when -the line edit receives focus, like Windows. -
    • TQStyle::SH_PopupMenu_AllowActiveAndDisabled - allows disabled menu -items to be active. -
    • TQStyle::SH_PopupMenu_SpaceActivatesItem - pressing Space activates -the item, like Motif. -
    • TQStyle::SH_PopupMenu_SubMenuPopupDelay - the number of milliseconds -to wait before opening a submenu; 256 on windows, 96 on Motif. -
    • TQStyle::SH_PopupMenu_Scrollable - whether popupmenu's must support -scrolling. -
    • TQStyle::SH_PopupMenu_SloppySubMenus - whether popupmenu's must support -sloppy submenu; as implemented on Mac OS. -
    • TQStyle::SH_ScrollView_FrameOnlyAroundContents - whether scrollviews -draw their frame only around contents (like Motif), or around -contents, scrollbars and corner widgets (like Windows). -
    • TQStyle::SH_MenuBar_AltKeyNavigation - menubars items are navigable -by pressing Alt, followed by using the arrow keys to select -the desired item. -
    • TQStyle::SH_ComboBox_ListMouseTracking - mouse tracking in combobox -dropdown lists. -
    • TQStyle::SH_PopupMenu_MouseTracking - mouse tracking in popup menus. -
    • TQStyle::SH_MenuBar_MouseTracking - mouse tracking in menubars. -
    • TQStyle::SH_ItemView_ChangeHighlightOnFocus - gray out selected items -when losing focus. -
    • TQStyle::SH_Widget_ShareActivation - turn on sharing activation with -floating modeless dialogs. -
    • TQStyle::SH_TabBar_SelectMouseType - which type of mouse event should -cause a tab to be selected. -
    • TQStyle::SH_ListViewExpand_SelectMouseType - which type of mouse event should -cause a listview expansion to be selected. -
    • TQStyle::SH_TabBar_PreferNoArrows - whether a tabbar should suggest a size -to prevent scoll arrows. -
    • TQStyle::SH_ComboBox_Popup - allows popups as a combobox dropdown -menu. -
    • TQStyle::SH_Workspace_FillSpaceOnMaximize - the workspace should -maximize the client area. -
    • TQStyle::SH_TitleBar_NoBorder - the titlebar has no border -
    • TQStyle::SH_ScrollBar_StopMouseOverSlider - stops autorepeat when -slider reaches mouse -
    • TQStyle::SH_BlinkCursorWhenTextSelected - whether cursor should blink -when text is selected -
    • TQStyle::SH_RichText_FullWidthSelection - whether richtext selections -should extend the full width of the document. -
    • TQStyle::SH_GroupBox_TextLabelVerticalAlignment - how to vertically align a -groupbox's text label. -
    • TQStyle::SH_GroupBox_TextLabelColor - how to paint a groupbox's text label. -
    • TQStyle::SH_DialogButtons_DefaultButton - which buttons gets the -default status in a dialog's button widget. -
    • TQStyle::SH_CustomBase - base value for custom ControlElements. All -values above this are reserved for custom use. Therefore, -custom values must be greater than this value. -
    • TQStyle::SH_ToolButton_Uses3D - indicates whether TQToolButtons should -use a 3D frame when the mouse is over them -
    • TQStyle::SH_ToolBox_SelectedPageTitleBold - Boldness of the selected -page title in a TQToolBox. -
    • TQStyle::SH_LineEdit_PasswordCharacter - The TQChar Unicode character -to be used for passwords. -
    • TQStyle::SH_Table_GridLineColor -
    • TQStyle::SH_UnderlineAccelerator - whether accelerators are underlined -

    See also styleHint(). - -

    TQStyle::StylePixmap

    - -

    This enum represents a StylePixmap. A StylePixmap is a pixmap that -can follow some existing GUI style or guideline. -

      -
    • TQStyle::SP_TitleBarMinButton - minimize button on titlebars. For -example, in a TQWorkspace. -
    • TQStyle::SP_TitleBarMaxButton - maximize button on titlebars. -
    • TQStyle::SP_TitleBarCloseButton - close button on titlebars. -
    • TQStyle::SP_TitleBarNormalButton - normal (restore) button on titlebars. -
    • TQStyle::SP_TitleBarShadeButton - shade button on titlebars. -
    • TQStyle::SP_TitleBarUnshadeButton - unshade button on titlebars. -
    • TQStyle::SP_MessageBoxInformation - the 'information' icon. -
    • TQStyle::SP_MessageBoxWarning - the 'warning' icon. -
    • TQStyle::SP_MessageBoxCritical - the 'critical' icon. -
    • TQStyle::SP_MessageBoxQuestion - the 'question' icon. -

      -
    • TQStyle::SP_DockWindowCloseButton - close button on dock windows; -see also TQDockWindow. -

      -
    • TQStyle::SP_CustomBase - base value for custom ControlElements. All -values above this are reserved for custom use. Therefore, -custom values must be greater than this value. -

    See also stylePixmap(). - -

    TQStyle::SubControl

    - -

    This enum represents a SubControl within a ComplexControl. -

      -
    • TQStyle::SC_None - special value that matches no other SubControl. -

      -
    • TQStyle::SC_ScrollBarAddLine - scrollbar add line (i.e. down/right -arrow); see also TQScrollbar. -
    • TQStyle::SC_ScrollBarSubLine - scrollbar sub line (i.e. up/left arrow). -
    • TQStyle::SC_ScrollBarAddPage - scrollbar add page (i.e. page down). -
    • TQStyle::SC_ScrollBarSubPage - scrollbar sub page (i.e. page up). -
    • TQStyle::SC_ScrollBarFirst - scrollbar first line (i.e. home). -
    • TQStyle::SC_ScrollBarLast - scrollbar last line (i.e. end). -
    • TQStyle::SC_ScrollBarSlider - scrollbar slider handle. -
    • TQStyle::SC_ScrollBarGroove - special subcontrol which contains the -area in which the slider handle may move. -

      -
    • TQStyle::SC_SpinWidgetUp - spinwidget up/increase; see also TQSpinBox. -
    • TQStyle::SC_SpinWidgetDown - spinwidget down/decrease. -
    • TQStyle::SC_SpinWidgetFrame - spinwidget frame. -
    • TQStyle::SC_SpinWidgetEditField - spinwidget edit field. -
    • TQStyle::SC_SpinWidgetButtonField - spinwidget button field. -

      -
    • TQStyle::SC_ComboBoxEditField - combobox edit field; see also TQComboBox. -
    • TQStyle::SC_ComboBoxArrow - combobox arrow -
    • TQStyle::SC_ComboBoxFrame - combobox frame -
    • TQStyle::SC_ComboBoxListBoxPopup - combobox list box -
    • TQStyle::SC_SliderGroove - special subcontrol which contains the area -in which the slider handle may move. -
    • TQStyle::SC_SliderHandle - slider handle. -
    • TQStyle::SC_SliderTickmarks - slider tickmarks. -

      -
    • TQStyle::SC_ToolButton - tool button; see also TQToolbutton. -
    • TQStyle::SC_ToolButtonMenu - subcontrol for opening a popup menu in a -tool button; see also TQPopupMenu. -

      -
    • TQStyle::SC_TitleBarSysMenu - system menu button (i.e. restore, close, etc.). -
    • TQStyle::SC_TitleBarMinButton - minimize button. -
    • TQStyle::SC_TitleBarMaxButton - maximize button. -
    • TQStyle::SC_TitleBarCloseButton - close button. -
    • TQStyle::SC_TitleBarLabel - window title label. -
    • TQStyle::SC_TitleBarNormalButton - normal (restore) button. -
    • TQStyle::SC_TitleBarShadeButton - shade button. -
    • TQStyle::SC_TitleBarUnshadeButton - unshade button. -

      -
    • TQStyle::SC_ListView - the list view area. -
    • TQStyle::SC_ListViewBranch - (internal) -
    • TQStyle::SC_ListViewExpand - expand item (i.e. show/hide child items). -

      -
    • TQStyle::SC_All - special value that matches all SubControls. -

    See also ComplexControl. - -

    TQStyle::SubRect

    - -

    This enum represents a sub-area of a widget. Style implementations -would use these areas to draw the different parts of a widget. -

      -
    • TQStyle::SR_PushButtonContents - area containing the label (iconset -with text or pixmap). -
    • TQStyle::SR_PushButtonFocusRect - area for the focus rect (usually -larger than the contents rect). -
    • TQStyle::SR_CheckBoxIndicator - area for the state indicator (e.g. check mark). -
    • TQStyle::SR_CheckBoxContents - area for the label (text or pixmap). -
    • TQStyle::SR_CheckBoxFocusRect - area for the focus indicator. -

      -
    • TQStyle::SR_RadioButtonIndicator - area for the state indicator. -
    • TQStyle::SR_RadioButtonContents - area for the label. -
    • TQStyle::SR_RadioButtonFocusRect - area for the focus indicator. -

      -
    • TQStyle::SR_ComboBoxFocusRect - area for the focus indicator. -

      -
    • TQStyle::SR_SliderFocusRect - area for the focus indicator. -

      -
    • TQStyle::SR_DockWindowHandleRect - area for the tear-off handle. -

      -
    • TQStyle::SR_ProgressBarGroove - area for the groove. -
    • TQStyle::SR_ProgressBarContents - area for the progress indicator. -
    • TQStyle::SR_ProgressBarLabel - area for the text label. -

      -
    • TQStyle::SR_ToolButtonContents - area for the tool button's label. -
    • TQStyle::SR_DialogButtonAccept - area for a dialog's accept button. -
    • TQStyle::SR_DialogButtonReject - area for a dialog's reject button. -
    • TQStyle::SR_DialogButtonApply - area for a dialog's apply button. -
    • TQStyle::SR_DialogButtonHelp - area for a dialog's help button. -
    • TQStyle::SR_DialogButtonAll - area for a dialog's all button. -
    • TQStyle::SR_DialogButtonRetry - area for a dialog's retry button. -
    • TQStyle::SR_DialogButtonAbort - area for a dialog's abort button. -
    • TQStyle::SR_DialogButtonIgnore - area for a dialog's ignore button. -
    • TQStyle::SR_DialogButtonCustom - area for a dialog's custom widget area (in button row). -
    • TQStyle::SR_ToolBoxTabContents - area for a toolbox tab's icon and label -
    • TQStyle::SR_CustomBase - base value for custom ControlElements. All values above -this are reserved for custom use. Therefore, custom values must be -greater than this value. -

    See also subRect(). - -


    Member Function Documentation

    -

    TQStyle::TQStyle () -

    -Constructs a TQStyle. - -

    TQStyle::~TQStyle () [virtual] -

    -Destroys the style and frees all allocated resources. - -

    int TQStyle::defaultFrameWidth () const -

    - -This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    -

    void TQStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Draws the ComplexControl control using the painter p in the -area r. Colors are used from the color group cg. The sub -argument specifies which SubControls to draw. Multiple SubControls -can be OR'ed together. The subActive argument specifies which -SubControl is active. -

    The rect r should be in logical coordinates. Reimplementations -of this function should use visualRect() to change the logical -coordinates into screen coordinates when using drawPrimitive() and -drawControl(). -

    The how argument is used to control how the ComplexControl is -drawn. Multiple flags can OR'ed together. See the table below for -an explanation of which flags are used with the various -ComplexControls. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of control. The opt argument can be used to -pass extra information required when drawing the ComplexControl. -Note that opt may be the default value even for ComplexControls -that can make use of the extra options. See the table below for -the appropriate widget and opt usage: -

    -
    ComplexControl
    & Widget Cast -
    Style Flags -Notes -Options -Notes -
    CC_SpinWidget(const TQSpinWidget *) -Style_Enabled Set if the spinwidget is enabled. - Unused. -   -
    Style_HasFocus Set if the spinwidget has input focus. -
    CC_ComboBox(const TQComboBox *) -Style_Enabled Set if the combobox is enabled. - Unused. -   -
    Style_HasFocus Set if the combobox has input focus. -
    CC_ScrollBar(const TQScrollBar *) -Style_Enabled Set if the scrollbar is enabled. - Unused. -   -
    Style_HasFocus Set if the scrollbar has input focus. -
    CC_Slider(const TQSlider *) -Style_Enabled Set if the slider is enabled. - Unused. -   -
    Style_HasFocus Set if the slider has input focus. -
    CC_ToolButton(const TQToolButton *) -Style_Enabled Set if the toolbutton is enabled. - TQStyleOption ( ArrowType t ) - - When the tool button only contains an arrow, t is the -arrow's type. -
    Style_HasFocus Set if the toolbutton has input focus. -
    Style_Down Set if the toolbutton is down (ie. mouse -button or space pressed). -
    Style_On Set if the toolbutton is a toggle button -and is toggled on. -
    Style_AutoRaise Set if the toolbutton has auto-raise enabled. -
    Style_Raised Set if the button is not down, not on and doesn't -contain the mouse when auto-raise is enabled. -
    CC_TitleBar(const TQWidget *) -Style_Enabled Set if the titlebar is enabled. -Unused. -  -
    CC_ListView(const TQListView *) -Style_Enabled Set if the titlebar is enabled. -TQStyleOption ( TQListViewItem *item ) - -item is the item that needs branches drawn -
    -

    See also ComplexControl and SubControl. - -

    void TQStyle::drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Draw a bitmask for the ComplexControl control using the painter -p in the area r. See drawComplexControl() for an explanation -of the use of the widget and opt arguments. -

    The rect r should be in logical coordinates. Reimplementations -of this function should use visualRect() to change the logical -corrdinates into screen coordinates when using drawPrimitive() and -drawControl(). -

    See also drawComplexControl() and ComplexControl. - -

    void TQStyle::drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Draws the ControlElement element using the painter p in the -area r. Colors are used from the color group cg. -

    The rect r should be in screen coordinates. -

    The how argument is used to control how the ControlElement is -drawn. Multiple flags can be OR'ed together. See the table below -for an explanation of which flags are used with the various -ControlElements. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of element. The opt argument can be used to -pass extra information required when drawing the ControlElement. -Note that opt may be the default value even for ControlElements -that can make use of the extra options. See the table below for -the appropriate widget and opt usage: -

    -
    ControlElement
    & Widget Cast -
    Style Flags -Notes -Options -Notes -
    CE_PushButton(const TQPushButton *) -

    and -

    CE_PushButtonLabel(const TQPushButton *) -

    Style_Enabled Set if the button is enabled. - Unused. -   -
    Style_HasFocus Set if the button has input focus. -
    Style_Raised Set if the button is not down, not on and not flat. -
    Style_On Set if the button is a toggle button and toggled on. -
    Style_Down Set if the button is down (i.e., the mouse button or -space bar is pressed on the button). -
    Style_ButtonDefault Set if the button is a default button. -
    CE_CheckBox(const TQCheckBox *) -

    and -

    CE_CheckBoxLabel(const TQCheckBox *) -

    Style_Enabled Set if the checkbox is enabled. - Unused. -   -
    Style_HasFocus Set if the checkbox has input focus. -
    Style_On Set if the checkbox is checked. -
    Style_Off Set if the checkbox is not checked. -
    Style_NoChange Set if the checkbox is in the NoChange state. -
    Style_Down Set if the checkbox is down (i.e., the mouse button or -space bar is pressed on the button). -
    CE_RadioButton(const TQRadioButton *) -

    and -

    CE_RadioButtonLabel(const TQRadioButton *) -

    Style_Enabled Set if the radiobutton is enabled. - Unused. -   -
    Style_HasFocus Set if the radiobutton has input focus. -
    Style_On Set if the radiobutton is checked. -
    Style_Off Set if the radiobutton is not checked. -
    Style_Down Set if the radiobutton is down (i.e., the mouse -button or space bar is pressed on the radiobutton). -
    CE_TabBarTab(const TQTabBar *) -

    and -

    CE_TabBarLabel(const TQTabBar *) -

    Style_Enabled Set if the tabbar and tab is enabled. - TQStyleOption ( TQTab *t ) - - t is the TQTab being drawn. -
    Style_Selected Set if the tab is the current tab. -
    CE_ProgressBarGroove(const TQProgressBar *) -

    and -

    CE_ProgressBarContents(const TQProgressBar *) -

    and -

    CE_ProgressBarLabel(const TQProgressBar *) -

    Style_Enabled Set if the progressbar is enabled. - Unused. -   -
    Style_HasFocus Set if the progressbar has input focus. -
    CE_PopupMenuItem(const TQPopupMenu *) -Style_Enabled Set if the menuitem is enabled. - TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) - -mi is the menu item being drawn. TQMenuItem is currently an -internal class. -
    Style_Active Set if the menuitem is the current item. -tabwidth is the width of the tab column where key accelerators -are drawn. -
    Style_Down Set if the menuitem is down (i.e., the mouse button -or space bar is pressed). -maxpmwidth is the maximum width of the check column where -checkmarks and iconsets are drawn. -
    CE_MenuBarItem(const TQMenuBar *) -Style_Enabled Set if the menuitem is enabled - TQStyleOption ( TQMenuItem *mi ) - - mi is the menu item being drawn. -
    Style_Active Set if the menuitem is the current item. -
    Style_Down Set if the menuitem is down (i.e., a mouse button or -the space bar is pressed). -
    Style_HasFocus Set if the menubar has input focus. -
    CE_ToolButtonLabel(const TQToolButton *) -Style_Enabled Set if the toolbutton is enabled. - TQStyleOption ( ArrowType t ) - - When the tool button only contains an arrow, t is the -arrow's type. -
    Style_HasFocus Set if the toolbutton has input focus. -
    Style_Down Set if the toolbutton is down (i.e., a -mouse button or the space is pressed). -
    Style_On Set if the toolbutton is a toggle button -and is toggled on. -
    Style_AutoRaise Set if the toolbutton has auto-raise enabled. -
    Style_MouseOver Set if the mouse pointer is over the toolbutton. -
    Style_Raised Set if the button is not down, not on and doesn't -contain the mouse when auto-raise is enabled. -
    -

    See also ControlElement and StyleFlags. - -

    void TQStyle::drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Draw a bitmask for the ControlElement element using the painter -p in the area r. See drawControl() for an explanation of the -use of the widget and opt arguments. -

    The rect r should be in screen coordinates. -

    See also drawControl() and ControlElement. - -

    void TQStyle::drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const [virtual] -

    -Draws the text or pixmap in rectangle r using painter p and color group g. The pen color is specified with penColor. The enabled bool indicates whether or not the item is -enabled; when reimplementing this bool should influence how the -item is drawn. If len is -1 (the default) all the text is -drawn; otherwise only the first len characters of text are -drawn. The text is aligned and wrapped according to the alignment -flags (see TQt::AlignmentFlags). -

    By default, if both the text and the pixmap are not null, the -pixmap is drawn and the text is ignored. - -

    void TQStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Draws the style PrimitiveElement pe using the painter p in -the area r. Colors are used from the color group cg. -

    The rect r should be in screen coordinates. -

    The flags argument is used to control how the PrimitiveElement -is drawn. Multiple flags can be OR'ed together. -

    For example, a pressed button would be drawn with the flags Style_Enabled and Style_Down. -

    The opt argument can be used to control how various -PrimitiveElements are drawn. Note that opt may be the default -value even for PrimitiveElements that make use of extra options. -When opt is non-default, it is used as follows: -

    -
    PrimitiveElement Options Notes -
    PE_FocusRect -TQStyleOption ( const TQColor & bg ) - -bg is the background color on which the focus rect is being drawn. -
    PE_Panel - TQStyleOption ( int linewidth, int midlinewidth ) - -linewidth is the line width for drawing the panel. -
    midlinewidth is the mid-line width for drawing the panel. -
    PE_PanelPopup - TQStyleOption ( int linewidth, int midlinewidth ) - -linewidth is the line width for drawing the panel. -
    midlinewidth is the mid-line width for drawing the panel. -
    PE_PanelMenuBar - TQStyleOption ( int linewidth, int midlinewidth ) - -linewidth is the line width for drawing the panel. -
    midlinewidth is the mid-line width for drawing the panel. -
    PE_PanelDockWindow - TQStyleOption ( int linewidth, int midlinewidth ) - -linewidth is the line width for drawing the panel. -
    midlinewidth is the mid-line width for drawing the panel. -
    PE_GroupBoxFrame - TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) - -linewidth is the line width for the group box. -
    midlinewidth is the mid-line width for the group box. -
    shape is the frame shape -for the group box. -
    shadow is the frame shadow -for the group box. -
    -

    For all other PrimitiveElements, opt is unused. -

    See also StyleFlags. - -

    Example: themes/wood.cpp. -

    TQRect TQStyle::itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const [virtual] -

    -Returns the appropriate area (see below) within rectangle r in -which to draw the text or pixmap using painter p. If len is -1 (the default) all the text is drawn; otherwise only -the first len characters of text are drawn. The text is -aligned in accordance with the alignment flags (see -TQt::AlignmentFlags). The enabled bool indicates whether or -not the item is enabled. -

    If r is larger than the area needed to render the text the -rectangle that is returned will be offset within r in -accordance with the alignment flags. For example if flags is -AlignCenter the returned rectangle will be centered within r. If r is smaller than the area needed the rectangle that is -returned will be larger than r (the smallest rectangle large -enough to render the text or pixmap). -

    By default, if both the text and the pixmap are not null, the -pixmap is drawn and the text is ignored. - -

    int TQStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const [pure virtual] -

    - -

    Returns the pixel metric for metric. The widget argument is -a pointer to a TQWidget or one of its subclasses. The widget can be -cast to the appropriate type based on the value of metric. Note -that widget may be zero even for PixelMetrics that can make use -of widget. See the table below for the appropriate widget -casts: -

    -
    PixelMetric Widget Cast -
    PM_SliderControlThickness (const TQSlider *) -
    PM_SliderLength (const TQSlider *) -
    PM_SliderTickmarkOffset (const TQSlider *) -
    PM_SliderSpaceAvailable (const TQSlider *) -
    PM_TabBarTabOverlap (const TQTabBar *) -
    PM_TabBarTabHSpace (const TQTabBar *) -
    PM_TabBarTabVSpace (const TQTabBar *) -
    PM_TabBarBaseHeight (const TQTabBar *) -
    PM_TabBarBaseOverlap (const TQTabBar *) -
    - -

    void TQStyle::polish ( TQWidget * ) [virtual] -

    -Initializes the appearance of a widget. -

    This function is called for every widget at some point after it -has been fully created but just before it is shown the very -first time. -

    Reasonable actions in this function might be to call -TQWidget::setBackgroundMode() for the widget. An example of highly -unreasonable use would be setting the geometry! Reimplementing -this function gives you a back-door through which you can change -the appearance of a widget. With TQt 3.0's style engine you will -rarely need to write your own polish(); instead reimplement -drawItem(), drawPrimitive(), etc. -

    The TQWidget::inherits() function may provide enough information to -allow class-specific customizations. But be careful not to -hard-code things too much because new TQStyle subclasses are -expected to work reasonably with all current and future -widgets. -

    See also unPolish(). - -

    void TQStyle::polish ( TQApplication * ) [virtual] -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Late initialization of the TQApplication object. -

    See also unPolish(). - -

    void TQStyle::polish ( TQPalette & ) [virtual] -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    The style may have certain requirements for color palettes. In -this function it has the chance to change the palette according to -these requirements. -

    See also TQPalette and TQApplication::setPalette(). - -

    void TQStyle::polishPopupMenu ( TQPopupMenu * ) [pure virtual] -

    -Polishes the popup menu according to the GUI style. This usually -means setting the mouse tracking -(TQPopupMenu::setMouseTracking()) and whether the menu is -checkable by default (TQPopupMenu::setCheckable()). - -

    SubControl TQStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Returns the SubControl for widget at the point pos. The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of control. The opt argument can be used to -pass extra information required when drawing the ComplexControl. -Note that opt may be the default value even for ComplexControls -that can make use of the extra options. See drawComplexControl() -for an explanation of the widget and opt arguments. -

    Note that pos is passed in screen coordinates. When using -querySubControlMetrics() to check for hits and misses, use -visualRect() to change the logical coordinates into screen -coordinates. -

    See also drawComplexControl(), ComplexControl, SubControl, and querySubControlMetrics(). - -

    TQRect TQStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Returns the rect for the SubControl subcontrol for widget in -logical coordinates. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of control. The opt argument can be used to -pass extra information required when drawing the ComplexControl. -Note that opt may be the default value even for ComplexControls -that can make use of the extra options. See drawComplexControl() -for an explanation of the widget and opt arguments. -

    See also drawComplexControl(), ComplexControl, and SubControl. - -

    TQSize TQStyle::scrollBarExtent () const -

    - -This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    -

    TQSize TQStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Returns the size of widget based on the contents size contentsSize. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of contents. The opt argument can be used to -pass extra information required when calculating the size. Note -that opt may be the default value even for ContentsTypes that -can make use of the extra options. See the table below for the -appropriate widget and opt usage: -

    -
    ContentsType Widget Cast Options Notes -
    CT_PushButton (const TQPushButton *) Unused.   -
    CT_CheckBox (const TQCheckBox *) Unused.   -
    CT_RadioButton (const TQRadioButton *) Unused.   -
    CT_ToolButton (const TQToolButton *) Unused.   -
    CT_ComboBox (const TQComboBox *) Unused.   -
    CT_Splitter (const TQSplitter *) Unused.   -
    CT_DockWindow (const TQDockWindow *) Unused.   -
    CT_ProgressBar (const TQProgressBar *) Unused.   -
    CT_PopupMenuItem (const TQPopupMenu *) -TQStyleOption ( TQMenuItem *mi ) - -mi is the menu item to use when calculating the size. -TQMenuItem is currently an internal class. -
    - -

    int TQStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const [pure virtual] -

    - -

    Returns the style hint stylehint for widget. Currently, widget, opt, and returnData are unused; they're included to -allow for future enhancements. -

    For an explanation of the return value see StyleHint. - -

    TQPixmap TQStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] -

    - -

    Returns a pixmap for stylepixmap. -

    The opt argument can be used to pass extra information required -when drawing the ControlElement. Note that opt may be the -default value even for StylePixmaps that can make use of the extra -options. Currently, the opt argument is unused. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of stylepixmap. See the table below for the -appropriate widget casts: -

    -
    StylePixmap Widget Cast -
    SP_TitleBarMinButton (const TQWidget *) -
    SP_TitleBarMaxButton (const TQWidget *) -
    SP_TitleBarCloseButton (const TQWidget *) -
    SP_TitleBarNormalButton (const TQWidget *) -
    SP_TitleBarShadeButton (const TQWidget *) -
    SP_TitleBarUnshadeButton (const TQWidget *) -
    SP_DockWindowCloseButton (const TQDockWindow *) -
    -

    See also StylePixmap. - -

    TQRect TQStyle::subRect ( SubRect subrect, const TQWidget * widget ) const [pure virtual] -

    - -

    Returns the sub-area subrect for the widget in logical -coordinates. -

    The widget argument is a pointer to a TQWidget or one of its -subclasses. The widget can be cast to the appropriate type based -on the value of subrect. See the table below for the -appropriate widget casts: -

    -
    SubRect Widget Cast -
    SR_PushButtonContents (const TQPushButton *) -
    SR_PushButtonFocusRect (const TQPushButton *) -
    SR_CheckBoxIndicator (const TQCheckBox *) -
    SR_CheckBoxContents (const TQCheckBox *) -
    SR_CheckBoxFocusRect (const TQCheckBox *) -
    SR_RadioButtonIndicator (const TQRadioButton *) -
    SR_RadioButtonContents (const TQRadioButton *) -
    SR_RadioButtonFocusRect (const TQRadioButton *) -
    SR_ComboBoxFocusRect (const TQComboBox *) -
    SR_DockWindowHandleRect (const TQWidget *) -
    SR_ProgressBarGroove (const TQProgressBar *) -
    SR_ProgressBarContents (const TQProgressBar *) -
    SR_ProgressBarLabel (const TQProgressBar *) -
    -

    The tear-off handle (SR_DockWindowHandleRect) for TQDockWindow -is a private class. Use TQWidget::parentWidget() to access the -TQDockWindow: -

    -        if ( !widget->parentWidget() )
    -            return;
    -        const TQDockWindow *dw = (const TQDockWindow *) widget->parentWidget();
    -    
    - -

    See also SubRect. - -

    void TQStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const -

    - -This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    -

    void TQStyle::unPolish ( TQWidget * ) [virtual] -

    -Undoes the initialization of a widget's appearance. -

    This function is the counterpart to polish. It is called for every -polished widget when the style is dynamically changed. The former -style has to unpolish its settings before the new style can polish -them again. -

    See also polish(). - -

    void TQStyle::unPolish ( TQApplication * ) [virtual] -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Undoes the application polish. -

    See also polish(). - -

    TQRect TQStyle::visualRect ( const TQRect & logical, const TQWidget * w ) [static] -

    - -

    Returns the rect logical in screen coordinates. The bounding -rect for widget w is used to perform the translation. This -function is provided to aid style implementors in supporting -right-to-left mode. -

    See also TQApplication::reverseLayout(). - -

    TQRect TQStyle::visualRect ( const TQRect & logical, const TQRect & bounding ) [static] -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Returns the rect logical in screen coordinates. The rect bounding is used to perform the translation. This function is -provided to aid style implementors in supporting right-to-left -mode. -

    See also TQApplication::reverseLayout(). - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/ntqstylefactory.html b/doc/html/ntqstylefactory.html deleted file mode 100644 index 3a206d95..00000000 --- a/doc/html/ntqstylefactory.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -TQStyleFactory Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStyleFactory Class Reference

    - -

    The TQStyleFactory class creates TQStyle objects. -More... -

    #include <ntqstylefactory.h> -

    List of all member functions. -

    Static Public Members

    -
      -
    • TQStringList keys ()
    • -
    • TQStyle * create ( const TQString & key )
    • -
    -

    Detailed Description

    - - -The TQStyleFactory class creates TQStyle objects. -

    The style factory creates a TQStyle object for a given key with -TQStyleFactory::create(key). -

    The styles are either built-in or dynamically loaded from a style -plugin (see TQStylePlugin). -

    TQStyleFactory::keys() returns a list of valid keys, typically -including "Windows", "Motif", "CDE", "MotifPlus", "Platinum", -"SGI" and "Compact". Depending on the platform, "WindowsXP", -"Aqua" or "Macintosh" may be available. - -


    Member Function Documentation

    -

    TQStyle * TQStyleFactory::create ( const TQString & key ) [static] -

    -Creates a TQStyle object that matches key case-insensitively. -This is either a built-in style, or a style from a style plugin. -

    See also keys(). - -

    Example: themes/wood.cpp. -

    TQStringList TQStyleFactory::keys () [static] -

    -Returns the list of keys this factory can create styles for. -

    See also create(). - -

    Example: themes/themes.cpp. - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/ntqstyleplugin.html b/doc/html/ntqstyleplugin.html deleted file mode 100644 index 38417005..00000000 --- a/doc/html/ntqstyleplugin.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - -TQStylePlugin Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStylePlugin Class Reference

    - -

    The TQStylePlugin class provides an abstract base for custom TQStyle plugins. -More... -

    #include <ntqstyleplugin.h> -

    List of all member functions. -

    Public Members

    - -

    Detailed Description

    - - -The TQStylePlugin class provides an abstract base for custom TQStyle plugins. -

    -

    The style plugin is a simple plugin interface that makes it easy -to create custom styles that can be loaded dynamically into -applications with a TQStyleFactory. -

    Writing a style plugin is achieved by subclassing this base class, -reimplementing the pure virtual functions keys() and create(), and -exporting the class with the TQ_EXPORT_PLUGIN macro. See the -plugins documentation for an -example. -

    See also Plugins. - -


    Member Function Documentation

    -

    TQStylePlugin::TQStylePlugin () -

    -Constructs a style plugin. This is invoked automatically by the -TQ_EXPORT_PLUGIN macro. - -

    TQStylePlugin::~TQStylePlugin () -

    -Destroys the style plugin. -

    You never have to call this explicitly. TQt destroys a plugin -automatically when it is no longer used. - -

    TQStyle * TQStylePlugin::create ( const TQString & key ) [pure virtual] -

    - -

    Creates and returns a TQStyle object for the style key key. The -style key is usually the class name of the required style. -

    See also keys(). - -

    TQStringList TQStylePlugin::keys () const [pure virtual] -

    - -

    Returns the list of style keys this plugin supports. -

    These keys are usually the class names of the custom styles that -are implemented in the plugin. -

    See also create(). - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/ntqstylesheet.html b/doc/html/ntqstylesheet.html deleted file mode 100644 index d3ce655e..00000000 --- a/doc/html/ntqstylesheet.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - - -TQStyleSheet Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStyleSheet Class Reference

    - -

    The TQStyleSheet class is a collection of styles for rich text -rendering and a generator of tags. -More... -

    #include <ntqstylesheet.h> -

    Inherits TQObject. -

    List of all member functions. -

    Public Members

    -
      -
    • TQStyleSheet ( TQObject * parent = 0, const char * name = 0 )
    • -
    • virtual ~TQStyleSheet ()
    • -
    • TQStyleSheetItem * item ( const TQString & name )
    • -
    • const TQStyleSheetItem * item ( const TQString & name ) const
    • -
    • virtual TQTextCustomItem * tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const
    • -
    • virtual void scaleFont ( TQFont & font, int logicalSize ) const
    • -
    • virtual void error ( const TQString & msg ) const
    • -
    -

    Static Public Members

    - -

    Detailed Description

    - - - -The TQStyleSheet class is a collection of styles for rich text -rendering and a generator of tags. -

    - -

    By creating TQStyleSheetItem objects for a style sheet you build a -definition of a set of tags. This definition will be used by the -internal rich text rendering system to parse and display text -documents to which the style sheet applies. Rich text is normally -visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, -TQWhatsThis and TQMessageBox also support it, and other classes are -likely to follow. With TQSimpleRichText it is possible to use the -rich text renderer for custom widgets as well. -

    The default TQStyleSheet object has the following style bindings, -sorted by structuring bindings, anchors, character style bindings -(i.e. inline styles), special elements such as horizontal lines or -images, and other tags. In addition, rich text supports simple -HTML tables. -

    The structuring tags are -

    -
    Structuring tags Notes -
    <qt>...</qt> -A TQt rich text document. It understands the following -attributes: -
      -
    • title -- The caption of the document. This attribute is -easily accessible with TQTextEdit::documentTitle(). -
    • type -- The type of the document. The default type is page. It indicates that the document is displayed in a -page of its own. Another style is detail, which can be -used to explain certain expressions in more detail in a -few sentences. For detail, TQTextBrowser will then keep -the current page and display the new document in a small -popup similar to TQWhatsThis. Note that links will not work -in documents with <qt type="detail">...</qt>. -
    • bgcolor -- The background color, for example bgcolor="yellow" or bgcolor="#0000FF". -
    • background -- The background pixmap, for example background="granite.xpm". The pixmap name will be resolved -by a TQMimeSourceFactory(). -
    • text -- The default text color, for example text="red". -
    • link -- The link color, for example link="green". -
    -
    <h1>...</h1> -A top-level heading. -
    <h2>...</h2> -A sublevel heading. -
    <h3>...</h3> -A sub-sublevel heading. -
    <h4>...</h4> <h5>...</h5> -Headings of lesser importance. -
    <p>...</p> -A left-aligned paragraph. Adjust the alignment with the align attribute. Possible values are left, right and -center. -
    <center>...
    </center> -
    A centered paragraph. -
    <blockquote>...
    </blockquote> -
    An indented paragraph that is useful for quotes. -
    <ul>...</ul> -An unordered list. You can also pass a type argument to -define the bullet style. The default is type=disc; -other types are circle and square. -
    <ol>...</ol> -An ordered list. You can also pass a type argument to -define the enumeration label style. The default is type="1"; other types are "a" and "A". -
    <li>...</li> -A list item. This tag can be used only within the context -of <ol> or <ul>. -
    <dl>...</dl> -A list of definitions, consisting of terms and descriptions. -
    <dt>...</dt> -A term in a list of definitions. This tag can be used only -in the context of <dl>...</dl>. -
    <dd>...</dd> -A description in a list of definitions. This tag can be -used only in the context of <dl>...</dl>. -
    <pre>...</pre> -For larger chunks of code. Whitespaces in the contents are -preserved. For small bits of code use the inline-style code. -
    <div>...</div> and <span>...</span> -Block grouping elements. These are used to structure the -document, and are often used to provide hints about the -intended presentation of the document. -
    -

    Anchors and links are done with a single tag: -

    -
    Anchor tags Notes -
    <a>...</a> -An anchor or link. -
      -
    • A link is created by using an href -attribute, for example -
      <a href="target.qml">Link Text</a>. Links to -targets within a document are achieved in the same way -as for HTML, e.g. -
      <a href="target.qml#subtitle">Link Text</a>. -
    • A target is created by using a name -attribute, for example -
      <a name="subtitle"><h2>Sub Title</h2></a>. -
    -
    -

    The default character style bindings are -

    -
    Style tags Notes -
    <em>...</em> -Emphasized. By default this is the same as <i>...</i> -(italic). -
    <strong>...</strong> -Strong. By default this is the same as <b>...</b> -(bold). -
    <i>...</i> -Italic font style. -
    <b>...</b> -Bold font style. -
    <u>...</u> -Underlined font style. -
    <s>...</s> -Strike out font style. -
    <big>...</big> -A larger font size. -
    <small>...</small> -A smaller font size. -
    <sub>...</sub> -Subscripted text -
    <sup>...</sup> -Superscripted text -
    <code>...</code> -Indicates code. By default this is the same as -<tt>...</tt> (typewriter). For larger chunks of code -use the block-tag <pre>. -
    <tt>...</tt> -Typewriter font style. -
    <font>...</font> -Customizes the font size, family and text color. The tag -understands the following attributes: -
      -
    • color -- The text color, for example color="red" or -color="#FF0000". -
    • size -- The logical size of the font. Logical sizes 1 -to 7 are supported. The value may either be absolute -(for example, size=3) or relative (size=-2). In -the latter case the sizes are simply added. -
    • face -- The family of the font, for example face=times. -
    -
    -

    Special elements are: -

    -
    Special tags Notes -
    <img> -An image. The image name for the mime source factory is -given in the source attribute, for example -<img src="qt.xpm"> The image tag also understands the -attributes width and height that determine the size -of the image. If the pixmap does not fit the specified -size it will be scaled automatically (by using -TQImage::smoothScale()). -
    -The align attribute determines where the image is -placed. By default, an image is placed inline just like a -normal character. Specify left or right to place the -image at the respective side. -
    <hr> -A horizontal line. -
    <br> -A line break. -
    <nobr>...</nobr> -No break. Prevents word wrap. -
    -

    In addition, rich text supports simple HTML tables. A table -consists of one or more rows each of which contains one or more -cells. Cells are either data cells or header cells, depending on -their content. Cells which span rows and columns are supported. -

    -
    Table tags Notes -
    <table>...</table> -A table. Tables support the following attributes: -
      -
    • bgcolor -- The background color. -
    • width -- The table width. This is either an absolute -pixel width or a relative percentage of the table's -width, for example width=80%. -
    • border -- The width of the table border. The default is -0 (= no border). -
    • cellspacing -- Additional space around the table cells. -The default is 2. -
    • cellpadding -- Additional space around the contents of -table cells. The default is 1. -
    -
    <tr>...</tr> -A table row. This is only valid within a table. Rows -support the following attribute: -
      -
    • bgcolor -- The background color. -
    -
    <th>...</th> -A table header cell. Similar to td, but defaults to -center alignment and a bold font. -
    <td>...</td> -A table data cell. This is only valid within a tr. -Cells support the following attributes: -
      -
    • bgcolor -- The background color. -
    • width -- The cell width. This is either an absolute -pixel width or a relative percentage of table's width, -for example width=50%. -
    • colspan -- Specifies how many columns this cell spans. -The default is 1. -
    • rowspan -- Specifies how many rows this cell spans. The -default is 1. -
    • align -- Alignment; possible values are left, right, and center. The default is left. -
    • valign -- Vertical alignment; possible values are top, middle, and bottom. The default is middle. -
    -
    -

    See also Graphics Classes, Help System, and Text Related Classes. - -


    Member Function Documentation

    -

    TQStyleSheet::TQStyleSheet ( TQObject * parent = 0, const char * name = 0 ) -

    -Creates a style sheet called name, with parent parent. Like -any TQObject it will be deleted when its parent is destroyed (if -the child still exists). -

    By default the style sheet has the tag definitions defined above. - -

    TQStyleSheet::~TQStyleSheet () [virtual] -

    -Destroys the style sheet. All styles inserted into the style sheet -will be deleted. - -

    TQString TQStyleSheet::convertFromPlainText ( const TQString & plain, TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre ) [static] -

    Auxiliary function. Converts the plain text string plain to a -rich text formatted paragraph while preserving most of its look. -

    mode defines the whitespace mode. Possible values are TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces -preserved) and TQStyleSheetItem::WhiteSpaceNormal (wrapping, -simplified whitespaces). -

    See also escape(). - -

    Examples: action/application.cpp, application/application.cpp, and mdi/application.cpp. -

    TQStyleSheet * TQStyleSheet::defaultSheet () [static] -

    -Returns the application-wide default style sheet. This style sheet -is used by rich text rendering classes such as TQSimpleRichText, -TQWhatsThis and TQMessageBox to define the rendering style and -available tags within rich text documents. It also serves as the -initial style sheet for the more complex render widgets, TQTextEdit -and TQTextBrowser. -

    See also setDefaultSheet(). - -

    void TQStyleSheet::error ( const TQString & msg ) const [virtual] -

    - -

    This virtual function is called when an error occurs when -processing rich text. Reimplement it if you need to catch error -messages. -

    Errors might occur if some rich text strings contain tags that are -not understood by the stylesheet, if some tags are nested -incorrectly, or if tags are not closed properly. -

    msg is the error message. - -

    TQString TQStyleSheet::escape ( const TQString & plain ) [static] -

    -Auxiliary function. Converts the plain text string plain to a -rich text formatted string with any HTML meta-characters escaped. -

    See also convertFromPlainText(). - -

    TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) -

    -Returns the style called name or 0 if there is no such style. - -

    const TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) const -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Returns the style called name or 0 if there is no such style -(const version) - -

    bool TQStyleSheet::mightBeRichText ( const TQString & text ) [static] -

    -Returns TRUE if the string text is likely to be rich text; -otherwise returns FALSE. -

    This function uses a fast and therefore simple heuristic. It -mainly checks whether there is something that looks like a tag -before the first line break. Although the result may be correct -for common cases, there is no guarantee. - -

    void TQStyleSheet::scaleFont ( TQFont & font, int logicalSize ) const [virtual] -

    -Scales the font font to the appropriate physical point size -corresponding to the logical font size logicalSize. -

    When calling this function, font has a point size corresponding -to the logical font size 3. -

    Logical font sizes range from 1 to 7, with 1 being the smallest. -

    See also TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), and TQFont::setPointSize(). - -

    void TQStyleSheet::setDefaultSheet ( TQStyleSheet * sheet ) [static] -

    -Sets the application-wide default style sheet to sheet, -deleting any style sheet previously set. The ownership is -transferred to TQStyleSheet. -

    See also defaultSheet(). - -

    TQTextCustomItem * TQStyleSheet::tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const [virtual] -

    -

    This function is under development and is subject to change. -

    Generates an internal object for the tag called name, given the -attributes attr, and using additional information provided by -the mime source factory factory. -

    context is the optional context of the document, i.e. the path -to look for relative links. This becomes important if the text -contains relative references, for example within image tags. -TQSimpleRichText always uses the default mime source factory (see -TQMimeSourceFactory::defaultFactory()) to resolve these -references. The context will then be used to calculate the -absolute path. See TQMimeSourceFactory::makeAbsolute() for details. -

    emptyTag and doc are for internal use only. -

    This function should not be used in application code. - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/ntqt.html b/doc/html/ntqt.html index 1a91ffb2..9a93bc64 100644 --- a/doc/html/ntqt.html +++ b/doc/html/ntqt.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } that need to be global-like. More...

    #include <ntqnamespace.h> -

    Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis. +

    Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis.

    List of all member functions.

    Public Members

  • TQSqlDriverPlugin pluginsbase/sqldrivers *
    TQStylePlugin +TQStylePlugin pluginsbase/styles *
    TQTextCodecPlugin @@ -73,7 +73,7 @@ set your own path or paths you can use

    Suppose that you have a new style class called 'MyStyle' that you want to make available as a plugin. The required code is straightforward:

    -    class MyStylePlugin : public TQStylePlugin
    +    class MyStylePlugin : public TQStylePlugin
         {
         public:
             MyStylePlugin() {}
    @@ -83,7 +83,7 @@ to make available as a plugin. The required code is straightforward:
                 return TQStringList() << "mystyle"; 
             }
     
    -        TQStyle* create( const TQString& key ) { 
    +        TQStyle* create( const TQString& key ) { 
                 if ( key == "mystyle" ) 
                     return new MyStyle;
                 return 0;
    @@ -93,7 +93,7 @@ to make available as a plugin. The required code is straightforward:
         TQ_EXPORT_PLUGIN( MyStylePlugin )
     
    -

    (Note that TQStyleFactory is case-insensitive, and the lower case +

    (Note that TQStyleFactory is case-insensitive, and the lower case version of the key is used; other factories, e.g. TQWidgetFactory, are case sensitive.)

    The constructor and destructor do not need to do anything, so are left @@ -102,7 +102,7 @@ The first is keys() which returns a string list of the classes implemented in the plugin. (We've just implemented one class in the example above.) The second is a function that returns an object of the required class (or 0 if the plugin is asked to create an object of a -class that it doesn't implement). For TQStylePlugin, this second +class that it doesn't implement). For TQStylePlugin, this second function is called create().

    It is possible to implement any number of plugin subclasses in a single plugin, providing they are all derived from the same base @@ -112,7 +112,7 @@ no explicit object creation is required. TQt will find and create them as required. Styles are an exception, since you might want to set a style explicitly in code. To apply a style, use code like this:

    -    TQApplication::setStyle( TQStyleFactory::create( "MyStyle" ) );
    +    TQApplication::setStyle( TQStyleFactory::create( "MyStyle" ) );
     

    Some plugin classes require additional functions to be implemented. diff --git a/doc/html/plugins.html b/doc/html/plugins.html index da4187cc..879f4210 100644 --- a/doc/html/plugins.html +++ b/doc/html/plugins.html @@ -45,7 +45,7 @@ Windows.

    TQLibraryWrapper for handling shared libraries
    TQMouseDriverPluginAbstract base for TQt/Embedded mouse driver plugins
    TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins -
    TQStylePluginAbstract base for custom TQStyle plugins +
    TQStylePluginAbstract base for custom TQStyle plugins
    TQTextCodecPluginAbstract base for custom TQTextCodec plugins
    TQWidgetPluginAbstract base for custom TQWidget plugins
    diff --git a/doc/html/porting.html b/doc/html/porting.html index 61fe249f..b234d0ba 100644 --- a/doc/html/porting.html +++ b/doc/html/porting.html @@ -176,7 +176,7 @@ the top of the file giving the error.

  • <tqstringlist.h>
  • <ntqregexp.h>
  • <tqstrlist.h> -
  • <ntqstyle.h> +
  • <tqstyle.h>
  • <tqvaluelist.h>

    Namespace @@ -368,9 +368,9 @@ new code.
  • TQString::ascii() const
  • TQString::data() const
  • TQString::setExpand( uint index, TQChar c ) -
  • TQStyle::defaultFrameWidth() const -
  • TQStyle::scrollBarExtent() const -
  • TQStyle::tabbarMetrics( const TQWidget *t, int & hf, int & vf, int & ov ) const +
  • TQStyle::defaultFrameWidth() const +
  • TQStyle::scrollBarExtent() const +
  • TQStyle::tabbarMetrics( const TQWidget *t, int & hf, int & vf, int & ov ) const
  • TQTabDialog::isTabEnabled( const char *name ) const
  • TQTabDialog::selected( const TQString & )
  • TQTabDialog::selected( const TQString & tabLabel ) @@ -479,7 +479,7 @@ might be removed in a future version.
  • The paintBranches() function in TQt 2.x had a GUIStyle parameter; this has been dropped for TQt 3.x since GUI style is handled by the new -style engine (See TQStyle.) +style engine (See TQStyle.)

    TQMoveEvent

    In TQt 2.x, the function TQMoveEvent::pos() returned the position of the diff --git a/doc/html/propertydocs b/doc/html/propertydocs index f3aafac4..931a617f 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -141,7 +141,7 @@ appear at all. <p>This property holds the action's "What's This?" help text. <p>The whats this text is used to provide a brief description of the action. The text may contain rich text (HTML-like tags -- see -<a href="ntqstylesheet.html">QStyleSheet</a> for the list of supported tags). There is no default +<a href="tqstylesheet.html">TQStyleSheet</a> for the list of supported tags). There is no default "What's This" text. <p> <p>See also <a href="ntqwhatsthis.html">QWhatsThis</a>. @@ -4032,13 +4032,13 @@ verbatim, including spaces. Whenever a newline appears in the text the text edit inserts a hard line break and begins a new paragraph. <li> RichText - rich text rendering. The available styles are -defined in the default stylesheet <a href="ntqstylesheet.html#defaultSheet">QStyleSheet::defaultSheet</a>(). +defined in the default stylesheet <a href="tqstylesheet.html#defaultSheet">TQStyleSheet::defaultSheet</a>(). <li> LogText - optimized mode for very large texts. Supports a very limited set of formatting tags (color, bold, underline and italic settings). <li> AutoText - this is the default. The text edit autodetects which rendering style is best, <a href="ntqt.html#TextFormat-enum">PlainText</a> or <a href="ntqt.html#TextFormat-enum">RichText</a>. This is done -by using the <a href="ntqstylesheet.html#mightBeRichText">QStyleSheet::mightBeRichText</a>() function. +by using the <a href="tqstylesheet.html#mightBeRichText">TQStyleSheet::mightBeRichText</a>() function. </ul> <p>Set this property's value with <a href="tqtextedit.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="tqtextedit.html#textFormat">textFormat</a>(). diff --git a/doc/html/qaction-application-example.html b/doc/html/qaction-application-example.html index a04ca8e7..29c4475f 100644 --- a/doc/html/qaction-application-example.html +++ b/doc/html/qaction-application-example.html @@ -334,7 +334,7 @@ void ApplicationWindow::print() int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), diff --git a/doc/html/qcdestyle-members.html b/doc/html/qcdestyle-members.html index b8b7f0ce..1ef8aeb2 100644 --- a/doc/html/qcdestyle-members.html +++ b/doc/html/qcdestyle-members.html @@ -46,17 +46,17 @@ body { background: #ffffff; color: black; }

  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -67,7 +67,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -75,33 +75,33 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • setUseHighlightColors()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() +
  • unPolish()
  • useHighlightColors() -
  • visualRect() +
  • visualRect()


    diff --git a/doc/html/qcommonstyle-h.html b/doc/html/qcommonstyle-h.html index a3d019e9..137b7b16 100644 --- a/doc/html/qcommonstyle-h.html +++ b/doc/html/qcommonstyle-h.html @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; } #define TQCOMMONSTYLE_H #ifndef QT_H -#include "ntqstyle.h" +#include "tqstyle.h" #endif // QT_H #ifndef TQT_NO_STYLE diff --git a/doc/html/qcommonstyle-members.html b/doc/html/qcommonstyle-members.html index d949fe94..7f4b908a 100644 --- a/doc/html/qcommonstyle-members.html +++ b/doc/html/qcommonstyle-members.html @@ -45,17 +45,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -66,7 +66,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -74,31 +74,31 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() -
  • visualRect() +
  • unPolish() +
  • visualRect()


    diff --git a/doc/html/qmacstyle-members.html b/doc/html/qmacstyle-members.html index 3ad4f1f0..7265e5ce 100644 --- a/doc/html/qmacstyle-members.html +++ b/doc/html/qmacstyle-members.html @@ -46,17 +46,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -68,7 +68,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -76,33 +76,33 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setFocusRectPolicy()
  • setName()
  • setProperty()
  • setWidgetSizePolicy()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() -
  • visualRect() +
  • unPolish() +
  • visualRect()
  • widgetSizePolicy() diff --git a/doc/html/qmacstyle.html b/doc/html/qmacstyle.html index 9146b60c..1c9d1d3c 100644 --- a/doc/html/qmacstyle.html +++ b/doc/html/qmacstyle.html @@ -58,7 +58,7 @@ The TQMacStyle class implements an Appearance Manager style.

    This class is implemented as a wrapper to the Apple Appearance Manager. This allows your application to be styled by whatever theme your Macintosh is using. This is done by having primitives -in TQStyle implemented in terms of what the Macintosh would +in TQStyle implemented in terms of what the Macintosh would normally theme (i.e. the Finder).

    There are additional issues that should be taken into consideration to make an application compatible with the @@ -76,7 +76,7 @@ does not fully implement this behaviour so as to maintain multiplatform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the Appearance Manager).The TQWidget::sizeHint() will return the appropriate size for many -managed widgets (widgets enumerated in TQStyle::ContentsType). +managed widgets (widgets enumerated in TQStyle::ContentsType).

  • Effects - TQMacStyle (in contrast to TQAquaStyle) is not emulating (except where Appearance Manager does not provide certain capabilities), for example TQPushButton pulsing effects. In this case a @@ -90,7 +90,7 @@ your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current with new advances and design suggestions for Mac OS X.

    Note that the functions provided by TQMacStyle are -reimplementations of TQStyle functions; see TQStyle for their +reimplementations of TQStyle functions; see TQStyle for their documentation.

    See also Widget Appearance and Style. diff --git a/doc/html/qmotifplusstyle-members.html b/doc/html/qmotifplusstyle-members.html index cdb9a77b..fa4a0292 100644 --- a/doc/html/qmotifplusstyle-members.html +++ b/doc/html/qmotifplusstyle-members.html @@ -45,17 +45,17 @@ body { background: #ffffff; color: black; }

  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -66,7 +66,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -74,33 +74,33 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • setUseHighlightColors()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() +
  • unPolish()
  • useHighlightColors() -
  • visualRect() +
  • visualRect()


    diff --git a/doc/html/qmotifstyle-members.html b/doc/html/qmotifstyle-members.html index 714ff86f..1defbe61 100644 --- a/doc/html/qmotifstyle-members.html +++ b/doc/html/qmotifstyle-members.html @@ -45,17 +45,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -66,7 +66,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -74,33 +74,33 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • setUseHighlightColors()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() +
  • unPolish()
  • useHighlightColors() -
  • visualRect() +
  • visualRect()


    diff --git a/doc/html/qnamespace-h.html b/doc/html/qnamespace-h.html index b70c5e70..080aa57d 100644 --- a/doc/html/qnamespace-h.html +++ b/doc/html/qnamespace-h.html @@ -329,7 +329,7 @@ public: }; #endif - // documented in qstyle.cpp + // documented in tqstyle.cpp #ifdef TQT_NO_COMPAT enum GUIStyle { WindowsStyle = 1, // ### TQt 4.0: either remove the obsolete enums or clean up compat vs. @@ -779,7 +779,7 @@ public: WV_CE_based = 0x0f00 }; - // documented in qstyle.cpp + // documented in tqstyle.cpp enum UIEffect { UI_General, UI_AnimateMenu, diff --git a/doc/html/qplatinumstyle-members.html b/doc/html/qplatinumstyle-members.html index a2a0b8e2..4a3685ca 100644 --- a/doc/html/qplatinumstyle-members.html +++ b/doc/html/qplatinumstyle-members.html @@ -45,17 +45,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • drawRiffles()
  • dumpObjectInfo()
  • dumpObjectTree() @@ -67,7 +67,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -76,31 +76,31 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() -
  • visualRect() +
  • unPolish() +
  • visualRect()


    diff --git a/doc/html/qsgistyle-members.html b/doc/html/qsgistyle-members.html index 64b2de43..d20d96ee 100644 --- a/doc/html/qsgistyle-members.html +++ b/doc/html/qsgistyle-members.html @@ -46,17 +46,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -67,7 +67,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -75,33 +75,33 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • setUseHighlightColors()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() +
  • unPolish()
  • useHighlightColors() -
  • visualRect() +
  • visualRect()


    diff --git a/doc/html/qstyle-h.html b/doc/html/qstyle-h.html deleted file mode 100644 index 2db034b5..00000000 --- a/doc/html/qstyle-h.html +++ /dev/null @@ -1,801 +0,0 @@ - - - - - -ntqstyle.h Include File - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    ntqstyle.h

    - -

    This is the verbatim text of the ntqstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


    -
    -/****************************************************************************
    -** $Id: qt/ntqstyle.h   3.3.8   edited Jan 11 14:38 $
    -**
    -** Definition of TQStyle class
    -**
    -** Created : 980616
    -**
    -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
    -**
    -** This file is part of the kernel module of the TQt GUI Toolkit.
    -**
    -** This file may be used under the terms of the GNU General Public
    -** License versions 2.0 or 3.0 as published by the Free Software
    -** Foundation and appearing in the file LICENSE.GPL included in the
    -** packaging of this file. Alternatively you may (at your option) use any
    -** later version of the GNU General Public License if such license has
    -** been publicly approved by Trolltech ASA (or its successors, if any)
    -** and the KDE Free TQt Foundation.
    -**
    -** Please review the following information to ensure GNU General
    -** Public Licensing requirements will be met:
    -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    -** If you are unsure which license is appropriate for your use, please
    -** review the following information:
    -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    -** or contact the sales department at sales@trolltech.com.
    -**
    -** This file may be used under the terms of the Q Public License as
    -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    -** included in the packaging of this file.  Licensees holding valid TQt
    -** Commercial licenses may use this file in accordance with the TQt
    -** Commercial License Agreement provided with the Software.
    -**
    -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    -** herein.
    -**
    -**********************************************************************/
    -#ifndef TQSTYLE_H
    -#define TQSTYLE_H
    -
    -#ifndef QT_H
    -#include "tqobject.h"
    -#endif // QT_H
    -
    -
    -#ifndef TQT_NO_STYLE
    -
    -class TQPopupMenu;
    -class TQStylePrivate;
    -class TQMenuItem;
    -class TQTab;
    -class TQListViewItem;
    -class TQCheckListItem;
    -
    -class TQStyleOption {
    -public:
    -    enum StyleOptionDefault { Default };
    -
    -    TQStyleOption(StyleOptionDefault=Default) : def(TRUE) {}
    -
    -    // Note: we don't use default arguments since that is unnecessary
    -    // initialization.
    -    TQStyleOption(int in1) :
    -	def(FALSE), i1(in1) {}
    -    TQStyleOption(int in1, int in2) :
    -	def(FALSE), i1(in1), i2(in2) {}
    -    TQStyleOption(int in1, int in2, int in3, int in4) :
    -	def(FALSE), i1(in1), i2(in2), i3(in3), i4(in4) {}
    -    TQStyleOption(TQMenuItem* m) : def(FALSE), mi(m) {}
    -    TQStyleOption(TQMenuItem* m, int in1) : def(FALSE), mi(m), i1(in1) {}
    -    TQStyleOption(TQMenuItem* m, int in1, int in2) : def(FALSE), mi(m), i1(in1), i2(in2) {}
    -    TQStyleOption(const TQColor& c) : def(FALSE), cl(&c) {}
    -    TQStyleOption(TQTab* t) : def(FALSE), tb(t) {}
    -    TQStyleOption(TQListViewItem* i) : def(FALSE), li(i) {}
    -    TQStyleOption(TQCheckListItem* i) : def(FALSE), cli(i) {}
    -    TQStyleOption(TQt::ArrowType a) : def(FALSE), i1((int)a) {}
    -    TQStyleOption(const TQRect& r) : def(FALSE), i1(r.x()), i2(r.y()), i3(r.width()),i4(r.height()){}
    -    TQStyleOption(TQWidget *w) : def(FALSE), p1((void*)w) {}
    -
    -    bool isDefault() const { return def; }
    -
    -    int day() const { return i1; }
    -
    -    int lineWidth() const { return i1; }
    -    int midLineWidth() const { return i2; }
    -    int frameShape() const { return i3; }
    -    int frameShadow() const { return i4; }
    -
    -    int headerSection() const { return i1; }
    -    TQMenuItem* menuItem() const { return mi; }
    -    int maxIconWidth() const { return i1; }
    -    int tabWidth() const { return i2; }
    -
    -    const TQColor& color() const { return *cl; }
    -
    -    TQTab* tab() const { return tb; }
    -
    -    TQCheckListItem* checkListItem() const { return cli; }
    -    TQListViewItem* listViewItem() const { return li; }
    -
    -    TQt::ArrowType arrowType() const { return (TQt::ArrowType)i1; }
    -    TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
    -    TQWidget* widget() const { return (TQWidget*)p1; }
    -
    -private:
    -    // NOTE: none of these components have constructors.
    -    bool def;
    -    bool b1,b2,b3; // reserved
    -    TQMenuItem* mi;
    -    TQTab* tb;
    -    TQListViewItem* li;
    -    const TQColor* cl;
    -    int i1, i2, i3, i4;
    -    int i5, i6; // reserved
    -    TQCheckListItem* cli;
    -    void *p1, *p2, *p3, *p4; // reserved
    -    // (padded to 64 bytes on some architectures)
    -};
    -
    -class TQStyleHintReturn; // not defined yet
    -
    -class TQ_EXPORT TQStyle: public TQObject
    -{
    -    TQ_OBJECT
    -
    -public:
    -    TQStyle();
    -    virtual ~TQStyle();
    -
    -    // New TQStyle API - most of these should probably be pure virtual
    -
    -    virtual void polish( TQWidget * );
    -    virtual void unPolish( TQWidget * );
    -
    -    virtual void polish( TQApplication * );
    -    virtual void unPolish( TQApplication * );
    -
    -    virtual void polish( TQPalette & );
    -
    -    virtual void polishPopupMenu( TQPopupMenu* ) = 0;
    -
    -    virtual TQRect itemRect( TQPainter *p, const TQRect &r,
    -			    int flags, bool enabled,
    -			    const TQPixmap *pixmap,
    -			    const TQString &text, int len = -1 ) const;
    -
    -    virtual void drawItem( TQPainter *p, const TQRect &r,
    -			   int flags, const TQColorGroup &g, bool enabled,
    -			   const TQPixmap *pixmap, const TQString &text,
    -			   int len = -1, const TQColor *penColor = 0 ) const;
    -
    -
    -    enum PrimitiveElement {
    -	PE_ButtonCommand,
    -	PE_ButtonDefault,
    -	PE_ButtonBevel,
    -	PE_ButtonTool,
    -	PE_ButtonDropDown,
    -
    -	PE_FocusRect,
    -
    -	PE_ArrowUp,
    -	PE_ArrowDown,
    -	PE_ArrowRight,
    -	PE_ArrowLeft,
    -
    -	PE_SpinWidgetUp,
    -	PE_SpinWidgetDown,
    -	PE_SpinWidgetPlus,
    -	PE_SpinWidgetMinus,
    -
    -	PE_Indicator,
    -	PE_IndicatorMask,
    -	PE_ExclusiveIndicator,
    -	PE_ExclusiveIndicatorMask,
    -
    -	PE_DockWindowHandle,
    -	PE_DockWindowSeparator,
    -	PE_DockWindowResizeHandle,
    -
    -	PE_Splitter,
    -
    -	PE_Panel,
    -	PE_PanelPopup,
    -	PE_PanelMenuBar,
    -	PE_PanelDockWindow,
    -
    -	PE_TabBarBase,
    -
    -	PE_HeaderSection,
    -	PE_HeaderArrow,
    -	PE_StatusBarSection,
    -
    -	PE_GroupBoxFrame,
    -
    -	PE_Separator,
    -
    -	PE_SizeGrip,
    -
    -	PE_CheckMark,
    -
    -	PE_ScrollBarAddLine,
    -	PE_ScrollBarSubLine,
    -	PE_ScrollBarAddPage,
    -	PE_ScrollBarSubPage,
    -	PE_ScrollBarSlider,
    -	PE_ScrollBarFirst,
    -	PE_ScrollBarLast,
    -
    -	PE_ProgressBarChunk,
    -
    -	PE_PanelLineEdit,
    -	PE_PanelTabWidget,
    -
    -	PE_WindowFrame,
    -
    -	PE_CheckListController,
    -	PE_CheckListIndicator,
    -	PE_CheckListExclusiveIndicator,
    -
    -	PE_PanelGroupBox,
    -	PE_RubberBand,
    -
    -	// do not add any values below/greater this
    -	PE_CustomBase =			0xf000000
    -    };
    -
    -    enum StyleFlags {
    -	Style_Default = 		0x00000000,
    -	Style_Enabled = 		0x00000001,
    -	Style_Raised =			0x00000002,
    -	Style_Sunken =	 		0x00000004,
    -	Style_Off =			0x00000008,
    -	Style_NoChange =		0x00000010,
    -	Style_On =			0x00000020,
    -	Style_Down =			0x00000040,
    -	Style_Horizontal =		0x00000080,
    -	Style_HasFocus =		0x00000100,
    -	Style_Top =			0x00000200,
    -	Style_Bottom =			0x00000400,
    -	Style_FocusAtBorder =		0x00000800,
    -	Style_AutoRaise =		0x00001000,
    -	Style_MouseOver =		0x00002000,
    -	Style_Up =			0x00004000,
    -	Style_Selected =	 	0x00008000,
    -	Style_Active =			0x00010000,
    -	Style_ButtonDefault =		0x00020000
    -    };
    -    typedef uint SFlags;
    -
    -    virtual void drawPrimitive( PrimitiveElement pe,
    -				TQPainter *p,
    -				const TQRect &r,
    -				const TQColorGroup &cg,
    -				SFlags flags = Style_Default,
    -				const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -
    -    enum ControlElement {
    -	CE_PushButton,
    -	CE_PushButtonLabel,
    -
    -	CE_CheckBox,
    -	CE_CheckBoxLabel,
    -
    -	CE_RadioButton,
    -	CE_RadioButtonLabel,
    -
    -	CE_TabBarTab,
    -	CE_TabBarLabel,
    -
    -	CE_ProgressBarGroove,
    -	CE_ProgressBarContents,
    -	CE_ProgressBarLabel,
    -
    -	CE_PopupMenuItem,
    -	CE_MenuBarItem,
    -
    -	CE_ToolButtonLabel,
    -	CE_MenuBarEmptyArea,
    -	CE_PopupMenuScroller,
    -	CE_DockWindowEmptyArea,
    -	CE_PopupMenuVerticalExtra,
    -	CE_PopupMenuHorizontalExtra,
    -
    -	CE_ToolBoxTab,
    -	CE_HeaderLabel,
    -
    -	// do not add any values below/greater than this
    -	CE_CustomBase =		0xf0000000
    -    };
    -
    -    virtual void drawControl( ControlElement element,
    -			      TQPainter *p,
    -			      const TQWidget *widget,
    -			      const TQRect &r,
    -			      const TQColorGroup &cg,
    -			      SFlags how = Style_Default,
    -			      const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -    virtual void drawControlMask( ControlElement element,
    -				  TQPainter *p,
    -				  const TQWidget *widget,
    -				  const TQRect &r,
    -				  const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -    enum SubRect {
    -	SR_PushButtonContents,
    -	SR_PushButtonFocusRect,
    -
    -	SR_CheckBoxIndicator,
    -	SR_CheckBoxContents,
    -	SR_CheckBoxFocusRect,
    -
    -	SR_RadioButtonIndicator,
    -	SR_RadioButtonContents,
    -	SR_RadioButtonFocusRect,
    -
    -	SR_ComboBoxFocusRect,
    -
    -	SR_SliderFocusRect,
    -
    -	SR_DockWindowHandleRect,
    -
    -	SR_ProgressBarGroove,
    -	SR_ProgressBarContents,
    -	SR_ProgressBarLabel,
    -
    -	SR_ToolButtonContents,
    -
    -	SR_DialogButtonAccept,
    -	SR_DialogButtonReject,
    -	SR_DialogButtonApply,
    -	SR_DialogButtonHelp,
    -	SR_DialogButtonAll,
    -	SR_DialogButtonAbort,
    -	SR_DialogButtonIgnore,
    -	SR_DialogButtonRetry,
    -	SR_DialogButtonCustom,
    -
    -	SR_ToolBoxTabContents,
    -
    -	// do not add any values below/greater than this
    -	SR_CustomBase =		0xf0000000
    -    };
    -
    -    virtual TQRect subRect( SubRect r, const TQWidget *widget ) const = 0;
    -
    -
    -    enum ComplexControl{
    -	CC_SpinWidget,
    -	CC_ComboBox,
    -	CC_ScrollBar,
    -	CC_Slider,
    -	CC_ToolButton,
    -	CC_TitleBar,
    -	CC_ListView,
    -
    -	// do not add any values below/greater than this
    -	CC_CustomBase =		0xf0000000
    -    };
    -
    -    enum SubControl {
    -	SC_None =			0x00000000,
    -
    -	SC_ScrollBarAddLine =		0x00000001,
    -	SC_ScrollBarSubLine =		0x00000002,
    -	SC_ScrollBarAddPage =		0x00000004,
    -	SC_ScrollBarSubPage =		0x00000008,
    -	SC_ScrollBarFirst =		0x00000010,
    -	SC_ScrollBarLast =		0x00000020,
    -	SC_ScrollBarSlider =		0x00000040,
    -	SC_ScrollBarGroove =		0x00000080,
    -
    -	SC_SpinWidgetUp =		0x00000001,
    -	SC_SpinWidgetDown =		0x00000002,
    -	SC_SpinWidgetFrame =		0x00000004,
    -	SC_SpinWidgetEditField =	0x00000008,
    -	SC_SpinWidgetButtonField =	0x00000010,
    -
    -	SC_ComboBoxFrame =		0x00000001,
    -	SC_ComboBoxEditField =		0x00000002,
    -	SC_ComboBoxArrow =		0x00000004,
    -	SC_ComboBoxListBoxPopup =	0x00000008,
    -
    -	SC_SliderGroove =		0x00000001,
    -	SC_SliderHandle = 		0x00000002,
    -	SC_SliderTickmarks = 		0x00000004,
    -
    -	SC_ToolButton =			0x00000001,
    -	SC_ToolButtonMenu =		0x00000002,
    -
    -	SC_TitleBarLabel =		0x00000001,
    -	SC_TitleBarSysMenu =		0x00000002,
    -	SC_TitleBarMinButton =		0x00000004,
    -	SC_TitleBarMaxButton =		0x00000008,
    -	SC_TitleBarCloseButton =	0x00000010,
    -	SC_TitleBarNormalButton =	0x00000020,
    -	SC_TitleBarShadeButton =	0x00000040,
    -	SC_TitleBarUnshadeButton =	0x00000080,
    -
    -	SC_ListView =			0x00000001,
    -	SC_ListViewBranch =		0x00000002,
    -	SC_ListViewExpand =		0x00000004,
    -
    -	SC_All =			0xffffffff
    -    };
    -    typedef uint SCFlags;
    -
    -
    -    virtual void drawComplexControl( ComplexControl control,
    -				     TQPainter *p,
    -				     const TQWidget *widget,
    -				     const TQRect &r,
    -				     const TQColorGroup &cg,
    -				     SFlags how = Style_Default,
    -#ifdef Q_QDOC
    -				     SCFlags sub = SC_All,
    -#else
    -				     SCFlags sub = (uint)SC_All,
    -#endif
    -				     SCFlags subActive = SC_None,
    -				     const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -    virtual void drawComplexControlMask( ComplexControl control,
    -					 TQPainter *p,
    -					 const TQWidget *widget,
    -					 const TQRect &r,
    -					 const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -    virtual TQRect querySubControlMetrics( ComplexControl control,
    -					  const TQWidget *widget,
    -					  SubControl sc,
    -					  const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -    virtual SubControl querySubControl( ComplexControl control,
    -					const TQWidget *widget,
    -					const TQPoint &pos,
    -					const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -
    -    enum PixelMetric {
    -	PM_ButtonMargin,
    -	PM_ButtonDefaultIndicator,
    -	PM_MenuButtonIndicator,
    -	PM_ButtonShiftHorizontal,
    -	PM_ButtonShiftVertical,
    -
    -	PM_DefaultFrameWidth,
    -	PM_SpinBoxFrameWidth,
    -
    -	PM_MaximumDragDistance,
    -
    -	PM_ScrollBarExtent,
    -	PM_ScrollBarSliderMin,
    -
    -	PM_SliderThickness,	       	// total slider thickness
    -	PM_SliderControlThickness,    	// thickness of the business part
    -	PM_SliderLength,		// total length of slider
    -	PM_SliderTickmarkOffset,	//
    -	PM_SliderSpaceAvailable,	// available space for slider to move
    -
    -	PM_DockWindowSeparatorExtent,
    -	PM_DockWindowHandleExtent,
    -	PM_DockWindowFrameWidth,
    -
    -	PM_MenuBarFrameWidth,
    -
    -	PM_TabBarTabOverlap,
    -	PM_TabBarTabHSpace,
    -	PM_TabBarTabVSpace,
    -	PM_TabBarBaseHeight,
    -	PM_TabBarBaseOverlap,
    -
    -	PM_ProgressBarChunkWidth,
    -
    -	PM_SplitterWidth,
    -	PM_TitleBarHeight,
    -
    -	PM_IndicatorWidth,
    -	PM_IndicatorHeight,
    -	PM_ExclusiveIndicatorWidth,
    -	PM_ExclusiveIndicatorHeight,
    -	PM_PopupMenuScrollerHeight,
    -	PM_CheckListButtonSize,
    -	PM_CheckListControllerSize,
    -	PM_PopupMenuFrameHorizontalExtra,
    -	PM_PopupMenuFrameVerticalExtra,
    -
    -	PM_DialogButtonsSeparator,
    -	PM_DialogButtonsButtonWidth,
    -	PM_DialogButtonsButtonHeight,
    -
    -	PM_MDIFrameWidth,
    -	PM_MDIMinimizedWidth,
    -	PM_HeaderMargin,
    -	PM_HeaderMarkSize,
    -	PM_HeaderGripMargin,
    -	PM_TabBarTabShiftHorizontal,
    -	PM_TabBarTabShiftVertical,
    -	PM_TabBarScrollButtonWidth,
    -
    -	PM_MenuBarItemSpacing,
    -	PM_ToolBarItemSpacing,
    -
    -	// do not add any values below/greater than this
    -	PM_CustomBase =		0xf0000000
    -    };
    -
    -    virtual int pixelMetric( PixelMetric metric,
    -			     const TQWidget *widget = 0 ) const = 0;
    -
    -
    -    enum ContentsType {
    -	CT_PushButton,
    -	CT_CheckBox,
    -	CT_RadioButton,
    -	CT_ToolButton,
    -	CT_ComboBox,
    -	CT_Splitter,
    -	CT_DockWindow,
    -	CT_ProgressBar,
    -	CT_PopupMenuItem,
    -	CT_TabBarTab,
    -	CT_Slider,
    -	CT_Header,
    -	CT_LineEdit,
    -	CT_MenuBar,
    -	CT_SpinBox,
    -	CT_SizeGrip,
    -	CT_TabWidget,
    -	CT_DialogButtons,
    -
    -	// do not add any values below/greater than this
    -	CT_CustomBase =		0xf0000000
    -    };
    -
    -    virtual TQSize sizeFromContents( ContentsType contents,
    -				    const TQWidget *widget,
    -				    const TQSize &contentsSize,
    -				    const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -    enum StyleHint  {
    -	// ...
    -	// the general hints
    -	// ...
    -       	// disabled text should be etched, ala Windows
    -	SH_EtchDisabledText,
    -
    -	// the GUI style enum, argh!
    -	SH_GUIStyle,
    -
    -	// ...
    -	// widget specific hints
    -	// ...
    -	SH_ScrollBar_BackgroundMode,
    -	SH_ScrollBar_MiddleClickAbsolutePosition,
    -	SH_ScrollBar_ScrollWhenPointerLeavesControl,
    -
    -	// TQEvent::Type - which mouse event to select a tab
    -	SH_TabBar_SelectMouseType,
    -
    -	SH_TabBar_Alignment,
    -
    -	SH_Header_ArrowAlignment,
    -
    -	// bool - sliders snap to values while moving, ala Windows
    -	SH_Slider_SnapToValue,
    -
    -	// bool - key presses handled in a sloppy manner - ie. left on a vertical
    -	// slider subtracts a line
    -	SH_Slider_SloppyKeyEvents,
    -
    -	// bool - center button on progress dialogs, ala Motif, else right aligned
    -	// perhaps this should be a TQt::Alignment value
    -	SH_ProgressDialog_CenterCancelButton,
    -
    -	// TQt::AlignmentFlags - text label alignment in progress dialogs
    -	// Center on windows, Auto|VCenter otherwize
    -	SH_ProgressDialog_TextLabelAlignment,
    -
    -	// bool - right align buttons on print dialog, ala Windows
    -	SH_PrintDialog_RightAlignButtons,
    -
    -	// bool - 1 or 2 pixel space between the menubar and the dockarea, ala Windows
    -	// this *REALLY* needs a better name
    -	SH_MainWindow_SpaceBelowMenuBar,
    -
    -	// bool - select the text in the line edit about the listbox when selecting
    -	// an item from the listbox, or when the line edit receives focus, ala Windows
    -	SH_FontDialog_SelectAssociatedText,
    -
    -	// bool - allows disabled menu items to be active
    -	SH_PopupMenu_AllowActiveAndDisabled,
    -
    -	// bool - pressing space activates item, ala Motif
    -	SH_PopupMenu_SpaceActivatesItem,
    -
    -	// int - number of milliseconds to wait before opening a submenu
    -	// 256 on windows, 96 on motif
    -	SH_PopupMenu_SubMenuPopupDelay,
    -
    -	// bool - should scrollviews draw their frame only around contents (ala Motif),
    -	// or around contents, scrollbars and corner widgets (ala Windows) ?
    -	SH_ScrollView_FrameOnlyAroundContents,
    -
    -	// bool - menubars items are navigatable by pressing alt, followed by using
    -	// the arrow keys to select the desired item
    -	SH_MenuBar_AltKeyNavigation,
    -
    -	// bool - mouse tracking in combobox dropdown lists
    -	SH_ComboBox_ListMouseTracking,
    -
    -	// bool - mouse tracking in popupmenus
    -	SH_PopupMenu_MouseTracking,
    -
    -	// bool - mouse tracking in menubars
    -	SH_MenuBar_MouseTracking,
    -
    -	// bool - gray out selected items when loosing focus
    -	SH_ItemView_ChangeHighlightOnFocus,
    -
    -	// bool - supports shared activation among modeless widgets
    -	SH_Widget_ShareActivation,
    -
    -	// bool - workspace should just maximize the client area
    -	SH_Workspace_FillSpaceOnMaximize,
    -
    -	// bool - supports popup menu comboboxes
    -	SH_ComboBox_Popup,
    -
    -	// bool - titlebar has no border
    -	SH_TitleBar_NoBorder,
    -
    -	// bool - stop scrollbar at mouse
    -	SH_ScrollBar_StopMouseOverSlider,
    -
    -	//bool - blink cursort with selected text
    -	SH_BlinkCursorWhenTextSelected,
    -
    -	//bool - richtext selections extend the full width of the docuemnt
    -	SH_RichText_FullWidthSelection,
    -
    -	//bool - popupmenu supports scrolling instead of multicolumn mode
    -	SH_PopupMenu_Scrollable,
    -
    -	// TQt::AlignmentFlags - text label vertical alignment in groupboxes
    -	// Center on windows, Auto|VCenter otherwize
    -	SH_GroupBox_TextLabelVerticalAlignment,
    -
    -	// TQt::TQRgb - text label color in groupboxes
    -	SH_GroupBox_TextLabelColor,
    -
    -	// bool - popupmenu supports sloppy submenus
    -	SH_PopupMenu_SloppySubMenus,
    -
    -	// TQt::TQRgb - table grid color
    -	SH_Table_GridLineColor,
    -
    -	// TQChar - Unicode character for password char
    -	SH_LineEdit_PasswordCharacter,
    -
    -	// TQDialogButtons::Button - default button
    -	SH_DialogButtons_DefaultButton,
    -
    -	// TQToolBox - Boldness of the selected page title
    -	SH_ToolBox_SelectedPageTitleBold,
    -
    -	//bool - if a tabbar prefers not to have scroller arrows
    -	SH_TabBar_PreferNoArrows,
    -
    -	//bool - if left button should cause an absolute position
    -	SH_ScrollBar_LeftClickAbsolutePosition,
    -
    -	// TQEvent::Type - which mouse event to select a list view expansion
    -	SH_ListViewExpand_SelectMouseType,
    -
    -	//bool - if underline for accelerators
    -	SH_UnderlineAccelerator,
    -
    -	// bool - TQToolButton - if tool buttons should use a 3D frame
    -	// when the mouse is over the button
    -	SH_ToolButton_Uses3D,
    -
    -	// do not add any values below/greater than this
    -	SH_CustomBase =		0xf0000000
    -    };
    -
    -    virtual int styleHint( StyleHint stylehint,
    -			   const TQWidget *widget = 0,
    -			   const TQStyleOption& = TQStyleOption::Default,
    -			   TQStyleHintReturn* returnData = 0
    -			   ) const = 0;
    -
    -
    -    enum StylePixmap {
    -	SP_TitleBarMinButton,
    -	SP_TitleBarMaxButton,
    -	SP_TitleBarCloseButton,
    -	SP_TitleBarNormalButton,
    -	SP_TitleBarShadeButton,
    -	SP_TitleBarUnshadeButton,
    -	SP_DockWindowCloseButton,
    -	SP_MessageBoxInformation,
    -	SP_MessageBoxWarning,
    -	SP_MessageBoxCritical,
    -	SP_MessageBoxQuestion,
    -
    -	// do not add any values below/greater than this
    -	SP_CustomBase =		0xf0000000
    -    };
    -
    -    virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
    -				 const TQWidget *widget = 0,
    -				 const TQStyleOption& = TQStyleOption::Default ) const = 0;
    -
    -
    -    static TQRect visualRect( const TQRect &logical, const TQWidget *w );
    -
    -    static TQRect visualRect( const TQRect &logical, const TQRect &bounding );
    -
    -
    -
    -
    -    // Old 2.x TQStyle API
    -
    -#ifndef TQT_NO_COMPAT
    -    int defaultFrameWidth() const
    -    {
    -	return pixelMetric( PM_DefaultFrameWidth );
    -    }
    -    void tabbarMetrics( const TQWidget* t,
    -			int& hf, int& vf, int& ov ) const
    -    {
    -	hf = pixelMetric( PM_TabBarTabHSpace, t );
    -	vf = pixelMetric( PM_TabBarTabVSpace, t );
    -	ov = pixelMetric( PM_TabBarBaseOverlap, t );
    -    }
    -    TQSize scrollBarExtent() const
    -    {
    -	return TQSize(pixelMetric(PM_ScrollBarExtent),
    -		     pixelMetric(PM_ScrollBarExtent));
    -    }
    -#endif
    -
    -
    -private:
    -    TQStylePrivate * d;
    -
    -#if defined(TQ_DISABLE_COPY)
    -    TQStyle( const TQStyle & );
    -    TQStyle& operator=( const TQStyle & );
    -#endif
    -};
    -
    -#endif // TQT_NO_STYLE
    -#endif // TQSTYLE_H
    -
    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstyle-members.html b/doc/html/qstyle-members.html deleted file mode 100644 index a5c94e89..00000000 --- a/doc/html/qstyle-members.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - -TQStyle Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStyle

    - -

    This is the complete list of member functions for -TQStyle, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylefactory-h.html b/doc/html/qstylefactory-h.html deleted file mode 100644 index 0ddc742d..00000000 --- a/doc/html/qstylefactory-h.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - -ntqstylefactory.h Include File - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    ntqstylefactory.h

    - -

    This is the verbatim text of the ntqstylefactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


    -
    -/****************************************************************************
    -** $Id: qt/ntqstylefactory.h   3.3.8   edited Jan 11 14:46 $
    -**
    -** ...
    -**
    -** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
    -**
    -** This file is part of the widgets module of the TQt GUI Toolkit.
    -**
    -** This file may be used under the terms of the GNU General Public
    -** License versions 2.0 or 3.0 as published by the Free Software
    -** Foundation and appearing in the file LICENSE.GPL included in the
    -** packaging of this file. Alternatively you may (at your option) use any
    -** later version of the GNU General Public License if such license has
    -** been publicly approved by Trolltech ASA (or its successors, if any)
    -** and the KDE Free TQt Foundation.
    -**
    -** Please review the following information to ensure GNU General
    -** Public Licensing requirements will be met:
    -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    -** If you are unsure which license is appropriate for your use, please
    -** review the following information:
    -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    -** or contact the sales department at sales@trolltech.com.
    -**
    -** This file may be used under the terms of the Q Public License as
    -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    -** included in the packaging of this file.  Licensees holding valid TQt
    -** Commercial licenses may use this file in accordance with the TQt
    -** Commercial License Agreement provided with the Software.
    -**
    -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    -** herein.
    -**
    -**********************************************************************/
    -
    -#ifndef TQSTYLEFACTORY_H
    -#define TQSTYLEFACTORY_H
    -
    -#ifndef QT_H
    -#include "tqstringlist.h"
    -#endif // QT_H
    -
    -#ifndef TQT_NO_STYLE
    -
    -class TQString;
    -class TQStyle;
    -
    -class TQ_EXPORT TQStyleFactory
    -{
    -public:
    -#ifndef TQT_NO_STRINGLIST
    -    static TQStringList keys();
    -#endif
    -    static TQStyle *create( const TQString& );
    -};
    -
    -#endif //TQT_NO_STYLE
    -
    -#endif //TQSTYLEFACTORY_H
    -
    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylefactory-members.html b/doc/html/qstylefactory-members.html deleted file mode 100644 index 02f4bac7..00000000 --- a/doc/html/qstylefactory-members.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -TQStyleFactory Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStyleFactory

    - -

    This is the complete list of member functions for -TQStyleFactory, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstyleoption-members.html b/doc/html/qstyleoption-members.html deleted file mode 100644 index 0a8c9e09..00000000 --- a/doc/html/qstyleoption-members.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -TQStyleOption Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStyleOption

    - -

    This is the complete list of member functions for -TQStyleOption, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstyleoption.html b/doc/html/qstyleoption.html deleted file mode 100644 index 9e417568..00000000 --- a/doc/html/qstyleoption.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - -TQStyleOption Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStyleOption Class Reference

    - -

    The TQStyleOption class specifies optional parameters for TQStyle functions. -More... -

    #include <ntqstyle.h> -

    List of all member functions. -

    Public Members

    - -

    Detailed Description

    - - -The TQStyleOption class specifies optional parameters for TQStyle functions. - -

    Some TQStyle functions take an optional argument specifying extra -information that is required for a paritical primitive or control. -So that the TQStyle class can be extended, TQStyleOption is used to -provide a variable-argument for these options. -

    The TQStyleOption class has constructors for each type of optional -argument, and this set of constructors may be extended in future -TQt releases. There are also corresponding access functions that -return the optional arguments: these too may be extended. -

    For each constructor, you should refer to the documentation of the -TQStyle functions to see the meaning of the arguments. -

    When calling TQStyle functions from your own widgets, you must only -pass the default TQStyleOption or the argument that TQStyle is -documented to accept. For example, if the function expects -TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *) -leaves the optional integer argument uninitialized. -

    When subclassing TQStyle, you must similarly only expect the -default or documented arguments. The other arguments will have -uninitialized values. -

    If you make your own TQStyle subclasses and your own widgets, you -can make a subclass of TQStyleOption to pass additional arguments -to your TQStyle subclass. You will need to cast the "const -TQStyleOption&" argument to your subclass, so be sure your style -has been called from your widget. -

    See also Widget Appearance and Style. - -


    Member Type Documentation

    -

    TQStyleOption::StyleOptionDefault

    - -

    This enum value can be passed as the optional argument to any -TQStyle function. -

      -
    • TQStyleOption::Default -
    -

    Member Function Documentation

    -

    TQStyleOption::TQStyleOption ( StyleOptionDefault = Default ) -

    - -

    The default option. This can always be passed as the optional -argument to TQStyle functions. - -

    TQStyleOption::TQStyleOption ( int in1 ) -

    - -

    Pass one integer, in1. For example, headerSection. - -

    TQStyleOption::TQStyleOption ( int in1, int in2 ) -

    - -

    Pass two integers, in1 and in2. For example, linewidth and -midlinewidth. - -

    TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 ) -

    - -

    Pass four integers, in1, in2, in3 and in4. - -

    TQStyleOption::TQStyleOption ( TQMenuItem * m ) -

    - -

    Pass a menu item, m. - -

    TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1 ) -

    - -

    Pass a menu item and an integer, m and in1. - -

    TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1, int in2 ) -

    - -

    Pass a menu item and two integers, m, in1 and in2. - -

    TQStyleOption::TQStyleOption ( const TQColor & c ) -

    - -

    Pass a color, c. - -

    TQStyleOption::TQStyleOption ( TQTab * t ) -

    - -

    Pass a TQTab, t. - -

    TQStyleOption::TQStyleOption ( TQListViewItem * i ) -

    - -

    Pass a TQListViewItem, i. - -

    TQStyleOption::TQStyleOption ( TQCheckListItem * i ) -

    - -

    Pass a TQCheckListItem, i. - -

    TQStyleOption::TQStyleOption ( TQt::ArrowType a ) -

    - -

    Pass an TQt::ArrowType, a. - -

    TQStyleOption::TQStyleOption ( const TQRect & r ) -

    - -

    Pass a TQRect, r. - -

    TQStyleOption::TQStyleOption ( TQWidget * w ) -

    - -

    Pass a TQWidget, w. - -

    TQt::ArrowType TQStyleOption::arrowType () const -

    - -

    Returns an arrow type if the appropriate constructor was called; -otherwise the return value is undefined. - -

    TQCheckListItem * TQStyleOption::checkListItem () const -

    - -

    Returns a check list item if the appropriate constructor was -called; otherwise the return value is undefined. - -

    const TQColor & TQStyleOption::color () const -

    - -

    Returns a color if the appropriate constructor was called; -otherwise the return value is undefined. - -

    int TQStyleOption::day () const -

    - -

    Returns the index of the day in the month if the appropriate -constructor was called; otherwise the return value is undefined. - -

    int TQStyleOption::frameShadow () const -

    - -

    Returns a TQFrame::Shadow value if the appropriate constructor was -called; otherwise the return value is undefined. - -

    int TQStyleOption::frameShape () const -

    - -

    Returns a TQFrame::Shape value if the appropriate constructor was -called; otherwise the return value is undefined. - -

    int TQStyleOption::headerSection () const -

    - -

    Returns the header section if the appropriate constructor was -called; otherwise the return value is undefined. - -

    bool TQStyleOption::isDefault () const -

    - -

    Returns TRUE if the option was constructed with the default -constructor; otherwise returns FALSE. - -

    int TQStyleOption::lineWidth () const -

    - -

    Returns the line width if the appropriate constructor was called; -otherwise the return value is undefined. - -

    TQListViewItem * TQStyleOption::listViewItem () const -

    - -

    Returns a TQListView item if the appropriate constructor was -called; otherwise the return value is undefined. - -

    int TQStyleOption::maxIconWidth () const -

    - -

    Returns the maximum width of the menu item check area if the -appropriate constructor was called; otherwise the return value is -undefined. - -

    TQMenuItem * TQStyleOption::menuItem () const -

    - -

    Returns a menu item if the appropriate constructor was called; -otherwise the return value is undefined. - -

    int TQStyleOption::midLineWidth () const -

    - -

    Returns the mid-line width if the appropriate constructor was -called; otherwise the return value is undefined. - -

    TQRect TQStyleOption::rect () const -

    - -

    Returns a rectangle if the appropriate constructor was called; -otherwise the return value is undefined. - -

    TQTab * TQStyleOption::tab () const -

    - -

    Returns a TQTabBar tab if the appropriate constructor was called; -otherwise the return value is undefined. - -

    int TQStyleOption::tabWidth () const -

    - -

    Returns the tab indent width if the appropriate constructor was -called; otherwise the return value is undefined. - -

    TQWidget * TQStyleOption::widget () const -

    - -

    Returns a pointer to a widget if the appropriate constructor was called; -otherwise the return value is undefined. - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstyleplugin-h.html b/doc/html/qstyleplugin-h.html deleted file mode 100644 index 40acc95f..00000000 --- a/doc/html/qstyleplugin-h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -ntqstyleplugin.h Include File - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    ntqstyleplugin.h

    - -

    This is the verbatim text of the ntqstyleplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


    -
    -/****************************************************************************
    -** $Id: qt/ntqstyleplugin.h   3.3.8   edited Jan 11 14:46 $
    -**
    -** Definition of TQStylePlugin class
    -**
    -** Created : 010920
    -**
    -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
    -**
    -** This file is part of the widgets module of the TQt GUI Toolkit.
    -**
    -** This file may be used under the terms of the GNU General Public
    -** License versions 2.0 or 3.0 as published by the Free Software
    -** Foundation and appearing in the file LICENSE.GPL included in the
    -** packaging of this file. Alternatively you may (at your option) use any
    -** later version of the GNU General Public License if such license has
    -** been publicly approved by Trolltech ASA (or its successors, if any)
    -** and the KDE Free TQt Foundation.
    -**
    -** Please review the following information to ensure GNU General
    -** Public Licensing requirements will be met:
    -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    -** If you are unsure which license is appropriate for your use, please
    -** review the following information:
    -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    -** or contact the sales department at sales@trolltech.com.
    -**
    -** This file may be used under the terms of the Q Public License as
    -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    -** included in the packaging of this file.  Licensees holding valid TQt
    -** Commercial licenses may use this file in accordance with the TQt
    -** Commercial License Agreement provided with the Software.
    -**
    -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    -** herein.
    -**
    -**********************************************************************/
    -
    -#ifndef TQSTYLEPLUGIN_H
    -#define TQSTYLEPLUGIN_H
    -
    -#ifndef QT_H
    -#include "ntqgplugin.h"
    -#include "tqstringlist.h"
    -#endif // QT_H
    -
    -#ifndef TQT_NO_STYLE
    -#ifndef TQT_NO_COMPONENT
    -
    -class TQStyle;
    -class TQStylePluginPrivate;
    -
    -class TQ_EXPORT TQStylePlugin : public TQGPlugin
    -{
    -    TQ_OBJECT
    -public:
    -    TQStylePlugin();
    -    ~TQStylePlugin();
    -
    -    virtual TQStringList keys() const = 0;
    -    virtual TQStyle *create( const TQString &key ) = 0;
    -
    -private:
    -    TQStylePluginPrivate *d;
    -};
    -
    -#endif // TQT_NO_COMPONENT
    -#endif // TQT_NO_STYLE
    -
    -#endif // TQSTYLEPLUGIN_H
    -
    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstyleplugin-members.html b/doc/html/qstyleplugin-members.html deleted file mode 100644 index 923046c1..00000000 --- a/doc/html/qstyleplugin-members.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -TQStylePlugin Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStylePlugin

    - -

    This is the complete list of member functions for -TQStylePlugin, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylesheet-h.html b/doc/html/qstylesheet-h.html deleted file mode 100644 index 93183c4f..00000000 --- a/doc/html/qstylesheet-h.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - -ntqstylesheet.h Include File - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    ntqstylesheet.h

    - -

    This is the verbatim text of the ntqstylesheet.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


    -
    -/****************************************************************************
    -** $Id: qt/ntqstylesheet.h   3.3.8   edited Jan 11 14:38 $
    -**
    -** Definition of the TQStyleSheet class
    -**
    -** Created : 990101
    -**
    -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
    -**
    -** This file is part of the kernel module of the TQt GUI Toolkit.
    -**
    -** This file may be used under the terms of the GNU General Public
    -** License versions 2.0 or 3.0 as published by the Free Software
    -** Foundation and appearing in the file LICENSE.GPL included in the
    -** packaging of this file. Alternatively you may (at your option) use any
    -** later version of the GNU General Public License if such license has
    -** been publicly approved by Trolltech ASA (or its successors, if any)
    -** and the KDE Free TQt Foundation.
    -**
    -** Please review the following information to ensure GNU General
    -** Public Licensing requirements will be met:
    -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    -** If you are unsure which license is appropriate for your use, please
    -** review the following information:
    -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    -** or contact the sales department at sales@trolltech.com.
    -**
    -** This file may be used under the terms of the Q Public License as
    -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    -** included in the packaging of this file.  Licensees holding valid TQt
    -** Commercial licenses may use this file in accordance with the TQt
    -** Commercial License Agreement provided with the Software.
    -**
    -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    -** herein.
    -**
    -**********************************************************************/
    -
    -#ifndef TQSTYLESHEET_H
    -#define TQSTYLESHEET_H
    -
    -#ifndef QT_H
    -#include "tqstring.h"
    -#include "tqvaluelist.h"
    -#include "tqptrvector.h"
    -#include "ntqdict.h"
    -#include "tqobject.h"
    -#endif // QT_H
    -
    -#ifndef TQT_NO_RICHTEXT
    -
    -class TQStyleSheet;
    -class TQTextDocument;
    -template<class Key, class T> class TQMap;
    -class TQStyleSheetItemData;
    -
    -class TQ_EXPORT TQStyleSheetItem : public TQt
    -{
    -public:
    -    TQStyleSheetItem( TQStyleSheet* parent, const TQString& name );
    -    TQStyleSheetItem( const TQStyleSheetItem & );
    -    ~TQStyleSheetItem();
    -
    -    TQStyleSheetItem& operator=( const TQStyleSheetItem& other );
    -
    -    TQString name() const;
    -
    -    TQStyleSheet* styleSheet();
    -    const TQStyleSheet* styleSheet() const;
    -
    -    enum AdditionalStyleValues { Undefined  = - 1};
    -
    -    enum DisplayMode {
    -	DisplayBlock,
    -	DisplayInline,
    -	DisplayListItem,
    -	DisplayNone
    -#ifndef Q_QDOC
    -	, DisplayModeUndefined = -1
    -#endif
    -    };
    -
    -    DisplayMode displayMode() const;
    -    void setDisplayMode(DisplayMode m);
    -
    -    int alignment() const;
    -    void setAlignment( int f);
    -
    -    enum VerticalAlignment {
    -	VAlignBaseline,
    -	VAlignSub,
    -	VAlignSuper
    -    };
    -
    -    VerticalAlignment verticalAlignment() const;
    -    void setVerticalAlignment( VerticalAlignment valign );
    -
    -    int fontWeight() const;
    -    void setFontWeight(int w);
    -
    -    int logicalFontSize() const;
    -    void setLogicalFontSize(int s);
    -
    -    int logicalFontSizeStep() const;
    -    void setLogicalFontSizeStep( int s );
    -
    -    int fontSize() const;
    -    void setFontSize(int s);
    -
    -    TQString fontFamily() const;
    -    void setFontFamily( const TQString& );
    -
    -    int numberOfColumns() const;
    -    void setNumberOfColumns(int ncols);
    -
    -    TQColor color() const;
    -    void setColor( const TQColor &);
    -
    -    bool fontItalic() const;
    -    void setFontItalic( bool );
    -    bool definesFontItalic() const;
    -
    -    bool fontUnderline() const;
    -    void setFontUnderline( bool );
    -    bool definesFontUnderline() const;
    -
    -    bool fontStrikeOut() const;
    -    void setFontStrikeOut( bool );
    -    bool definesFontStrikeOut() const;
    -
    -    bool isAnchor() const;
    -    void setAnchor(bool anc);
    -
    -    enum WhiteSpaceMode {
    -	WhiteSpaceNormal,
    -	WhiteSpacePre,
    -	WhiteSpaceNoWrap
    -#ifndef Q_QDOC
    -	, WhiteSpaceModeUndefined = -1
    -#endif
    -    };
    -    WhiteSpaceMode whiteSpaceMode() const;
    -    void setWhiteSpaceMode(WhiteSpaceMode m);
    -
    -    enum Margin {
    -	MarginLeft,
    -	MarginRight,
    -	MarginTop,
    -	MarginBottom,
    -	MarginFirstLine,
    -	MarginAll,
    -	MarginVertical,
    -	MarginHorizontal
    -#ifndef Q_QDOC
    -	, MarginUndefined = -1
    -#endif
    -    };
    -
    -    int margin( Margin m) const;
    -    void setMargin( Margin, int);
    -
    -    enum ListStyle {
    -	ListDisc,
    -	ListCircle,
    -	ListSquare,
    -	ListDecimal,
    -	ListLowerAlpha,
    -	ListUpperAlpha
    -#ifndef Q_QDOC
    -	, ListStyleUndefined = -1
    -#endif
    -    };
    -
    -    ListStyle listStyle() const;
    -    void setListStyle( ListStyle );
    -
    -    TQString contexts() const;
    -    void setContexts( const TQString& );
    -    bool allowedInContext( const TQStyleSheetItem* ) const;
    -
    -    bool selfNesting() const;
    -    void setSelfNesting( bool );
    -
    -    void setLineSpacing( int ls );
    -    int lineSpacing() const;
    -
    -private:
    -    void init();
    -    TQStyleSheetItemData* d;
    -};
    -
    -
    -#if defined(Q_TEMPLATEDLL)
    -// MOC_SKIP_BEGIN
    -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict<TQStyleSheetItem>;
    -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector<TQStyleSheetItem> >;
    -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector<TQStyleSheetItem>;
    -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList<TQStyleSheetItem::ListStyle>;
    -// MOC_SKIP_END
    -#endif
    -
    -#ifndef TQT_NO_TEXTCUSTOMITEM
    -class TQTextCustomItem;
    -#endif
    -
    -class TQ_EXPORT TQStyleSheet : public TQObject
    -{
    -    TQ_OBJECT
    -public:
    -    TQStyleSheet( TQObject *parent=0, const char *name=0 );
    -    virtual ~TQStyleSheet();
    -
    -    static TQStyleSheet* defaultSheet();
    -    static void setDefaultSheet( TQStyleSheet* );
    -
    -
    -    TQStyleSheetItem* item( const TQString& name);
    -    const TQStyleSheetItem* item( const TQString& name) const;
    -
    -    void insert( TQStyleSheetItem* item);
    -
    -#ifndef TQT_NO_TEXTCUSTOMITEM
    -    virtual TQTextCustomItem* tag( const TQString& name,
    -				  const TQMap<TQString, TQString> &attr,
    -				  const TQString& context,
    -				  const TQMimeSourceFactory& factory,
    -				  bool emptyTag, TQTextDocument *doc ) const;
    -#endif
    -    static TQString escape( const TQString& );
    -    static TQString convertFromPlainText( const TQString&,
    -					 TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre );
    -    static bool mightBeRichText( const TQString& );
    -
    -    virtual void scaleFont( TQFont& font, int logicalSize ) const;
    -
    -    virtual void error( const TQString& ) const;
    -
    -private:
    -    void init();
    -    TQDict<TQStyleSheetItem> styles;
    -    TQStyleSheetItem* nullstyle;
    -private:	// Disabled copy constructor and operator=
    -#if defined(TQ_DISABLE_COPY)
    -    TQStyleSheet( const TQStyleSheet & );
    -    TQStyleSheet &operator=( const TQStyleSheet & );
    -#endif
    -};
    -
    -#endif // TQT_NO_RICHTEXT
    -
    -#endif // TQSTYLESHEET_H
    -
    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylesheet-members.html b/doc/html/qstylesheet-members.html deleted file mode 100644 index 9d9d1063..00000000 --- a/doc/html/qstylesheet-members.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - -TQStyleSheet Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStyleSheet

    - -

    This is the complete list of member functions for -TQStyleSheet, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylesheetitem-members.html b/doc/html/qstylesheetitem-members.html deleted file mode 100644 index d156b3f3..00000000 --- a/doc/html/qstylesheetitem-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - -TQStyleSheetItem Member List - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    Complete Member List for TQStyleSheetItem

    - -

    This is the complete list of member functions for -TQStyleSheetItem, including inherited members. - -

    - -


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qstylesheetitem.html b/doc/html/qstylesheetitem.html deleted file mode 100644 index 9f63283a..00000000 --- a/doc/html/qstylesheetitem.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - -TQStyleSheetItem Class - - - - - - - -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQStyleSheetItem Class Reference

    - -

    The TQStyleSheetItem class provides an encapsulation of a set of text styles. -More... -

    #include <ntqstylesheet.h> -

    Inherits TQt. -

    List of all member functions. -

    Public Members

    - -

    Detailed Description

    - - -The TQStyleSheetItem class provides an encapsulation of a set of text styles. -

    -

    A style sheet item consists of a name and a set of attributes that -specifiy its font, color, etc. When used in a style sheet (see styleSheet()), items define the name() of -a rich text tag and the display property changes associated with -it. -

    The display mode -attribute indicates whether the item is a block, an inline element -or a list element; see setDisplayMode(). The treatment of -whitespace is controlled by the white space mode; see -setWhiteSpaceMode(). An item's margins are set with setMargin(), -In the case of list items, the list style is set with -setListStyle(). An item may be a hypertext link anchor; see -setAnchor(). Other attributes are set with setAlignment(), -setVerticalAlignment(), setFontFamily(), setFontSize(), -setFontWeight(), setFontItalic(), setFontUnderline(), -setFontStrikeOut and setColor(). -

    See also Text Related Classes. - -


    Member Type Documentation

    -

    TQStyleSheetItem::DisplayMode

    - -

    This enum type defines the way adjacent elements are displayed. -

      -
    • TQStyleSheetItem::DisplayBlock - elements are displayed as a rectangular block -(e.g. <p>...</p>). -
    • TQStyleSheetItem::DisplayInline - elements are displayed in a horizontally -flowing sequence (e.g. <em>...</em>). -
    • TQStyleSheetItem::DisplayListItem - elements are displayed in a vertical -sequence (e.g. <li>...</li>). -
    • TQStyleSheetItem::DisplayNone - elements are not displayed at all. -
    -

    TQStyleSheetItem::ListStyle

    - -

    This enum type defines how the items in a list are prefixed when -displayed. -

      -
    • TQStyleSheetItem::ListDisc - a filled circle (i.e. a bullet) -
    • TQStyleSheetItem::ListCircle - an unfilled circle -
    • TQStyleSheetItem::ListSquare - a filled square -
    • TQStyleSheetItem::ListDecimal - an integer in base 10: 1, 2, 3, ... -
    • TQStyleSheetItem::ListLowerAlpha - a lowercase letter: a, b, c, ... -
    • TQStyleSheetItem::ListUpperAlpha - an uppercase letter: A, B, C, ... -
    -

    TQStyleSheetItem::Margin

    - -
      -
    • TQStyleSheetItem::MarginLeft - left margin -
    • TQStyleSheetItem::MarginRight - right margin -
    • TQStyleSheetItem::MarginTop - top margin -
    • TQStyleSheetItem::MarginBottom - bottom margin -
    • TQStyleSheetItem::MarginAll - all margins (left, right, top and bottom) -
    • TQStyleSheetItem::MarginVertical - top and bottom margins -
    • TQStyleSheetItem::MarginHorizontal - left and right margins -
    • TQStyleSheetItem::MarginFirstLine - margin (indentation) of the first line of -a paragarph (in addition to the MarginLeft of the paragraph) -
    -

    TQStyleSheetItem::VerticalAlignment

    - -

    This enum type defines the way elements are aligned vertically. -This is only supported for text elements. -

      -
    • TQStyleSheetItem::VAlignBaseline - align the baseline of the element (or the -bottom, if the element doesn't have a baseline) with the -baseline of the parent -
    • TQStyleSheetItem::VAlignSub - subscript the element -
    • TQStyleSheetItem::VAlignSuper - superscript the element -

    -

    TQStyleSheetItem::WhiteSpaceMode

    - -

    This enum defines the ways in which TQStyleSheet can treat -whitespace. -

      -
    • TQStyleSheetItem::WhiteSpaceNormal - any sequence of whitespace (including -line-breaks) is equivalent to a single space. -
    • TQStyleSheetItem::WhiteSpacePre - whitespace must be output exactly as given -in the input. -
    • TQStyleSheetItem::WhiteSpaceNoWrap - multiple spaces are collapsed as with -WhiteSpaceNormal, but no automatic line-breaks occur. To break -lines manually, use the <br> tag. -

    -


    Member Function Documentation

    -

    TQStyleSheetItem::TQStyleSheetItem ( TQStyleSheet * parent, const TQString & name ) -

    -Constructs a new style called name for the stylesheet parent. -

    All properties in TQStyleSheetItem are initially in the "do not -change" state, except display - mode, which defaults to DisplayInline. - -

    TQStyleSheetItem::TQStyleSheetItem ( const TQStyleSheetItem & other ) -

    -Copy constructor. Constructs a copy of other that is not bound -to any style sheet. - -

    TQStyleSheetItem::~TQStyleSheetItem () -

    -Destroys the style. Note that TQStyleSheetItem objects become -owned by TQStyleSheet when they are created. - -

    int TQStyleSheetItem::alignment () const -

    -Returns the alignment of this style. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify. -

    See also setAlignment() and TQt::AlignmentFlags. - -

    bool TQStyleSheetItem::allowedInContext ( const TQStyleSheetItem * s ) const -

    -Returns TRUE if this style can be nested into an element of style -s; otherwise returns FALSE. -

    See also contexts() and setContexts(). - -

    TQColor TQStyleSheetItem::color () const -

    -Returns the text color of this style or an invalid color if no -color has been set. -

    See also setColor() and TQColor::isValid(). - -

    TQString TQStyleSheetItem::contexts () const -

    -Returns a space-separated list of names of styles that may contain -elements of this style. If nothing has been set, contexts() -returns an empty string, which indicates that this style can be -nested everywhere. -

    See also setContexts(). - -

    bool TQStyleSheetItem::definesFontItalic () const -

    -Returns TRUE if the style defines a font shape; otherwise returns -FALSE. A style does not define any shape until setFontItalic() is -called. -

    See also setFontItalic() and fontItalic(). - -

    bool TQStyleSheetItem::definesFontStrikeOut () const -

    -Returns TRUE if the style defines a setting for the strikeOut -property of the font; otherwise returns FALSE. A style does not -define this until setFontStrikeOut() is called. -

    See also setFontStrikeOut() and fontStrikeOut(). - -

    bool TQStyleSheetItem::definesFontUnderline () const -

    -Returns TRUE if the style defines a setting for the underline -property of the font; otherwise returns FALSE. A style does not -define this until setFontUnderline() is called. -

    See also setFontUnderline() and fontUnderline(). - -

    DisplayMode TQStyleSheetItem::displayMode () const -

    -Returns the display - mode of the style. -

    See also setDisplayMode(). - -

    TQString TQStyleSheetItem::fontFamily () const -

    -Returns the font family setting of the style. This is either a -valid font family or TQString::null if no family has been set. -

    See also setFontFamily(), TQFont::family(), and TQFont::setFamily(). - -

    bool TQStyleSheetItem::fontItalic () const -

    -Returns TRUE if the style sets an italic font; otherwise returns -FALSE. -

    See also setFontItalic() and definesFontItalic(). - -

    int TQStyleSheetItem::fontSize () const -

    -Returns the font size setting of the style. This is either a valid -point size or TQStyleSheetItem::Undefined. -

    See also setFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). - -

    bool TQStyleSheetItem::fontStrikeOut () const -

    -Returns TRUE if the style sets a strike out font; otherwise -returns FALSE. -

    See also setFontStrikeOut() and definesFontStrikeOut(). - -

    bool TQStyleSheetItem::fontUnderline () const -

    -Returns TRUE if the style sets an underlined font; otherwise -returns FALSE. -

    See also setFontUnderline() and definesFontUnderline(). - -

    int TQStyleSheetItem::fontWeight () const -

    -Returns the font weight setting of the style. This is either a -valid TQFont::Weight or the value TQStyleSheetItem::Undefined. -

    See also setFontWeight() and TQFont. - -

    bool TQStyleSheetItem::isAnchor () const -

    -Returns whether this style is an anchor. -

    See also setAnchor(). - -

    int TQStyleSheetItem::lineSpacing () const -

    -This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Returns the linespacing - -

    ListStyle TQStyleSheetItem::listStyle () const -

    -Returns the list style of the style. -

    See also setListStyle() and ListStyle. - -

    int TQStyleSheetItem::logicalFontSize () const -

    -Returns the logical font size setting of the style. This is either -a valid size between 1 and 7 or TQStyleSheetItem::Undefined. -

    See also setLogicalFontSize(), setLogicalFontSizeStep(), TQFont::pointSize(), and TQFont::setPointSize(). - -

    int TQStyleSheetItem::logicalFontSizeStep () const -

    -Returns the logical font size step of this style. -

    The default is 0. Tags such as big define +1; small -defines -1. -

    See also setLogicalFontSizeStep(). - -

    int TQStyleSheetItem::margin ( Margin m ) const -

    -Returns the width of margin m in pixels. -

    The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, or MarginFirstLine. -

    See also setMargin() and Margin. - -

    TQString TQStyleSheetItem::name () const -

    -Returns the name of the style item. - -

    int TQStyleSheetItem::numberOfColumns () const -

    This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Returns the number of columns for this style. -

    See also setNumberOfColumns(), displayMode(), and setDisplayMode(). - -

    -

    TQStyleSheetItem & TQStyleSheetItem::operator= ( const TQStyleSheetItem & other ) -

    -Assignment. Assings a copy of other that is not bound to any style sheet. -Unbounds first from previous style sheet. - -

    bool TQStyleSheetItem::selfNesting () const -

    -Returns TRUE if this style has self-nesting enabled; otherwise -returns FALSE. -

    See also setSelfNesting(). - -

    void TQStyleSheetItem::setAlignment ( int f ) -

    -Sets the alignment to f. This only makes sense for styles with -a display mode of -DisplayBlock. Possible values are AlignAuto, AlignLeft, -AlignRight, AlignCenter or AlignJustify. -

    See also alignment(), displayMode(), and TQt::AlignmentFlags. - -

    void TQStyleSheetItem::setAnchor ( bool anc ) -

    -If anc is TRUE, sets this style to be an anchor (hypertext -link); otherwise sets it to not be an anchor. Elements in this -style link to other documents or anchors. -

    See also isAnchor(). - -

    void TQStyleSheetItem::setColor ( const TQColor & c ) -

    -Sets the text color of this style to c. -

    See also color(). - -

    void TQStyleSheetItem::setContexts ( const TQString & c ) -

    -Sets a space-separated list of names of styles that may contain -elements of this style. If c is empty, the style can be nested -everywhere. -

    See also contexts(). - -

    void TQStyleSheetItem::setDisplayMode ( DisplayMode m ) -

    -Sets the display mode of the style to m. -

    See also displayMode(). - -

    void TQStyleSheetItem::setFontFamily ( const TQString & fam ) -

    -Sets the font family setting of the style to fam. -

    See also fontFamily(), TQFont::family(), and TQFont::setFamily(). - -

    void TQStyleSheetItem::setFontItalic ( bool italic ) -

    -If italic is TRUE sets italic for the style; otherwise sets -upright. -

    See also fontItalic() and definesFontItalic(). - -

    void TQStyleSheetItem::setFontSize ( int s ) -

    -Sets the font size setting of the style to s points. -

    See also fontSize(), TQFont::pointSize(), and TQFont::setPointSize(). - -

    void TQStyleSheetItem::setFontStrikeOut ( bool strikeOut ) -

    -If strikeOut is TRUE, sets strike out for the style; otherwise -sets no strike out. -

    See also fontStrikeOut() and definesFontStrikeOut(). - -

    void TQStyleSheetItem::setFontUnderline ( bool underline ) -

    -If underline is TRUE, sets underline for the style; otherwise -sets no underline. -

    See also fontUnderline() and definesFontUnderline(). - -

    void TQStyleSheetItem::setFontWeight ( int w ) -

    -Sets the font weight setting of the style to w. Valid values -are those defined by TQFont::Weight. -

    See also TQFont and fontWeight(). - -

    void TQStyleSheetItem::setListStyle ( ListStyle s ) -

    -Sets the list style of the style to s. -

    This is used by nested elements that have a display mode of DisplayListItem. -

    See also listStyle(), DisplayMode, and ListStyle. - -

    void TQStyleSheetItem::setLogicalFontSize ( int s ) -

    -Sets the logical font size setting of the style to s. Valid -logical sizes are 1 to 7. -

    See also logicalFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). - -

    void TQStyleSheetItem::setLogicalFontSizeStep ( int s ) -

    -Sets the logical font size step of this style to s. -

    See also logicalFontSizeStep(). - -

    void TQStyleSheetItem::setMargin ( Margin m, int v ) -

    -Sets the width of margin m to v pixels. -

    The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, -MarginVertical or MarginHorizontal. The value v must -be >= 0. -

    See also margin(). - -

    void TQStyleSheetItem::setNumberOfColumns ( int ncols ) -

    This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Sets the number of columns for this style. Elements in the style -are divided into columns. -

    This makes sense only if the style uses a block display mode -(see TQStyleSheetItem::DisplayMode). -

    See also numberOfColumns(). - -

    void TQStyleSheetItem::setSelfNesting ( bool nesting ) -

    -Sets the self-nesting property for this style to nesting. -

    In order to support "dirty" HTML, paragraphs <p> and list -items <li> are not self-nesting. This means that starting a -new paragraph or list item automatically closes the previous one. -

    See also selfNesting(). - -

    void TQStyleSheetItem::setVerticalAlignment ( VerticalAlignment valign ) -

    -Sets the vertical alignment to valign. Possible values are -VAlignBaseline, VAlignSub or VAlignSuper. -

    The vertical alignment property is not inherited. -

    See also verticalAlignment(). - -

    void TQStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m ) -

    -Sets the whitespace mode to m. -

    See also WhiteSpaceMode. - -

    TQStyleSheet * TQStyleSheetItem::styleSheet () -

    -Returns the style sheet this item is in. - -

    const TQStyleSheet * TQStyleSheetItem::styleSheet () const -

    -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Returns the style sheet this item is in. - -

    VerticalAlignment TQStyleSheetItem::verticalAlignment () const -

    -Returns the vertical alignment of the style. Possible values are -VAlignBaseline, VAlignSub or VAlignSuper. -

    See also setVerticalAlignment(). - -

    WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode () const -

    -Returns the whitespace mode. -

    See also setWhiteSpaceMode() and WhiteSpaceMode. - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index 26252cbe..08728527 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -7342,146 +7342,146 @@
    -
    - QStyle - ComplexControl - ContentsType - ControlElement - PixelMetric - PrimitiveElement - StyleFlags - StyleHint - StylePixmap - SubControl - SubRect - drawComplexControl - drawComplexControlMask - drawControl - drawControlMask - drawItem - drawPrimitive - itemRect - pixelMetric - polish - polishPopupMenu - querySubControl - querySubControlMetrics - sizeFromContents - styleHint - stylePixmap - subRect - unPolish - visualRect - ~QStyle -
    -
    -
    -
    - QStyleFactory - create - keys -
    -
    -
    -
    - QStyleOption - StyleOptionDefault - arrowType - checkListItem - color - day - frameShadow - frameShape - headerSection - isDefault - lineWidth - listViewItem - maxIconWidth - menuItem - midLineWidth - rect - tab - tabWidth - widget -
    -
    -
    -
    - QStylePlugin - create - keys - ~QStylePlugin -
    -
    -
    -
    - QStyleSheet - convertFromPlainText - defaultSheet - error - escape - item - mightBeRichText - scaleFont - setDefaultSheet - tag - ~QStyleSheet -
    -
    -
    -
    - QStyleSheetItem - DisplayMode - ListStyle - Margin - VerticalAlignment - WhiteSpaceMode - alignment - allowedInContext - color - contexts - definesFontItalic - definesFontStrikeOut - definesFontUnderline - displayMode - fontFamily - fontItalic - fontSize - fontStrikeOut - fontUnderline - fontWeight - isAnchor - listStyle - logicalFontSize - logicalFontSizeStep - margin - name - operator= - selfNesting - setAlignment - setAnchor - setColor - setContexts - setDisplayMode - setFontFamily - setFontItalic - setFontSize - setFontStrikeOut - setFontUnderline - setFontWeight - setListStyle - setLogicalFontSize - setLogicalFontSizeStep - setMargin - setSelfNesting - setVerticalAlignment - setWhiteSpaceMode - styleSheet - verticalAlignment - whiteSpaceMode - ~QStyleSheetItem -
    -
    +
    + TQStyle + ComplexControl + ContentsType + ControlElement + PixelMetric + PrimitiveElement + StyleFlags + StyleHint + StylePixmap + SubControl + SubRect + drawComplexControl + drawComplexControlMask + drawControl + drawControlMask + drawItem + drawPrimitive + itemRect + pixelMetric + polish + polishPopupMenu + querySubControl + querySubControlMetrics + sizeFromContents + styleHint + stylePixmap + subRect + unPolish + visualRect + ~TQStyle +
    +
    +
    +
    + TQStyleFactory + create + keys +
    +
    +
    +
    + TQStyleOption + StyleOptionDefault + arrowType + checkListItem + color + day + frameShadow + frameShape + headerSection + isDefault + lineWidth + listViewItem + maxIconWidth + menuItem + midLineWidth + rect + tab + tabWidth + widget +
    +
    +
    +
    + TQStylePlugin + create + keys + ~TQStylePlugin +
    +
    +
    +
    + TQStyleSheet + convertFromPlainText + defaultSheet + error + escape + item + mightBeRichText + scaleFont + setDefaultSheet + tag + ~TQStyleSheet +
    +
    +
    +
    + TQStyleSheetItem + DisplayMode + ListStyle + Margin + VerticalAlignment + WhiteSpaceMode + alignment + allowedInContext + color + contexts + definesFontItalic + definesFontStrikeOut + definesFontUnderline + displayMode + fontFamily + fontItalic + fontSize + fontStrikeOut + fontUnderline + fontWeight + isAnchor + listStyle + logicalFontSize + logicalFontSizeStep + margin + name + operator= + selfNesting + setAlignment + setAnchor + setColor + setContexts + setDisplayMode + setFontFamily + setFontItalic + setFontSize + setFontStrikeOut + setFontUnderline + setFontWeight + setListStyle + setLogicalFontSize + setLogicalFontSizeStep + setMargin + setSelfNesting + setVerticalAlignment + setWhiteSpaceMode + styleSheet + verticalAlignment + whiteSpaceMode + ~TQStyleSheetItem +
    +
    QSyntaxHighlighter diff --git a/doc/html/qwindowsstyle-members.html b/doc/html/qwindowsstyle-members.html index df20d7d2..d037f5e7 100644 --- a/doc/html/qwindowsstyle-members.html +++ b/doc/html/qwindowsstyle-members.html @@ -45,17 +45,17 @@ body { background: #ffffff; color: black; }
  • connect()
  • connectNotify()
  • customEvent() -
  • defaultFrameWidth() +
  • defaultFrameWidth()
  • deleteLater()
  • destroyed()
  • disconnect()
  • disconnectNotify() -
  • drawComplexControl() -
  • drawComplexControlMask() -
  • drawControl() -
  • drawControlMask() -
  • drawItem() -
  • drawPrimitive() +
  • drawComplexControl() +
  • drawComplexControlMask() +
  • drawControl() +
  • drawControlMask() +
  • drawItem() +
  • drawPrimitive()
  • dumpObjectInfo()
  • dumpObjectTree()
  • event() @@ -66,7 +66,7 @@ body { background: #ffffff; color: black; }
  • installEventFilter()
  • isA()
  • isWidgetType() -
  • itemRect() +
  • itemRect()
  • killTimer()
  • killTimers()
  • metaObject() @@ -74,31 +74,31 @@ body { background: #ffffff; color: black; }
  • normalizeSignalSlot()
  • objectTrees()
  • parent() -
  • pixelMetric() -
  • polish() -
  • polishPopupMenu() +
  • pixelMetric() +
  • polish() +
  • polishPopupMenu()
  • property()
  • queryList() -
  • querySubControl() -
  • querySubControlMetrics() +
  • querySubControl() +
  • querySubControlMetrics()
  • removeChild()
  • removeEventFilter() -
  • scrollBarExtent() +
  • scrollBarExtent()
  • sender()
  • setName()
  • setProperty()
  • signalsBlocked() -
  • sizeFromContents() +
  • sizeFromContents()
  • startTimer() -
  • styleHint() -
  • stylePixmap() -
  • subRect() -
  • tabbarMetrics() +
  • styleHint() +
  • stylePixmap() +
  • subRect() +
  • tabbarMetrics()
  • timerEvent()
  • tr()
  • trUtf8() -
  • unPolish() -
  • visualRect() +
  • unPolish() +
  • visualRect()


    diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html index 9b90e57f..f550bc2c 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -321,7 +321,7 @@ void ApplicationWindow::print() int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index 6fbc7a62..8a92e752 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -463,7 +463,7 @@ and implicitly changes the window system caption to the new name. int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), diff --git a/doc/html/text.html b/doc/html/text.html index 94c2b5b5..49e74f12 100644 --- a/doc/html/text.html +++ b/doc/html/text.html @@ -46,8 +46,8 @@ body { background: #ffffff; color: black; } TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array TQStringListList of strings TQStrListDoubly-linked list of char* -TQStyleSheetCollection of styles for rich text rendering and a generator of tags -TQStyleSheetItemEncapsulation of a set of text styles +TQStyleSheetCollection of styles for rich text rendering and a generator of tags +TQStyleSheetItemEncapsulation of a set of text styles TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters TQTextBrowserRich text browser with hypertext navigation TQTextEditPowerful single-page rich text editor diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html index c0a5ff88..1eb7c56b 100644 --- a/doc/html/themes-example.html +++ b/doc/html/themes-example.html @@ -78,7 +78,7 @@ public: const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawControl( ControlElement element, TQPainter *p, @@ -86,13 +86,13 @@ public: const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawComplexControl( ComplexControl cc, TQPainter *p, @@ -102,18 +102,18 @@ public: SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; TQRect querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; TQRect subRect( SubRect r, const TQWidget *widget ) const; @@ -162,7 +162,7 @@ private: #include "ntqrangecontrol.h" #include "ntqscrollbar.h" #include <limits.h> -#include "ntqstylefactory.h" +#include "tqstylefactory.h" /* XPM */ static const char *polish_xpm[] = { @@ -906,7 +906,7 @@ enum { PointUp, PointDown, PointLeft, PointRight }; /*! Reimplementation from TQStyle */ -void NorwegianWoodStyle::polish( TQApplication *app) +void NorwegianWoodStyle::polish( TQApplication *app) { oldPalette = app->palette(); @@ -1010,7 +1010,7 @@ enum { PointUp, PointDown, PointLeft, PointRight }; } -void NorwegianWoodStyle::unPolish( TQApplication *app) +void NorwegianWoodStyle::unPolish( TQApplication *app) { app->setPalette(oldPalette, TRUE); } @@ -1018,7 +1018,7 @@ enum { PointUp, PointDown, PointLeft, PointRight }; /*! Reimplementation from TQStyle */ -void NorwegianWoodStyle::polish( TQWidget* w) +void NorwegianWoodStyle::polish( TQWidget* w) { // the polish function sets some widgets to transparent mode and @@ -1037,7 +1037,7 @@ void NorwegianWoodStyle::polish( unPolish( TQWidget* w) +void NorwegianWoodStyle::unPolish( TQWidget* w) { // the polish function sets some widgets to transparent mode and // some to translate background mode in order to get the full @@ -1054,11 +1054,11 @@ void NorwegianWoodStyle::unPolish( void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe, +void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, - SFlags flags, const TQStyleOption& opt ) const + SFlags flags, const TQStyleOption& opt ) const { int x, y, w, h; r.rect( &x, &y, &w, &h ); @@ -1118,17 +1118,17 @@ void NorwegianWoodStyle::unPolish( TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt ); + TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt ); break; } } -void NorwegianWoodStyle::drawControl( ControlElement element, +void NorwegianWoodStyle::drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, - SFlags how, const TQStyleOption& opt ) const + SFlags how, const TQStyleOption& opt ) const { switch( element ) { case CE_PushButton: @@ -1170,7 +1170,7 @@ void NorwegianWoodStyle::unPolish( drawPrimitive( PE_ButtonCommand, p, + drawPrimitive( PE_ButtonCommand, p, TQRect( x1, y1, x2 - x1 + 1, y2 - y1 + 1), myCg, flags, opt ); @@ -1189,7 +1189,7 @@ void NorwegianWoodStyle::unPolish( if ( btn->isEnabled() ) flags |= Style_Enabled; - drawPrimitive( PE_ArrowDown, p, + drawPrimitive( PE_ArrowDown, p, TQRect( x2 - dx, dx, y1, y2 - y1), myCg, flags, opt ); } @@ -1218,7 +1218,7 @@ void NorwegianWoodStyle::unPolish( drawItem( p, TQRect( x, y, w, h ), + drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, @@ -1229,16 +1229,16 @@ void NorwegianWoodStyle::unPolish( TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt ); + TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt ); break; } } -void NorwegianWoodStyle::drawControlMask( ControlElement element, +void NorwegianWoodStyle::drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, - const TQStyleOption& opt ) const + const TQStyleOption& opt ) const { switch( element ) { case CE_PushButton: @@ -1250,12 +1250,12 @@ void NorwegianWoodStyle::unPolish( TQWindowsStyle::drawControlMask( element, p, widget, r, opt ); + TQWindowsStyle::drawControlMask( element, p, widget, r, opt ); break; } } -void NorwegianWoodStyle::drawComplexControl( ComplexControl cc, +void NorwegianWoodStyle::drawComplexControl( ComplexControl cc, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1263,7 +1263,7 @@ void NorwegianWoodStyle::unPolish( TQStyleOption& opt ) const + const TQStyleOption& opt ) const { switch( cc ) { case CC_ComboBox: @@ -1272,15 +1272,15 @@ void NorwegianWoodStyle::unPolish( TQComboBox*)widget; int awh, ax, ay, sh, sy, dh, ew; - get_combo_parameters( subRect(SR_PushButtonContents, widget), + get_combo_parameters( subRect(SR_PushButtonContents, widget), ew, awh, ax, ay, sh, dh, sy ); - drawPrimitive( PE_ButtonCommand, p, r, cg, Style_Raised, opt ); - TQStyle *mstyle = TQStyleFactory::create( "Motif" ); + drawPrimitive( PE_ButtonCommand, p, r, cg, Style_Raised, opt ); + TQStyle *mstyle = TQStyleFactory::create( "Motif" ); if ( mstyle ) - mstyle->drawPrimitive( PE_ArrowDown, p, + mstyle->drawPrimitive( PE_ArrowDown, p, TQRect(ax, ay, awh, awh), cg, how, opt ); else - drawPrimitive( PE_ArrowDown, p, + drawPrimitive( PE_ArrowDown, p, TQRect(ax, ay, awh, awh), cg, how, opt ); TQPen oldPen = p->pen(); @@ -1293,7 +1293,7 @@ void NorwegianWoodStyle::unPolish( setPen( oldPen ); if ( cmb->editable() ) { - TQRect r( querySubControlMetrics(CC_ComboBox, widget, + TQRect r( querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, opt) ); qDrawShadePanel( p, r, cg, TRUE, 1, &cg.brush(TQColorGroup::Button) ); @@ -1302,17 +1302,17 @@ void NorwegianWoodStyle::unPolish( TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, + TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, sub, subActive, opt ); break; } } -void NorwegianWoodStyle::drawComplexControlMask( ComplexControl control, +void NorwegianWoodStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, - const TQStyleOption& opt ) const + const TQStyleOption& opt ) const { switch ( control ) { case CC_ComboBox: @@ -1324,15 +1324,15 @@ void NorwegianWoodStyle::unPolish( TQWindowsStyle::drawComplexControlMask( control, p, widget, r, opt ); + TQWindowsStyle::drawComplexControlMask( control, p, widget, r, opt ); break; } } -TQRect NorwegianWoodStyle::querySubControlMetrics( ComplexControl control, +TQRect NorwegianWoodStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc, - const TQStyleOption& opt ) const + const TQStyleOption& opt ) const { TQRect rect; switch ( control ) { @@ -1341,14 +1341,14 @@ void NorwegianWoodStyle::unPolish( subRect( SR_PushButtonContents, widget ); + rect = subRect( SR_PushButtonContents, widget ); int ew = get_combo_extra_width( rect.height(), 0 ); rect.setRect( rect.x() + 1, rect.y() + 1, rect.width() - 2 - ew, rect.height() - 2 ); break; } default: - rect = TQWindowsStyle::querySubControlMetrics( control, widget, + rect = TQWindowsStyle::querySubControlMetrics( control, widget, sc, opt ); break; } @@ -1374,21 +1374,21 @@ void NorwegianWoodStyle::unPolish( setRect( b, b, w - 2 * b, w - 2 * b ); break; default: - rect = TQWindowsStyle::querySubControlMetrics( control, widget, + rect = TQWindowsStyle::querySubControlMetrics( control, widget, sc, opt ); break; } break; } default: - rect = TQWindowsStyle::querySubControlMetrics( control, widget, + rect = TQWindowsStyle::querySubControlMetrics( control, widget, sc, opt ); break; } return rect; } -TQRect NorwegianWoodStyle::subRect( SubRect sr, const TQWidget * widget ) const +TQRect NorwegianWoodStyle::subRect( SubRect sr, const TQWidget * widget ) const { TQRect r; switch ( sr ) { @@ -1413,14 +1413,14 @@ void NorwegianWoodStyle::unPolish( subRect( SR_PushButtonContents, widget ); + r = subRect( SR_PushButtonContents, widget ); int ew = get_combo_extra_width( r.height() ); r.setRect( r.x() + 1, r.y() + 1, r.width() - 2 - ew, r.height() - 2 ); break; } default: - r = TQWindowsStyle::subRect( sr, widget ); + r = TQWindowsStyle::subRect( sr, widget ); break; } return r; @@ -1499,7 +1499,7 @@ void NorwegianWoodStyle::drawSemicircleButton( TQColorGroup &g ) const { - int b = pixelMetric( PM_ScrollBarExtent ) > 20 ? 3 : 2; + int b = pixelMetric( PM_ScrollBarExtent ) > 20 ? 3 : 2; TQRegion extrn( r.x(), r.y(), r.width(), r.height(), TQRegion::Ellipse ); TQRegion intern( r.x()+b, r.y()+b, r.width()-2*b, r.height()-2*b, TQRegion::Ellipse ); @@ -1592,7 +1592,7 @@ public: const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default) const; + const TQStyleOption& = TQStyleOption::Default) const; void drawControl( ControlElement element, TQPainter *p, @@ -1600,7 +1600,7 @@ public: const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawComplexControl( ComplexControl cc, TQPainter *p, @@ -1610,7 +1610,7 @@ public: SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; int pixelMetric( PixelMetric, const TQWidget * ) const; @@ -1674,7 +1674,7 @@ private: /*! Reimplementation from TQStyle */ -void MetalStyle::polish( TQApplication *app) +void MetalStyle::polish( TQApplication *app) { oldPalette = app->palette(); @@ -1734,7 +1734,7 @@ private: /*! Reimplementation from TQStyle */ -void MetalStyle::unPolish( TQApplication *app) +void MetalStyle::unPolish( TQApplication *app) { app->setPalette(oldPalette, TRUE); app->setFont( app->font(), TRUE ); @@ -1743,7 +1743,7 @@ private: /*! Reimplementation from TQStyle */ -void MetalStyle::polish( TQWidget* w) +void MetalStyle::polish( TQWidget* w) { // the polish function sets some widgets to transparent mode and @@ -1761,7 +1761,7 @@ void MetalStyle::polish( unPolish( TQWidget* w) +void MetalStyle::unPolish( TQWidget* w) { // the polish function sets some widgets to transparent mode and @@ -1779,11 +1779,11 @@ void MetalStyle::unPolish( void MetalStyle::drawPrimitive( PrimitiveElement pe, +void MetalStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, - SFlags flags, const TQStyleOption& opt ) const + SFlags flags, const TQStyleOption& opt ) const { switch( pe ) { case PE_HeaderSection: @@ -1802,13 +1802,13 @@ void MetalStyle::unPolish( x(), r.y(), r.width(), r.height(), flags & Style_Down, !( flags & Style_Horizontal ) ); - drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowRight :PE_ArrowDown, + drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowRight :PE_ArrowDown, p, r, cg, flags, opt ); break; case PE_ScrollBarSubLine: drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), flags & Style_Down, !( flags & Style_Horizontal ) ); - drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowLeft : PE_ArrowUp, + drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowLeft : PE_ArrowUp, p, r, cg, flags, opt ); break; @@ -1818,18 +1818,18 @@ void MetalStyle::unPolish( TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt ); + TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt ); break; } } -void MetalStyle::drawControl( ControlElement element, +void MetalStyle::drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags how, - const TQStyleOption& opt ) const + const TQStyleOption& opt ) const { switch( element ) { case CE_PushButton: @@ -1871,7 +1871,7 @@ void MetalStyle::unPolish( if ( !btn->isFlat() && !btn->isDown() ) flags |= Style_Raised; - drawPrimitive( PE_ButtonCommand, p, + drawPrimitive( PE_ButtonCommand, p, TQRect( x1, y1, x2 - x1 + 1, y2 - y1 + 1), cg, flags, opt ); @@ -1881,7 +1881,7 @@ void MetalStyle::unPolish( drawPrimitive( PE_ArrowDown, p, + drawPrimitive( PE_ArrowDown, p, TQRect(x2 - dx, dx, y1, y2 - y1), cg, flags, opt ); } @@ -1912,7 +1912,7 @@ void MetalStyle::unPolish( drawItem( p, TQRect( x, y, w, h ), + drawItem( p, TQRect( x, y, w, h ), AlignCenter|ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, @@ -1922,11 +1922,11 @@ void MetalStyle::unPolish( TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt ); + TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt ); break; } } -void MetalStyle::drawComplexControl( ComplexControl cc, +void MetalStyle::drawComplexControl( ComplexControl cc, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1934,16 +1934,16 @@ void MetalStyle::unPolish( TQStyleOption& opt ) const + const TQStyleOption& opt ) const { switch ( cc ) { case CC_Slider: { const TQSlider *slider = ( const TQSlider* ) widget; - TQRect handle = querySubControlMetrics( CC_Slider, widget, + TQRect handle = querySubControlMetrics( CC_Slider, widget, SC_SliderHandle, opt); if ( sub & SC_SliderGroove ) - TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, + TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, SC_SliderGroove, subActive, opt ); if ( (sub & SC_SliderHandle) && handle.isValid() ) drawMetalButton( p, handle.x(), handle.y(), handle.width(), @@ -1961,7 +1961,7 @@ void MetalStyle::unPolish( brush( TQColorGroup::Background ) ); drawMetalButton( p, r.x() + r.width() - 2 - 16, r.y() + 2, 16, r.height() - 4, how & Style_Sunken, TRUE ); - drawPrimitive( PE_ArrowDown, p, + drawPrimitive( PE_ArrowDown, p, TQRect( r.x() + r.width() - 2 - 16 + 2, r.y() + 2 + 2, 16 - 4, r.height() - 4 -4 ), cg, @@ -1970,7 +1970,7 @@ void MetalStyle::unPolish( TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, sub, subActive, + TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, sub, subActive, opt ); break; } @@ -2106,7 +2106,7 @@ void MetalStyle::drawMetalGradient( int MetalStyle::pixelMetric( PixelMetric metric, const TQWidget *w ) const +int MetalStyle::pixelMetric( PixelMetric metric, const TQWidget *w ) const { switch ( metric ) { case PM_MenuBarFrameWidth: @@ -2192,7 +2192,7 @@ private: #include <ntqmenubar.h> #include <ntqmessagebox.h> #include <ntqfont.h> -#include <ntqstylefactory.h> +#include <tqstylefactory.h> #include <ntqaction.h> #include <ntqsignalmapper.h> #include <ntqdict.h> @@ -2225,7 +2225,7 @@ private: ag->setExclusive( TRUE ); TQSignalMapper *styleMapper = new TQSignalMapper( this ); connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( makeStyle( const TQString& ) ) ); - TQStringList list = TQStyleFactory::keys(); + TQStringList list = TQStyleFactory::keys(); list.sort(); #ifndef TQT_NO_STYLE_WINDOWS list.insert(list.begin(), "Norwegian Wood"); diff --git a/doc/html/titleindex b/doc/html/titleindex index 2d9e04fc..290199ca 100644 --- a/doc/html/titleindex +++ b/doc/html/titleindex @@ -827,18 +827,18 @@ TQString Class | tqstring.html TQString Member List | tqstring-members.html TQStringList Class | tqstringlist.html TQStringList Member List | tqstringlist-members.html -QStyle Class | ntqstyle.html -QStyle Member List | qstyle-members.html -QStyleFactory Class | ntqstylefactory.html -QStyleFactory Member List | qstylefactory-members.html -QStyleOption Class | qstyleoption.html -QStyleOption Member List | qstyleoption-members.html -QStylePlugin Class | ntqstyleplugin.html -QStylePlugin Member List | qstyleplugin-members.html -QStyleSheet Class | ntqstylesheet.html -QStyleSheet Member List | qstylesheet-members.html -QStyleSheetItem Class | qstylesheetitem.html -QStyleSheetItem Member List | qstylesheetitem-members.html +TQStyle Class | tqstyle.html +TQStyle Member List | tqstyle-members.html +TQStyleFactory Class | tqstylefactory.html +TQStyleFactory Member List | tqstylefactory-members.html +TQStyleOption Class | tqstyleoption.html +TQStyleOption Member List | tqstyleoption-members.html +TQStylePlugin Class | tqstyleplugin.html +TQStylePlugin Member List | tqstyleplugin-members.html +TQStyleSheet Class | tqstylesheet.html +TQStyleSheet Member List | tqstylesheet-members.html +TQStyleSheetItem Class | tqstylesheetitem.html +TQStyleSheetItem Member List | tqstylesheetitem-members.html QSyntaxHighlighter Class | ntqsyntaxhighlighter.html QSyntaxHighlighter Member List | qsyntaxhighlighter-members.html QTab Class | qtab.html @@ -1375,10 +1375,10 @@ ntqstatusbar.h Include File | qstatusbar-h.html tqstring.h Include File | tqstring-h.html tqstringlist.h Include File | tqstringlist-h.html tqstrlist.h Include File | tqstrlist-h.html -ntqstyle.h Include File | qstyle-h.html -ntqstylefactory.h Include File | qstylefactory-h.html -ntqstyleplugin.h Include File | qstyleplugin-h.html -ntqstylesheet.h Include File | qstylesheet-h.html +tqstyle.h Include File | tqstyle-h.html +tqstylefactory.h Include File | tqstylefactory-h.html +tqstyleplugin.h Include File | tqstyleplugin-h.html +tqstylesheet.h Include File | tqstylesheet-h.html ntqsyntaxhighlighter.h Include File | qsyntaxhighlighter-h.html ntqtabbar.h Include File | qtabbar-h.html ntqtabdialog.h Include File | qtabdialog-h.html diff --git a/doc/html/tqobject.html b/doc/html/tqobject.html index c492affa..467e8e24 100644 --- a/doc/html/tqobject.html +++ b/doc/html/tqobject.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; }

    All the functions in this class are reentrant when TQt is built with thread support.

    #include <tqobject.h>

    Inherits TQt. -

    Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQAxObject, TQAxScript, TQAxScriptManager, TQWidget, TQCanvas, TQStyle, TQClipboard, TQCopChannel, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQWSKeyboardHandler, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. +

    Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQAxObject, TQAxScript, TQAxScriptManager, TQWidget, TQCanvas, TQStyle, TQClipboard, TQCopChannel, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQWSKeyboardHandler, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator.

    List of all member functions.

    Public Members

      diff --git a/doc/html/tqstyle-h.html b/doc/html/tqstyle-h.html new file mode 100644 index 00000000..b48b5c07 --- /dev/null +++ b/doc/html/tqstyle-h.html @@ -0,0 +1,801 @@ + + + + + +tqstyle.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqstyle.h

      + +

      This is the verbatim text of the tqstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +** $Id: qt/tqstyle.h   3.3.8   edited Jan 11 14:38 $
      +**
      +** Definition of TQStyle class
      +**
      +** Created : 980616
      +**
      +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the kernel module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +#ifndef TQSTYLE_H
      +#define TQSTYLE_H
      +
      +#ifndef QT_H
      +#include "tqobject.h"
      +#endif // QT_H
      +
      +
      +#ifndef TQT_NO_STYLE
      +
      +class TQPopupMenu;
      +class TQStylePrivate;
      +class TQMenuItem;
      +class TQTab;
      +class TQListViewItem;
      +class TQCheckListItem;
      +
      +class TQStyleOption {
      +public:
      +    enum StyleOptionDefault { Default };
      +
      +    TQStyleOption(StyleOptionDefault=Default) : def(TRUE) {}
      +
      +    // Note: we don't use default arguments since that is unnecessary
      +    // initialization.
      +    TQStyleOption(int in1) :
      +	def(FALSE), i1(in1) {}
      +    TQStyleOption(int in1, int in2) :
      +	def(FALSE), i1(in1), i2(in2) {}
      +    TQStyleOption(int in1, int in2, int in3, int in4) :
      +	def(FALSE), i1(in1), i2(in2), i3(in3), i4(in4) {}
      +    TQStyleOption(TQMenuItem* m) : def(FALSE), mi(m) {}
      +    TQStyleOption(TQMenuItem* m, int in1) : def(FALSE), mi(m), i1(in1) {}
      +    TQStyleOption(TQMenuItem* m, int in1, int in2) : def(FALSE), mi(m), i1(in1), i2(in2) {}
      +    TQStyleOption(const TQColor& c) : def(FALSE), cl(&c) {}
      +    TQStyleOption(TQTab* t) : def(FALSE), tb(t) {}
      +    TQStyleOption(TQListViewItem* i) : def(FALSE), li(i) {}
      +    TQStyleOption(TQCheckListItem* i) : def(FALSE), cli(i) {}
      +    TQStyleOption(TQt::ArrowType a) : def(FALSE), i1((int)a) {}
      +    TQStyleOption(const TQRect& r) : def(FALSE), i1(r.x()), i2(r.y()), i3(r.width()),i4(r.height()){}
      +    TQStyleOption(TQWidget *w) : def(FALSE), p1((void*)w) {}
      +
      +    bool isDefault() const { return def; }
      +
      +    int day() const { return i1; }
      +
      +    int lineWidth() const { return i1; }
      +    int midLineWidth() const { return i2; }
      +    int frameShape() const { return i3; }
      +    int frameShadow() const { return i4; }
      +
      +    int headerSection() const { return i1; }
      +    TQMenuItem* menuItem() const { return mi; }
      +    int maxIconWidth() const { return i1; }
      +    int tabWidth() const { return i2; }
      +
      +    const TQColor& color() const { return *cl; }
      +
      +    TQTab* tab() const { return tb; }
      +
      +    TQCheckListItem* checkListItem() const { return cli; }
      +    TQListViewItem* listViewItem() const { return li; }
      +
      +    TQt::ArrowType arrowType() const { return (TQt::ArrowType)i1; }
      +    TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
      +    TQWidget* widget() const { return (TQWidget*)p1; }
      +
      +private:
      +    // NOTE: none of these components have constructors.
      +    bool def;
      +    bool b1,b2,b3; // reserved
      +    TQMenuItem* mi;
      +    TQTab* tb;
      +    TQListViewItem* li;
      +    const TQColor* cl;
      +    int i1, i2, i3, i4;
      +    int i5, i6; // reserved
      +    TQCheckListItem* cli;
      +    void *p1, *p2, *p3, *p4; // reserved
      +    // (padded to 64 bytes on some architectures)
      +};
      +
      +class TQStyleHintReturn; // not defined yet
      +
      +class TQ_EXPORT TQStyle: public TQObject
      +{
      +    TQ_OBJECT
      +
      +public:
      +    TQStyle();
      +    virtual ~TQStyle();
      +
      +    // New TQStyle API - most of these should probably be pure virtual
      +
      +    virtual void polish( TQWidget * );
      +    virtual void unPolish( TQWidget * );
      +
      +    virtual void polish( TQApplication * );
      +    virtual void unPolish( TQApplication * );
      +
      +    virtual void polish( TQPalette & );
      +
      +    virtual void polishPopupMenu( TQPopupMenu* ) = 0;
      +
      +    virtual TQRect itemRect( TQPainter *p, const TQRect &r,
      +			    int flags, bool enabled,
      +			    const TQPixmap *pixmap,
      +			    const TQString &text, int len = -1 ) const;
      +
      +    virtual void drawItem( TQPainter *p, const TQRect &r,
      +			   int flags, const TQColorGroup &g, bool enabled,
      +			   const TQPixmap *pixmap, const TQString &text,
      +			   int len = -1, const TQColor *penColor = 0 ) const;
      +
      +
      +    enum PrimitiveElement {
      +	PE_ButtonCommand,
      +	PE_ButtonDefault,
      +	PE_ButtonBevel,
      +	PE_ButtonTool,
      +	PE_ButtonDropDown,
      +
      +	PE_FocusRect,
      +
      +	PE_ArrowUp,
      +	PE_ArrowDown,
      +	PE_ArrowRight,
      +	PE_ArrowLeft,
      +
      +	PE_SpinWidgetUp,
      +	PE_SpinWidgetDown,
      +	PE_SpinWidgetPlus,
      +	PE_SpinWidgetMinus,
      +
      +	PE_Indicator,
      +	PE_IndicatorMask,
      +	PE_ExclusiveIndicator,
      +	PE_ExclusiveIndicatorMask,
      +
      +	PE_DockWindowHandle,
      +	PE_DockWindowSeparator,
      +	PE_DockWindowResizeHandle,
      +
      +	PE_Splitter,
      +
      +	PE_Panel,
      +	PE_PanelPopup,
      +	PE_PanelMenuBar,
      +	PE_PanelDockWindow,
      +
      +	PE_TabBarBase,
      +
      +	PE_HeaderSection,
      +	PE_HeaderArrow,
      +	PE_StatusBarSection,
      +
      +	PE_GroupBoxFrame,
      +
      +	PE_Separator,
      +
      +	PE_SizeGrip,
      +
      +	PE_CheckMark,
      +
      +	PE_ScrollBarAddLine,
      +	PE_ScrollBarSubLine,
      +	PE_ScrollBarAddPage,
      +	PE_ScrollBarSubPage,
      +	PE_ScrollBarSlider,
      +	PE_ScrollBarFirst,
      +	PE_ScrollBarLast,
      +
      +	PE_ProgressBarChunk,
      +
      +	PE_PanelLineEdit,
      +	PE_PanelTabWidget,
      +
      +	PE_WindowFrame,
      +
      +	PE_CheckListController,
      +	PE_CheckListIndicator,
      +	PE_CheckListExclusiveIndicator,
      +
      +	PE_PanelGroupBox,
      +	PE_RubberBand,
      +
      +	// do not add any values below/greater this
      +	PE_CustomBase =			0xf000000
      +    };
      +
      +    enum StyleFlags {
      +	Style_Default = 		0x00000000,
      +	Style_Enabled = 		0x00000001,
      +	Style_Raised =			0x00000002,
      +	Style_Sunken =	 		0x00000004,
      +	Style_Off =			0x00000008,
      +	Style_NoChange =		0x00000010,
      +	Style_On =			0x00000020,
      +	Style_Down =			0x00000040,
      +	Style_Horizontal =		0x00000080,
      +	Style_HasFocus =		0x00000100,
      +	Style_Top =			0x00000200,
      +	Style_Bottom =			0x00000400,
      +	Style_FocusAtBorder =		0x00000800,
      +	Style_AutoRaise =		0x00001000,
      +	Style_MouseOver =		0x00002000,
      +	Style_Up =			0x00004000,
      +	Style_Selected =	 	0x00008000,
      +	Style_Active =			0x00010000,
      +	Style_ButtonDefault =		0x00020000
      +    };
      +    typedef uint SFlags;
      +
      +    virtual void drawPrimitive( PrimitiveElement pe,
      +				TQPainter *p,
      +				const TQRect &r,
      +				const TQColorGroup &cg,
      +				SFlags flags = Style_Default,
      +				const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +
      +    enum ControlElement {
      +	CE_PushButton,
      +	CE_PushButtonLabel,
      +
      +	CE_CheckBox,
      +	CE_CheckBoxLabel,
      +
      +	CE_RadioButton,
      +	CE_RadioButtonLabel,
      +
      +	CE_TabBarTab,
      +	CE_TabBarLabel,
      +
      +	CE_ProgressBarGroove,
      +	CE_ProgressBarContents,
      +	CE_ProgressBarLabel,
      +
      +	CE_PopupMenuItem,
      +	CE_MenuBarItem,
      +
      +	CE_ToolButtonLabel,
      +	CE_MenuBarEmptyArea,
      +	CE_PopupMenuScroller,
      +	CE_DockWindowEmptyArea,
      +	CE_PopupMenuVerticalExtra,
      +	CE_PopupMenuHorizontalExtra,
      +
      +	CE_ToolBoxTab,
      +	CE_HeaderLabel,
      +
      +	// do not add any values below/greater than this
      +	CE_CustomBase =		0xf0000000
      +    };
      +
      +    virtual void drawControl( ControlElement element,
      +			      TQPainter *p,
      +			      const TQWidget *widget,
      +			      const TQRect &r,
      +			      const TQColorGroup &cg,
      +			      SFlags how = Style_Default,
      +			      const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +    virtual void drawControlMask( ControlElement element,
      +				  TQPainter *p,
      +				  const TQWidget *widget,
      +				  const TQRect &r,
      +				  const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +    enum SubRect {
      +	SR_PushButtonContents,
      +	SR_PushButtonFocusRect,
      +
      +	SR_CheckBoxIndicator,
      +	SR_CheckBoxContents,
      +	SR_CheckBoxFocusRect,
      +
      +	SR_RadioButtonIndicator,
      +	SR_RadioButtonContents,
      +	SR_RadioButtonFocusRect,
      +
      +	SR_ComboBoxFocusRect,
      +
      +	SR_SliderFocusRect,
      +
      +	SR_DockWindowHandleRect,
      +
      +	SR_ProgressBarGroove,
      +	SR_ProgressBarContents,
      +	SR_ProgressBarLabel,
      +
      +	SR_ToolButtonContents,
      +
      +	SR_DialogButtonAccept,
      +	SR_DialogButtonReject,
      +	SR_DialogButtonApply,
      +	SR_DialogButtonHelp,
      +	SR_DialogButtonAll,
      +	SR_DialogButtonAbort,
      +	SR_DialogButtonIgnore,
      +	SR_DialogButtonRetry,
      +	SR_DialogButtonCustom,
      +
      +	SR_ToolBoxTabContents,
      +
      +	// do not add any values below/greater than this
      +	SR_CustomBase =		0xf0000000
      +    };
      +
      +    virtual TQRect subRect( SubRect r, const TQWidget *widget ) const = 0;
      +
      +
      +    enum ComplexControl{
      +	CC_SpinWidget,
      +	CC_ComboBox,
      +	CC_ScrollBar,
      +	CC_Slider,
      +	CC_ToolButton,
      +	CC_TitleBar,
      +	CC_ListView,
      +
      +	// do not add any values below/greater than this
      +	CC_CustomBase =		0xf0000000
      +    };
      +
      +    enum SubControl {
      +	SC_None =			0x00000000,
      +
      +	SC_ScrollBarAddLine =		0x00000001,
      +	SC_ScrollBarSubLine =		0x00000002,
      +	SC_ScrollBarAddPage =		0x00000004,
      +	SC_ScrollBarSubPage =		0x00000008,
      +	SC_ScrollBarFirst =		0x00000010,
      +	SC_ScrollBarLast =		0x00000020,
      +	SC_ScrollBarSlider =		0x00000040,
      +	SC_ScrollBarGroove =		0x00000080,
      +
      +	SC_SpinWidgetUp =		0x00000001,
      +	SC_SpinWidgetDown =		0x00000002,
      +	SC_SpinWidgetFrame =		0x00000004,
      +	SC_SpinWidgetEditField =	0x00000008,
      +	SC_SpinWidgetButtonField =	0x00000010,
      +
      +	SC_ComboBoxFrame =		0x00000001,
      +	SC_ComboBoxEditField =		0x00000002,
      +	SC_ComboBoxArrow =		0x00000004,
      +	SC_ComboBoxListBoxPopup =	0x00000008,
      +
      +	SC_SliderGroove =		0x00000001,
      +	SC_SliderHandle = 		0x00000002,
      +	SC_SliderTickmarks = 		0x00000004,
      +
      +	SC_ToolButton =			0x00000001,
      +	SC_ToolButtonMenu =		0x00000002,
      +
      +	SC_TitleBarLabel =		0x00000001,
      +	SC_TitleBarSysMenu =		0x00000002,
      +	SC_TitleBarMinButton =		0x00000004,
      +	SC_TitleBarMaxButton =		0x00000008,
      +	SC_TitleBarCloseButton =	0x00000010,
      +	SC_TitleBarNormalButton =	0x00000020,
      +	SC_TitleBarShadeButton =	0x00000040,
      +	SC_TitleBarUnshadeButton =	0x00000080,
      +
      +	SC_ListView =			0x00000001,
      +	SC_ListViewBranch =		0x00000002,
      +	SC_ListViewExpand =		0x00000004,
      +
      +	SC_All =			0xffffffff
      +    };
      +    typedef uint SCFlags;
      +
      +
      +    virtual void drawComplexControl( ComplexControl control,
      +				     TQPainter *p,
      +				     const TQWidget *widget,
      +				     const TQRect &r,
      +				     const TQColorGroup &cg,
      +				     SFlags how = Style_Default,
      +#ifdef Q_QDOC
      +				     SCFlags sub = SC_All,
      +#else
      +				     SCFlags sub = (uint)SC_All,
      +#endif
      +				     SCFlags subActive = SC_None,
      +				     const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +    virtual void drawComplexControlMask( ComplexControl control,
      +					 TQPainter *p,
      +					 const TQWidget *widget,
      +					 const TQRect &r,
      +					 const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +    virtual TQRect querySubControlMetrics( ComplexControl control,
      +					  const TQWidget *widget,
      +					  SubControl sc,
      +					  const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +    virtual SubControl querySubControl( ComplexControl control,
      +					const TQWidget *widget,
      +					const TQPoint &pos,
      +					const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +
      +    enum PixelMetric {
      +	PM_ButtonMargin,
      +	PM_ButtonDefaultIndicator,
      +	PM_MenuButtonIndicator,
      +	PM_ButtonShiftHorizontal,
      +	PM_ButtonShiftVertical,
      +
      +	PM_DefaultFrameWidth,
      +	PM_SpinBoxFrameWidth,
      +
      +	PM_MaximumDragDistance,
      +
      +	PM_ScrollBarExtent,
      +	PM_ScrollBarSliderMin,
      +
      +	PM_SliderThickness,	       	// total slider thickness
      +	PM_SliderControlThickness,    	// thickness of the business part
      +	PM_SliderLength,		// total length of slider
      +	PM_SliderTickmarkOffset,	//
      +	PM_SliderSpaceAvailable,	// available space for slider to move
      +
      +	PM_DockWindowSeparatorExtent,
      +	PM_DockWindowHandleExtent,
      +	PM_DockWindowFrameWidth,
      +
      +	PM_MenuBarFrameWidth,
      +
      +	PM_TabBarTabOverlap,
      +	PM_TabBarTabHSpace,
      +	PM_TabBarTabVSpace,
      +	PM_TabBarBaseHeight,
      +	PM_TabBarBaseOverlap,
      +
      +	PM_ProgressBarChunkWidth,
      +
      +	PM_SplitterWidth,
      +	PM_TitleBarHeight,
      +
      +	PM_IndicatorWidth,
      +	PM_IndicatorHeight,
      +	PM_ExclusiveIndicatorWidth,
      +	PM_ExclusiveIndicatorHeight,
      +	PM_PopupMenuScrollerHeight,
      +	PM_CheckListButtonSize,
      +	PM_CheckListControllerSize,
      +	PM_PopupMenuFrameHorizontalExtra,
      +	PM_PopupMenuFrameVerticalExtra,
      +
      +	PM_DialogButtonsSeparator,
      +	PM_DialogButtonsButtonWidth,
      +	PM_DialogButtonsButtonHeight,
      +
      +	PM_MDIFrameWidth,
      +	PM_MDIMinimizedWidth,
      +	PM_HeaderMargin,
      +	PM_HeaderMarkSize,
      +	PM_HeaderGripMargin,
      +	PM_TabBarTabShiftHorizontal,
      +	PM_TabBarTabShiftVertical,
      +	PM_TabBarScrollButtonWidth,
      +
      +	PM_MenuBarItemSpacing,
      +	PM_ToolBarItemSpacing,
      +
      +	// do not add any values below/greater than this
      +	PM_CustomBase =		0xf0000000
      +    };
      +
      +    virtual int pixelMetric( PixelMetric metric,
      +			     const TQWidget *widget = 0 ) const = 0;
      +
      +
      +    enum ContentsType {
      +	CT_PushButton,
      +	CT_CheckBox,
      +	CT_RadioButton,
      +	CT_ToolButton,
      +	CT_ComboBox,
      +	CT_Splitter,
      +	CT_DockWindow,
      +	CT_ProgressBar,
      +	CT_PopupMenuItem,
      +	CT_TabBarTab,
      +	CT_Slider,
      +	CT_Header,
      +	CT_LineEdit,
      +	CT_MenuBar,
      +	CT_SpinBox,
      +	CT_SizeGrip,
      +	CT_TabWidget,
      +	CT_DialogButtons,
      +
      +	// do not add any values below/greater than this
      +	CT_CustomBase =		0xf0000000
      +    };
      +
      +    virtual TQSize sizeFromContents( ContentsType contents,
      +				    const TQWidget *widget,
      +				    const TQSize &contentsSize,
      +				    const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +    enum StyleHint  {
      +	// ...
      +	// the general hints
      +	// ...
      +       	// disabled text should be etched, ala Windows
      +	SH_EtchDisabledText,
      +
      +	// the GUI style enum, argh!
      +	SH_GUIStyle,
      +
      +	// ...
      +	// widget specific hints
      +	// ...
      +	SH_ScrollBar_BackgroundMode,
      +	SH_ScrollBar_MiddleClickAbsolutePosition,
      +	SH_ScrollBar_ScrollWhenPointerLeavesControl,
      +
      +	// TQEvent::Type - which mouse event to select a tab
      +	SH_TabBar_SelectMouseType,
      +
      +	SH_TabBar_Alignment,
      +
      +	SH_Header_ArrowAlignment,
      +
      +	// bool - sliders snap to values while moving, ala Windows
      +	SH_Slider_SnapToValue,
      +
      +	// bool - key presses handled in a sloppy manner - ie. left on a vertical
      +	// slider subtracts a line
      +	SH_Slider_SloppyKeyEvents,
      +
      +	// bool - center button on progress dialogs, ala Motif, else right aligned
      +	// perhaps this should be a TQt::Alignment value
      +	SH_ProgressDialog_CenterCancelButton,
      +
      +	// TQt::AlignmentFlags - text label alignment in progress dialogs
      +	// Center on windows, Auto|VCenter otherwize
      +	SH_ProgressDialog_TextLabelAlignment,
      +
      +	// bool - right align buttons on print dialog, ala Windows
      +	SH_PrintDialog_RightAlignButtons,
      +
      +	// bool - 1 or 2 pixel space between the menubar and the dockarea, ala Windows
      +	// this *REALLY* needs a better name
      +	SH_MainWindow_SpaceBelowMenuBar,
      +
      +	// bool - select the text in the line edit about the listbox when selecting
      +	// an item from the listbox, or when the line edit receives focus, ala Windows
      +	SH_FontDialog_SelectAssociatedText,
      +
      +	// bool - allows disabled menu items to be active
      +	SH_PopupMenu_AllowActiveAndDisabled,
      +
      +	// bool - pressing space activates item, ala Motif
      +	SH_PopupMenu_SpaceActivatesItem,
      +
      +	// int - number of milliseconds to wait before opening a submenu
      +	// 256 on windows, 96 on motif
      +	SH_PopupMenu_SubMenuPopupDelay,
      +
      +	// bool - should scrollviews draw their frame only around contents (ala Motif),
      +	// or around contents, scrollbars and corner widgets (ala Windows) ?
      +	SH_ScrollView_FrameOnlyAroundContents,
      +
      +	// bool - menubars items are navigatable by pressing alt, followed by using
      +	// the arrow keys to select the desired item
      +	SH_MenuBar_AltKeyNavigation,
      +
      +	// bool - mouse tracking in combobox dropdown lists
      +	SH_ComboBox_ListMouseTracking,
      +
      +	// bool - mouse tracking in popupmenus
      +	SH_PopupMenu_MouseTracking,
      +
      +	// bool - mouse tracking in menubars
      +	SH_MenuBar_MouseTracking,
      +
      +	// bool - gray out selected items when loosing focus
      +	SH_ItemView_ChangeHighlightOnFocus,
      +
      +	// bool - supports shared activation among modeless widgets
      +	SH_Widget_ShareActivation,
      +
      +	// bool - workspace should just maximize the client area
      +	SH_Workspace_FillSpaceOnMaximize,
      +
      +	// bool - supports popup menu comboboxes
      +	SH_ComboBox_Popup,
      +
      +	// bool - titlebar has no border
      +	SH_TitleBar_NoBorder,
      +
      +	// bool - stop scrollbar at mouse
      +	SH_ScrollBar_StopMouseOverSlider,
      +
      +	//bool - blink cursort with selected text
      +	SH_BlinkCursorWhenTextSelected,
      +
      +	//bool - richtext selections extend the full width of the docuemnt
      +	SH_RichText_FullWidthSelection,
      +
      +	//bool - popupmenu supports scrolling instead of multicolumn mode
      +	SH_PopupMenu_Scrollable,
      +
      +	// TQt::AlignmentFlags - text label vertical alignment in groupboxes
      +	// Center on windows, Auto|VCenter otherwize
      +	SH_GroupBox_TextLabelVerticalAlignment,
      +
      +	// TQt::TQRgb - text label color in groupboxes
      +	SH_GroupBox_TextLabelColor,
      +
      +	// bool - popupmenu supports sloppy submenus
      +	SH_PopupMenu_SloppySubMenus,
      +
      +	// TQt::TQRgb - table grid color
      +	SH_Table_GridLineColor,
      +
      +	// TQChar - Unicode character for password char
      +	SH_LineEdit_PasswordCharacter,
      +
      +	// TQDialogButtons::Button - default button
      +	SH_DialogButtons_DefaultButton,
      +
      +	// TQToolBox - Boldness of the selected page title
      +	SH_ToolBox_SelectedPageTitleBold,
      +
      +	//bool - if a tabbar prefers not to have scroller arrows
      +	SH_TabBar_PreferNoArrows,
      +
      +	//bool - if left button should cause an absolute position
      +	SH_ScrollBar_LeftClickAbsolutePosition,
      +
      +	// TQEvent::Type - which mouse event to select a list view expansion
      +	SH_ListViewExpand_SelectMouseType,
      +
      +	//bool - if underline for accelerators
      +	SH_UnderlineAccelerator,
      +
      +	// bool - TQToolButton - if tool buttons should use a 3D frame
      +	// when the mouse is over the button
      +	SH_ToolButton_Uses3D,
      +
      +	// do not add any values below/greater than this
      +	SH_CustomBase =		0xf0000000
      +    };
      +
      +    virtual int styleHint( StyleHint stylehint,
      +			   const TQWidget *widget = 0,
      +			   const TQStyleOption& = TQStyleOption::Default,
      +			   TQStyleHintReturn* returnData = 0
      +			   ) const = 0;
      +
      +
      +    enum StylePixmap {
      +	SP_TitleBarMinButton,
      +	SP_TitleBarMaxButton,
      +	SP_TitleBarCloseButton,
      +	SP_TitleBarNormalButton,
      +	SP_TitleBarShadeButton,
      +	SP_TitleBarUnshadeButton,
      +	SP_DockWindowCloseButton,
      +	SP_MessageBoxInformation,
      +	SP_MessageBoxWarning,
      +	SP_MessageBoxCritical,
      +	SP_MessageBoxQuestion,
      +
      +	// do not add any values below/greater than this
      +	SP_CustomBase =		0xf0000000
      +    };
      +
      +    virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
      +				 const TQWidget *widget = 0,
      +				 const TQStyleOption& = TQStyleOption::Default ) const = 0;
      +
      +
      +    static TQRect visualRect( const TQRect &logical, const TQWidget *w );
      +
      +    static TQRect visualRect( const TQRect &logical, const TQRect &bounding );
      +
      +
      +
      +
      +    // Old 2.x TQStyle API
      +
      +#ifndef TQT_NO_COMPAT
      +    int defaultFrameWidth() const
      +    {
      +	return pixelMetric( PM_DefaultFrameWidth );
      +    }
      +    void tabbarMetrics( const TQWidget* t,
      +			int& hf, int& vf, int& ov ) const
      +    {
      +	hf = pixelMetric( PM_TabBarTabHSpace, t );
      +	vf = pixelMetric( PM_TabBarTabVSpace, t );
      +	ov = pixelMetric( PM_TabBarBaseOverlap, t );
      +    }
      +    TQSize scrollBarExtent() const
      +    {
      +	return TQSize(pixelMetric(PM_ScrollBarExtent),
      +		     pixelMetric(PM_ScrollBarExtent));
      +    }
      +#endif
      +
      +
      +private:
      +    TQStylePrivate * d;
      +
      +#if defined(TQ_DISABLE_COPY)
      +    TQStyle( const TQStyle & );
      +    TQStyle& operator=( const TQStyle & );
      +#endif
      +};
      +
      +#endif // TQT_NO_STYLE
      +#endif // TQSTYLE_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyle-members.html b/doc/html/tqstyle-members.html new file mode 100644 index 00000000..d6c99245 --- /dev/null +++ b/doc/html/tqstyle-members.html @@ -0,0 +1,111 @@ + + + + + +TQStyle Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStyle

      + +

      This is the complete list of member functions for +TQStyle, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyle.html b/doc/html/tqstyle.html new file mode 100644 index 00000000..39f0df6c --- /dev/null +++ b/doc/html/tqstyle.html @@ -0,0 +1,1220 @@ + + + + + +TQStyle Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStyle Class Reference

      + +

      The TQStyle class specifies the look and feel of a GUI. +More... +

      #include <tqstyle.h> +

      Inherits TQObject. +

      Inherited by TQCommonStyle. +

      List of all member functions. +

      Public Members

      +
        +
      • TQStyle ()
      • +
      • virtual ~TQStyle ()
      • +
      • virtual void polish ( TQWidget * )
      • +
      • virtual void unPolish ( TQWidget * )
      • +
      • virtual void polish ( TQApplication * )
      • +
      • virtual void unPolish ( TQApplication * )
      • +
      • virtual void polish ( TQPalette & )
      • +
      • virtual void polishPopupMenu ( TQPopupMenu * ) = 0
      • +
      • virtual TQRect itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const
      • +
      • virtual void drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const
      • +
      • enum PrimitiveElement { PE_ButtonCommand, PE_ButtonDefault, PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect, PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft, PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus, PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask, PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask, PE_DockWindowHandle, PE_DockWindowSeparator, PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup, PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase, PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection, PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark, PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage, PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst, PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit, PE_PanelTabWidget, PE_WindowFrame, PE_CheckListController, PE_CheckListIndicator, PE_CheckListExclusiveIndicator, PE_PanelGroupBox, PE_RubberBand, PE_CustomBase = 0xf000000 }
      • +
      • enum StyleFlags { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }
      • +
      • virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • enum ControlElement { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea, CE_PopupMenuScroller, CE_DockWindowEmptyArea, CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra, CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }
      • +
      • virtual void drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • virtual void drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • enum SubRect { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply, SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort, SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom, SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }
      • +
      • virtual TQRect subRect ( SubRect subrect, const TQWidget * widget ) const = 0
      • +
      • enum ComplexControl { CC_SpinWidget, CC_ComboBox, CC_ScrollBar, CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase = 0xf0000000 }
      • +
      • enum SubControl { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }
      • +
      • virtual void drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • virtual void drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • virtual TQRect querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • virtual SubControl querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • enum PixelMetric { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_PopupMenuScrollerHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize, PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing, PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }
      • +
      • virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const = 0
      • +
      • enum ContentsType { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip, CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }
      • +
      • virtual TQSize sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • enum StyleHint { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable, SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor, SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator, SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }
      • +
      • virtual int styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const = 0
      • +
      • enum StylePixmap { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion, SP_CustomBase = 0xf0000000 }
      • +
      • virtual TQPixmap stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
      • +
      • int defaultFrameWidth () const  (obsolete)
      • +
      • void tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const  (obsolete)
      • +
      • TQSize scrollBarExtent () const  (obsolete)
      • +
      +

      Static Public Members

      +
        +
      • TQRect visualRect ( const TQRect & logical, const TQWidget * w )
      • +
      • TQRect visualRect ( const TQRect & logical, const TQRect & bounding )
      • +
      +

      Detailed Description

      + + +The TQStyle class specifies the look and feel of a GUI. + +

      A large number of GUI elements are common to many widgets. The +TQStyle class allows the look of these elements to be modified +across all widgets that use the TQStyle functions. It also +provides two feel options: Motif and Windows. +

      Although it is not possible to fully enumerate the look of +graphical elements and the feel of widgets in a GUI, TQStyle +provides a considerable amount of control and customisability. +

      In TQt 1.x the look and feel option for widgets was specified by a +single value: the GUIStyle. Starting with TQt 2.0, this notion was +expanded to allow the look to be specified by virtual drawing +functions. +

      Derived classes may reimplement some or all of the drawing +functions to modify the look of all widgets that use those +functions. +

      Languages written from right to left (such as Arabic and Hebrew) +usually also mirror the whole layout of widgets. If you design a +style, you should take special care when drawing asymmetric +elements to make sure that they also look correct in a mirrored +layout. You can start your application with -reverse to check +the mirrored layout. Also notice, that for a reversed layout, the +light usually comes from top right instead of top left. +

      The actual reverse layout is performed automatically when +possible. However, for the sake of flexibility, the translation +cannot be performed everywhere. The documentation for each +function in the TQStyle API states whether the function +expects/returns logical or screen coordinates. Using logical +coordinates (in ComplexControls, for example) provides great +flexibility in controlling the look of a widget. Use visualRect() +when necessary to translate logical coordinates into screen +coordinates for drawing. +

      In TQt versions prior to 3.0, if you wanted a low level route into +changing the appearance of a widget, you would reimplement +polish(). With the new 3.0 style engine the recommended approach +is to reimplement the draw functions, for example drawItem(), +drawPrimitive(), drawControl(), drawControlMask(), +drawComplexControl() and drawComplexControlMask(). Each of these +functions is called with a range of parameters that provide +information that you can use to determine how to draw them, e.g. +style flags, rectangle, color group, etc. +

      For information on changing elements of an existing style or +creating your own style see the Style + overview. +

      Styles can also be created as plugins. +

      See also Widget Appearance and Style. + +


      Member Type Documentation

      +

      TQStyle::ComplexControl

      + +

      This enum represents a ComplexControl. ComplexControls have +different behaviour depending upon where the user clicks on them +or which keys are pressed. +

        +
      • TQStyle::CC_SpinWidget +
      • TQStyle::CC_ComboBox +
      • TQStyle::CC_ScrollBar +
      • TQStyle::CC_Slider +
      • TQStyle::CC_ToolButton +
      • TQStyle::CC_TitleBar +
      • TQStyle::CC_ListView +

        +
      • TQStyle::CC_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

      See also SubControl and drawComplexControl(). + +

      TQStyle::ContentsType

      + +

      This enum represents a ContentsType. It is used to calculate sizes +for the contents of various widgets. +

        +
      • TQStyle::CT_PushButton +
      • TQStyle::CT_CheckBox +
      • TQStyle::CT_RadioButton +
      • TQStyle::CT_ToolButton +
      • TQStyle::CT_ComboBox +
      • TQStyle::CT_Splitter +
      • TQStyle::CT_DockWindow +
      • TQStyle::CT_ProgressBar +
      • TQStyle::CT_PopupMenuItem +
      • TQStyle::CT_TabBarTab +
      • TQStyle::CT_Slider +
      • TQStyle::CT_Header +
      • TQStyle::CT_LineEdit +
      • TQStyle::CT_MenuBar +
      • TQStyle::CT_SpinBox +
      • TQStyle::CT_SizeGrip +
      • TQStyle::CT_TabWidget +
      • TQStyle::CT_DialogButtons +
      • TQStyle::CT_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Custom values +must be greater than this value. +

      See also sizeFromContents(). + +

      TQStyle::ControlElement

      + +

      This enum represents a ControlElement. A ControlElement is part of +a widget that performs some action or displays information to the +user. +

        +
      • TQStyle::CE_PushButton - the bevel and default indicator of a TQPushButton. +
      • TQStyle::CE_PushButtonLabel - the label (iconset with text or pixmap) +of a TQPushButton. +
      • TQStyle::CE_CheckBox - the indicator of a TQCheckBox. +
      • TQStyle::CE_CheckBoxLabel - the label (text or pixmap) of a TQCheckBox. +
      • TQStyle::CE_RadioButton - the indicator of a TQRadioButton. +
      • TQStyle::CE_RadioButtonLabel - the label (text or pixmap) of a TQRadioButton. +
      • TQStyle::CE_TabBarTab - the tab within a TQTabBar (a TQTab). +
      • TQStyle::CE_TabBarLabel - the label within a TQTab. +
      • TQStyle::CE_ProgressBarGroove - the groove where the progress +indicator is drawn in a TQProgressBar. +
      • TQStyle::CE_ProgressBarContents - the progress indicator of a TQProgressBar. +
      • TQStyle::CE_ProgressBarLabel - the text label of a TQProgressBar. +
      • TQStyle::CE_PopupMenuItem - a menu item in a TQPopupMenu. +
      • TQStyle::CE_PopupMenuScroller - scrolling areas in a popumenu when the +style supports scrolling. +
      • TQStyle::CE_PopupMenuHorizontalExtra - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra +
      • TQStyle::CE_PopupMenuVerticalExtra - extra frame area set aside with PM_PopupMenuFrameVerticalExtra +
      • TQStyle::CE_MenuBarItem - a menu item in a TQMenuBar. +
      • TQStyle::CE_ToolButtonLabel - a tool button's label. +
      • TQStyle::CE_MenuBarEmptyArea - the empty area of a TQMenuBar. +
      • TQStyle::CE_DockWindowEmptyArea - the empty area of a TQDockWindow. +
      • TQStyle::CE_ToolBoxTab - the toolbox's tab area +
      • TQStyle::CE_HeaderLabel - the header's label +
      • TQStyle::CE_CustomBase - base value for custom ControlElements. All values above +this are reserved for custom use. Therefore, custom values must be +greater than this value. +

      See also drawControl(). + +

      TQStyle::PixelMetric

      + +

      This enum represents a PixelMetric. A PixelMetric is a style +dependent size represented as a single pixel value. +

        +
      • TQStyle::PM_ButtonMargin - amount of whitespace between pushbutton +labels and the frame. +
      • TQStyle::PM_ButtonDefaultIndicator - width of the default-button indicator frame. +
      • TQStyle::PM_MenuButtonIndicator - width of the menu button indicator +proportional to the widget height. +
      • TQStyle::PM_ButtonShiftHorizontal - horizontal contents shift of a +button when the button is down. +
      • TQStyle::PM_ButtonShiftVertical - vertical contents shift of a button when the +button is down. +
      • TQStyle::PM_DefaultFrameWidth - default frame width, usually 2. +
      • TQStyle::PM_SpinBoxFrameWidth - frame width of a spin box. +
      • TQStyle::PM_MDIFrameWidth - frame width of an MDI window. +
      • TQStyle::PM_MDIMinimizedWidth - width of a minimized MSI window. +
      • TQStyle::PM_MaximumDragDistance - Some feels require the scrollbar or +other sliders to jump back to the original position when the +mouse pointer is too far away while dragging. A value of -1 +disables this behavior. +
      • TQStyle::PM_ScrollBarExtent - width of a vertical scrollbar and the +height of a horizontal scrollbar. +
      • TQStyle::PM_ScrollBarSliderMin - the minimum height of a vertical +scrollbar's slider and the minimum width of a horiztonal +scrollbar slider. +
      • TQStyle::PM_SliderThickness - total slider thickness. +
      • TQStyle::PM_SliderControlThickness - thickness of the slider handle. +
      • TQStyle::PM_SliderLength - length of the slider. +
      • TQStyle::PM_SliderTickmarkOffset - the offset between the tickmarks +and the slider. +
      • TQStyle::PM_SliderSpaceAvailable - the available space for the slider to move. +
      • TQStyle::PM_DockWindowSeparatorExtent - width of a separator in a +horiztonal dock window and the height of a separator in a +vertical dock window. +
      • TQStyle::PM_DockWindowHandleExtent - width of the handle in a +horizontal dock window and the height of the handle in a +vertical dock window. +
      • TQStyle::PM_DockWindowFrameWidth - frame width of a dock window. +
      • TQStyle::PM_MenuBarFrameWidth - frame width of a menubar. +
      • TQStyle::PM_MenuBarItemSpacing - spacing between menubar items. +
      • TQStyle::PM_ToolBarItemSpacing - spacing between toolbar items. +
      • TQStyle::PM_TabBarTabOverlap - number of pixels the tabs should overlap. +
      • TQStyle::PM_TabBarTabHSpace - extra space added to the tab width. +
      • TQStyle::PM_TabBarTabVSpace - extra space added to the tab height. +
      • TQStyle::PM_TabBarBaseHeight - height of the area between the tab bar +and the tab pages. +
      • TQStyle::PM_TabBarBaseOverlap - number of pixels the tab bar overlaps +the tab bar base. +
      • TQStyle::PM_TabBarScrollButtonWidth +
      • TQStyle::PM_TabBarTabShiftHorizontal - horizontal pixel shift when a +tab is selected. +
      • TQStyle::PM_TabBarTabShiftVertical - vertical pixel shift when a +tab is selected. +
      • TQStyle::PM_ProgressBarChunkWidth - width of a chunk in a progress bar indicator. +
      • TQStyle::PM_SplitterWidth - width of a splitter. +
      • TQStyle::PM_TitleBarHeight - height of the title bar. +
      • TQStyle::PM_PopupMenuFrameHorizontalExtra - additional border, e.g. for panels +
      • TQStyle::PM_PopupMenuFrameVerticalExtra - additional border, e.g. for panels +
      • TQStyle::PM_IndicatorWidth - width of a check box indicator. +
      • TQStyle::PM_IndicatorHeight - height of a checkbox indicator. +
      • TQStyle::PM_ExclusiveIndicatorWidth - width of a radio button indicator. +
      • TQStyle::PM_ExclusiveIndicatorHeight - height of a radio button indicator. +
      • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. +
      • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. +
      • TQStyle::PM_CheckListButtonSize - area (width/height) of the +checkbox/radiobutton in a TQCheckListItem +
      • TQStyle::PM_CheckListControllerSize - area (width/height) of the +controller in a TQCheckListItem +
      • TQStyle::PM_DialogButtonsSeparator - distance between buttons in a dialog buttons widget. +
      • TQStyle::PM_DialogButtonsButtonWidth - minimum width of a button in a dialog buttons widget. +
      • TQStyle::PM_DialogButtonsButtonHeight - minimum height of a button in a dialog buttons widget. +
      • TQStyle::PM_HeaderMarkSize +
      • TQStyle::PM_HeaderGripMargin +
      • TQStyle::PM_HeaderMargin +
      • TQStyle::PM_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

      See also pixelMetric(). + +

      TQStyle::PrimitiveElement

      + +

      This enum represents the PrimitiveElements of a style. A +PrimitiveElement is a common GUI element, such as a checkbox +indicator or pushbutton bevel. +

        +
      • TQStyle::PE_ButtonCommand - button used to initiate an action, for +example, a TQPushButton. +
      • TQStyle::PE_ButtonDefault - this button is the default button, e.g. +in a dialog. +
      • TQStyle::PE_ButtonBevel - generic button bevel. +
      • TQStyle::PE_ButtonTool - tool button, for example, a TQToolButton. +
      • TQStyle::PE_ButtonDropDown - drop down button, for example, a tool +button that displays a popup menu, for example, TQPopupMenu. +

        +
      • TQStyle::PE_FocusRect - generic focus indicator. +

        +
      • TQStyle::PE_ArrowUp - up arrow. +
      • TQStyle::PE_ArrowDown - down arrow. +
      • TQStyle::PE_ArrowRight - right arrow. +
      • TQStyle::PE_ArrowLeft - left arrow. +

        +
      • TQStyle::PE_SpinWidgetUp - up symbol for a spin widget, for example a +TQSpinBox. +
      • TQStyle::PE_SpinWidgetDown - down symbol for a spin widget. +
      • TQStyle::PE_SpinWidgetPlus - increase symbol for a spin widget. +
      • TQStyle::PE_SpinWidgetMinus - decrease symbol for a spin widget. +

        +
      • TQStyle::PE_Indicator - on/off indicator, for example, a TQCheckBox. +
      • TQStyle::PE_IndicatorMask - bitmap mask for an indicator. +
      • TQStyle::PE_ExclusiveIndicator - exclusive on/off indicator, for +example, a TQRadioButton. +
      • TQStyle::PE_ExclusiveIndicatorMask - bitmap mask for an exclusive indicator. +

        +
      • TQStyle::PE_DockWindowHandle - tear off handle for dock windows and +toolbars, for example TQDockWindows and TQToolBars. +
      • TQStyle::PE_DockWindowSeparator - item separator for dock window and +toolbar contents. +
      • TQStyle::PE_DockWindowResizeHandle - resize handle for dock windows. +
      • TQStyle::PE_Splitter - splitter handle; see also TQSplitter. +

        +
      • TQStyle::PE_Panel - generic panel frame; see also TQFrame. +
      • TQStyle::PE_PanelPopup - panel frame for popup windows/menus; see also +TQPopupMenu. +
      • TQStyle::PE_PanelMenuBar - panel frame for menu bars. +
      • TQStyle::PE_PanelDockWindow - panel frame for dock windows and toolbars. +
      • TQStyle::PE_PanelTabWidget - panel frame for tab widgets. +
      • TQStyle::PE_PanelLineEdit - panel frame for line edits. +
      • TQStyle::PE_PanelGroupBox - panel frame for group boxes. +
      • TQStyle::PE_TabBarBase - area below tabs in a tab widget, for example, +TQTab. +

        +
      • TQStyle::PE_HeaderSection - section of a list or table header; see also +TQHeader. +
      • TQStyle::PE_HeaderArrow - arrow used to indicate sorting on a list or table +header +
      • TQStyle::PE_StatusBarSection - section of a status bar; see also +TQStatusBar. +

        +
      • TQStyle::PE_GroupBoxFrame - frame around a group box; see also +TQGroupBox. +
      • TQStyle::PE_WindowFrame - frame around a MDI window or a docking window +

        +
      • TQStyle::PE_Separator - generic separator. +

        +
      • TQStyle::PE_SizeGrip - window resize handle; see also TQSizeGrip. +

        +
      • TQStyle::PE_CheckMark - generic check mark; see also TQCheckBox. +

        +
      • TQStyle::PE_ScrollBarAddLine - scrollbar line increase indicator +(i.e. scroll down); see also TQScrollBar. +
      • TQStyle::PE_ScrollBarSubLine - scrollbar line decrease indicator (i.e. scroll up). +
      • TQStyle::PE_ScrollBarAddPage - scolllbar page increase indicator (i.e. page down). +
      • TQStyle::PE_ScrollBarSubPage - scrollbar page decrease indicator (i.e. page up). +
      • TQStyle::PE_ScrollBarSlider - scrollbar slider +
      • TQStyle::PE_ScrollBarFirst - scrollbar first line indicator (i.e. home). +
      • TQStyle::PE_ScrollBarLast - scrollbar last line indicator (i.e. end). +

        +
      • TQStyle::PE_ProgressBarChunk - section of a progress bar indicator; see +also TQProgressBar. +
      • TQStyle::PE_CheckListController - controller part of a listview item +
      • TQStyle::PE_CheckListIndicator - checkbox part of a listview item +
      • TQStyle::PE_CheckListExclusiveIndicator - radiobutton part of a listview item +
      • TQStyle::PE_RubberBand - rubber band used in such things as iconview +
      • TQStyle::PE_CustomBase - base value for custom PrimitiveElements. +All values above this are reserved for custom use. Custom +values must be greater than this value. +

      See also drawPrimitive(). + +

      TQStyle::StyleFlags

      + +

      This enum represents flags for drawing PrimitiveElements. Not all +primitives use all of these flags. Note that these flags may mean +different things to different primitives. For an explanation of +the relationship between primitives and their flags, as well as +the different meanings of the flags, see the Style overview. +

        +
      • TQStyle::Style_Default +
      • TQStyle::Style_Enabled +
      • TQStyle::Style_Raised +
      • TQStyle::Style_Sunken +
      • TQStyle::Style_Off +
      • TQStyle::Style_NoChange +
      • TQStyle::Style_On +
      • TQStyle::Style_Down +
      • TQStyle::Style_Horizontal +
      • TQStyle::Style_HasFocus +
      • TQStyle::Style_Top +
      • TQStyle::Style_Bottom +
      • TQStyle::Style_FocusAtBorder +
      • TQStyle::Style_AutoRaise +
      • TQStyle::Style_MouseOver +
      • TQStyle::Style_Up +
      • TQStyle::Style_Selected +
      • TQStyle::Style_HasFocus +
      • TQStyle::Style_Active +
      • TQStyle::Style_ButtonDefault +

      See also drawPrimitive(). + +

      TQStyle::StyleHint

      + +

      This enum represents a StyleHint. A StyleHint is a general look +and/or feel hint. +

        +
      • TQStyle::SH_EtchDisabledText - disabled text is "etched" like Windows. +
      • TQStyle::SH_GUIStyle - the GUI style to use. +
      • TQStyle::SH_ScrollBar_BackgroundMode - the background mode for a +TQScrollBar. Possible values are any of those in the BackgroundMode enum. +
      • TQStyle::SH_ScrollBar_MiddleClickAbsolutePosition - a boolean value. +If TRUE, middle clicking on a scrollbar causes the slider to +jump to that position. If FALSE, the middle clicking is +ignored. +
      • TQStyle::SH_ScrollBar_LeftClickAbsolutePosition - a boolean value. +If TRUE, left clicking on a scrollbar causes the slider to +jump to that position. If FALSE, the left clicking will +behave as appropriate for each control. +
      • TQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl - a boolean +value. If TRUE, when clicking a scrollbar SubControl, holding +the mouse button down and moving the pointer outside the +SubControl, the scrollbar continues to scroll. If FALSE, the +scollbar stops scrolling when the pointer leaves the +SubControl. +
      • TQStyle::SH_TabBar_Alignment - the alignment for tabs in a +TQTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. +
      • TQStyle::SH_Header_ArrowAlignment - the placement of the sorting +indicator may appear in list or table headers. Possible values +are TQt::Left or TQt::Right. +
      • TQStyle::SH_Slider_SnapToValue - sliders snap to values while moving, +like Windows +
      • TQStyle::SH_Slider_SloppyKeyEvents - key presses handled in a sloppy +manner, i.e. left on a vertical slider subtracts a line. +
      • TQStyle::SH_ProgressDialog_CenterCancelButton - center button on +progress dialogs, like Motif, otherwise right aligned. +
      • TQStyle::SH_ProgressDialog_TextLabelAlignment - TQt::AlignmentFlags -- +text label alignment in progress dialogs; Center on windows, +Auto|VCenter otherwise. +
      • TQStyle::SH_PrintDialog_RightAlignButtons - right align buttons in +the print dialog, like Windows. +
      • TQStyle::SH_MainWindow_SpaceBelowMenuBar - 1 or 2 pixel space between +the menubar and the dockarea, like Windows. +
      • TQStyle::SH_FontDialog_SelectAssociatedText - select the text in the +line edit, or when selecting an item from the listbox, or when +the line edit receives focus, like Windows. +
      • TQStyle::SH_PopupMenu_AllowActiveAndDisabled - allows disabled menu +items to be active. +
      • TQStyle::SH_PopupMenu_SpaceActivatesItem - pressing Space activates +the item, like Motif. +
      • TQStyle::SH_PopupMenu_SubMenuPopupDelay - the number of milliseconds +to wait before opening a submenu; 256 on windows, 96 on Motif. +
      • TQStyle::SH_PopupMenu_Scrollable - whether popupmenu's must support +scrolling. +
      • TQStyle::SH_PopupMenu_SloppySubMenus - whether popupmenu's must support +sloppy submenu; as implemented on Mac OS. +
      • TQStyle::SH_ScrollView_FrameOnlyAroundContents - whether scrollviews +draw their frame only around contents (like Motif), or around +contents, scrollbars and corner widgets (like Windows). +
      • TQStyle::SH_MenuBar_AltKeyNavigation - menubars items are navigable +by pressing Alt, followed by using the arrow keys to select +the desired item. +
      • TQStyle::SH_ComboBox_ListMouseTracking - mouse tracking in combobox +dropdown lists. +
      • TQStyle::SH_PopupMenu_MouseTracking - mouse tracking in popup menus. +
      • TQStyle::SH_MenuBar_MouseTracking - mouse tracking in menubars. +
      • TQStyle::SH_ItemView_ChangeHighlightOnFocus - gray out selected items +when losing focus. +
      • TQStyle::SH_Widget_ShareActivation - turn on sharing activation with +floating modeless dialogs. +
      • TQStyle::SH_TabBar_SelectMouseType - which type of mouse event should +cause a tab to be selected. +
      • TQStyle::SH_ListViewExpand_SelectMouseType - which type of mouse event should +cause a listview expansion to be selected. +
      • TQStyle::SH_TabBar_PreferNoArrows - whether a tabbar should suggest a size +to prevent scoll arrows. +
      • TQStyle::SH_ComboBox_Popup - allows popups as a combobox dropdown +menu. +
      • TQStyle::SH_Workspace_FillSpaceOnMaximize - the workspace should +maximize the client area. +
      • TQStyle::SH_TitleBar_NoBorder - the titlebar has no border +
      • TQStyle::SH_ScrollBar_StopMouseOverSlider - stops autorepeat when +slider reaches mouse +
      • TQStyle::SH_BlinkCursorWhenTextSelected - whether cursor should blink +when text is selected +
      • TQStyle::SH_RichText_FullWidthSelection - whether richtext selections +should extend the full width of the document. +
      • TQStyle::SH_GroupBox_TextLabelVerticalAlignment - how to vertically align a +groupbox's text label. +
      • TQStyle::SH_GroupBox_TextLabelColor - how to paint a groupbox's text label. +
      • TQStyle::SH_DialogButtons_DefaultButton - which buttons gets the +default status in a dialog's button widget. +
      • TQStyle::SH_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +
      • TQStyle::SH_ToolButton_Uses3D - indicates whether TQToolButtons should +use a 3D frame when the mouse is over them +
      • TQStyle::SH_ToolBox_SelectedPageTitleBold - Boldness of the selected +page title in a TQToolBox. +
      • TQStyle::SH_LineEdit_PasswordCharacter - The TQChar Unicode character +to be used for passwords. +
      • TQStyle::SH_Table_GridLineColor +
      • TQStyle::SH_UnderlineAccelerator - whether accelerators are underlined +

      See also styleHint(). + +

      TQStyle::StylePixmap

      + +

      This enum represents a StylePixmap. A StylePixmap is a pixmap that +can follow some existing GUI style or guideline. +

        +
      • TQStyle::SP_TitleBarMinButton - minimize button on titlebars. For +example, in a TQWorkspace. +
      • TQStyle::SP_TitleBarMaxButton - maximize button on titlebars. +
      • TQStyle::SP_TitleBarCloseButton - close button on titlebars. +
      • TQStyle::SP_TitleBarNormalButton - normal (restore) button on titlebars. +
      • TQStyle::SP_TitleBarShadeButton - shade button on titlebars. +
      • TQStyle::SP_TitleBarUnshadeButton - unshade button on titlebars. +
      • TQStyle::SP_MessageBoxInformation - the 'information' icon. +
      • TQStyle::SP_MessageBoxWarning - the 'warning' icon. +
      • TQStyle::SP_MessageBoxCritical - the 'critical' icon. +
      • TQStyle::SP_MessageBoxQuestion - the 'question' icon. +

        +
      • TQStyle::SP_DockWindowCloseButton - close button on dock windows; +see also TQDockWindow. +

        +
      • TQStyle::SP_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

      See also stylePixmap(). + +

      TQStyle::SubControl

      + +

      This enum represents a SubControl within a ComplexControl. +

        +
      • TQStyle::SC_None - special value that matches no other SubControl. +

        +
      • TQStyle::SC_ScrollBarAddLine - scrollbar add line (i.e. down/right +arrow); see also TQScrollbar. +
      • TQStyle::SC_ScrollBarSubLine - scrollbar sub line (i.e. up/left arrow). +
      • TQStyle::SC_ScrollBarAddPage - scrollbar add page (i.e. page down). +
      • TQStyle::SC_ScrollBarSubPage - scrollbar sub page (i.e. page up). +
      • TQStyle::SC_ScrollBarFirst - scrollbar first line (i.e. home). +
      • TQStyle::SC_ScrollBarLast - scrollbar last line (i.e. end). +
      • TQStyle::SC_ScrollBarSlider - scrollbar slider handle. +
      • TQStyle::SC_ScrollBarGroove - special subcontrol which contains the +area in which the slider handle may move. +

        +
      • TQStyle::SC_SpinWidgetUp - spinwidget up/increase; see also TQSpinBox. +
      • TQStyle::SC_SpinWidgetDown - spinwidget down/decrease. +
      • TQStyle::SC_SpinWidgetFrame - spinwidget frame. +
      • TQStyle::SC_SpinWidgetEditField - spinwidget edit field. +
      • TQStyle::SC_SpinWidgetButtonField - spinwidget button field. +

        +
      • TQStyle::SC_ComboBoxEditField - combobox edit field; see also TQComboBox. +
      • TQStyle::SC_ComboBoxArrow - combobox arrow +
      • TQStyle::SC_ComboBoxFrame - combobox frame +
      • TQStyle::SC_ComboBoxListBoxPopup - combobox list box +
      • TQStyle::SC_SliderGroove - special subcontrol which contains the area +in which the slider handle may move. +
      • TQStyle::SC_SliderHandle - slider handle. +
      • TQStyle::SC_SliderTickmarks - slider tickmarks. +

        +
      • TQStyle::SC_ToolButton - tool button; see also TQToolbutton. +
      • TQStyle::SC_ToolButtonMenu - subcontrol for opening a popup menu in a +tool button; see also TQPopupMenu. +

        +
      • TQStyle::SC_TitleBarSysMenu - system menu button (i.e. restore, close, etc.). +
      • TQStyle::SC_TitleBarMinButton - minimize button. +
      • TQStyle::SC_TitleBarMaxButton - maximize button. +
      • TQStyle::SC_TitleBarCloseButton - close button. +
      • TQStyle::SC_TitleBarLabel - window title label. +
      • TQStyle::SC_TitleBarNormalButton - normal (restore) button. +
      • TQStyle::SC_TitleBarShadeButton - shade button. +
      • TQStyle::SC_TitleBarUnshadeButton - unshade button. +

        +
      • TQStyle::SC_ListView - the list view area. +
      • TQStyle::SC_ListViewBranch - (internal) +
      • TQStyle::SC_ListViewExpand - expand item (i.e. show/hide child items). +

        +
      • TQStyle::SC_All - special value that matches all SubControls. +

      See also ComplexControl. + +

      TQStyle::SubRect

      + +

      This enum represents a sub-area of a widget. Style implementations +would use these areas to draw the different parts of a widget. +

        +
      • TQStyle::SR_PushButtonContents - area containing the label (iconset +with text or pixmap). +
      • TQStyle::SR_PushButtonFocusRect - area for the focus rect (usually +larger than the contents rect). +
      • TQStyle::SR_CheckBoxIndicator - area for the state indicator (e.g. check mark). +
      • TQStyle::SR_CheckBoxContents - area for the label (text or pixmap). +
      • TQStyle::SR_CheckBoxFocusRect - area for the focus indicator. +

        +
      • TQStyle::SR_RadioButtonIndicator - area for the state indicator. +
      • TQStyle::SR_RadioButtonContents - area for the label. +
      • TQStyle::SR_RadioButtonFocusRect - area for the focus indicator. +

        +
      • TQStyle::SR_ComboBoxFocusRect - area for the focus indicator. +

        +
      • TQStyle::SR_SliderFocusRect - area for the focus indicator. +

        +
      • TQStyle::SR_DockWindowHandleRect - area for the tear-off handle. +

        +
      • TQStyle::SR_ProgressBarGroove - area for the groove. +
      • TQStyle::SR_ProgressBarContents - area for the progress indicator. +
      • TQStyle::SR_ProgressBarLabel - area for the text label. +

        +
      • TQStyle::SR_ToolButtonContents - area for the tool button's label. +
      • TQStyle::SR_DialogButtonAccept - area for a dialog's accept button. +
      • TQStyle::SR_DialogButtonReject - area for a dialog's reject button. +
      • TQStyle::SR_DialogButtonApply - area for a dialog's apply button. +
      • TQStyle::SR_DialogButtonHelp - area for a dialog's help button. +
      • TQStyle::SR_DialogButtonAll - area for a dialog's all button. +
      • TQStyle::SR_DialogButtonRetry - area for a dialog's retry button. +
      • TQStyle::SR_DialogButtonAbort - area for a dialog's abort button. +
      • TQStyle::SR_DialogButtonIgnore - area for a dialog's ignore button. +
      • TQStyle::SR_DialogButtonCustom - area for a dialog's custom widget area (in button row). +
      • TQStyle::SR_ToolBoxTabContents - area for a toolbox tab's icon and label +
      • TQStyle::SR_CustomBase - base value for custom ControlElements. All values above +this are reserved for custom use. Therefore, custom values must be +greater than this value. +

      See also subRect(). + +


      Member Function Documentation

      +

      TQStyle::TQStyle () +

      +Constructs a TQStyle. + +

      TQStyle::~TQStyle () [virtual] +

      +Destroys the style and frees all allocated resources. + +

      int TQStyle::defaultFrameWidth () const +

      + +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      +

      void TQStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Draws the ComplexControl control using the painter p in the +area r. Colors are used from the color group cg. The sub +argument specifies which SubControls to draw. Multiple SubControls +can be OR'ed together. The subActive argument specifies which +SubControl is active. +

      The rect r should be in logical coordinates. Reimplementations +of this function should use visualRect() to change the logical +coordinates into screen coordinates when using drawPrimitive() and +drawControl(). +

      The how argument is used to control how the ComplexControl is +drawn. Multiple flags can OR'ed together. See the table below for +an explanation of which flags are used with the various +ComplexControls. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information required when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See the table below for +the appropriate widget and opt usage: +

      +
      ComplexControl
      & Widget Cast +
      Style Flags +Notes +Options +Notes +
      CC_SpinWidget(const TQSpinWidget *) +Style_Enabled Set if the spinwidget is enabled. + Unused. +   +
      Style_HasFocus Set if the spinwidget has input focus. +
      CC_ComboBox(const TQComboBox *) +Style_Enabled Set if the combobox is enabled. + Unused. +   +
      Style_HasFocus Set if the combobox has input focus. +
      CC_ScrollBar(const TQScrollBar *) +Style_Enabled Set if the scrollbar is enabled. + Unused. +   +
      Style_HasFocus Set if the scrollbar has input focus. +
      CC_Slider(const TQSlider *) +Style_Enabled Set if the slider is enabled. + Unused. +   +
      Style_HasFocus Set if the slider has input focus. +
      CC_ToolButton(const TQToolButton *) +Style_Enabled Set if the toolbutton is enabled. + TQStyleOption ( ArrowType t ) + + When the tool button only contains an arrow, t is the +arrow's type. +
      Style_HasFocus Set if the toolbutton has input focus. +
      Style_Down Set if the toolbutton is down (ie. mouse +button or space pressed). +
      Style_On Set if the toolbutton is a toggle button +and is toggled on. +
      Style_AutoRaise Set if the toolbutton has auto-raise enabled. +
      Style_Raised Set if the button is not down, not on and doesn't +contain the mouse when auto-raise is enabled. +
      CC_TitleBar(const TQWidget *) +Style_Enabled Set if the titlebar is enabled. +Unused. +  +
      CC_ListView(const TQListView *) +Style_Enabled Set if the titlebar is enabled. +TQStyleOption ( TQListViewItem *item ) + +item is the item that needs branches drawn +
      +

      See also ComplexControl and SubControl. + +

      void TQStyle::drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Draw a bitmask for the ComplexControl control using the painter +p in the area r. See drawComplexControl() for an explanation +of the use of the widget and opt arguments. +

      The rect r should be in logical coordinates. Reimplementations +of this function should use visualRect() to change the logical +corrdinates into screen coordinates when using drawPrimitive() and +drawControl(). +

      See also drawComplexControl() and ComplexControl. + +

      void TQStyle::drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Draws the ControlElement element using the painter p in the +area r. Colors are used from the color group cg. +

      The rect r should be in screen coordinates. +

      The how argument is used to control how the ControlElement is +drawn. Multiple flags can be OR'ed together. See the table below +for an explanation of which flags are used with the various +ControlElements. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of element. The opt argument can be used to +pass extra information required when drawing the ControlElement. +Note that opt may be the default value even for ControlElements +that can make use of the extra options. See the table below for +the appropriate widget and opt usage: +

      +
      ControlElement
      & Widget Cast +
      Style Flags +Notes +Options +Notes +
      CE_PushButton(const TQPushButton *) +

      and +

      CE_PushButtonLabel(const TQPushButton *) +

      Style_Enabled Set if the button is enabled. + Unused. +   +
      Style_HasFocus Set if the button has input focus. +
      Style_Raised Set if the button is not down, not on and not flat. +
      Style_On Set if the button is a toggle button and toggled on. +
      Style_Down Set if the button is down (i.e., the mouse button or +space bar is pressed on the button). +
      Style_ButtonDefault Set if the button is a default button. +
      CE_CheckBox(const TQCheckBox *) +

      and +

      CE_CheckBoxLabel(const TQCheckBox *) +

      Style_Enabled Set if the checkbox is enabled. + Unused. +   +
      Style_HasFocus Set if the checkbox has input focus. +
      Style_On Set if the checkbox is checked. +
      Style_Off Set if the checkbox is not checked. +
      Style_NoChange Set if the checkbox is in the NoChange state. +
      Style_Down Set if the checkbox is down (i.e., the mouse button or +space bar is pressed on the button). +
      CE_RadioButton(const TQRadioButton *) +

      and +

      CE_RadioButtonLabel(const TQRadioButton *) +

      Style_Enabled Set if the radiobutton is enabled. + Unused. +   +
      Style_HasFocus Set if the radiobutton has input focus. +
      Style_On Set if the radiobutton is checked. +
      Style_Off Set if the radiobutton is not checked. +
      Style_Down Set if the radiobutton is down (i.e., the mouse +button or space bar is pressed on the radiobutton). +
      CE_TabBarTab(const TQTabBar *) +

      and +

      CE_TabBarLabel(const TQTabBar *) +

      Style_Enabled Set if the tabbar and tab is enabled. + TQStyleOption ( TQTab *t ) + + t is the TQTab being drawn. +
      Style_Selected Set if the tab is the current tab. +
      CE_ProgressBarGroove(const TQProgressBar *) +

      and +

      CE_ProgressBarContents(const TQProgressBar *) +

      and +

      CE_ProgressBarLabel(const TQProgressBar *) +

      Style_Enabled Set if the progressbar is enabled. + Unused. +   +
      Style_HasFocus Set if the progressbar has input focus. +
      CE_PopupMenuItem(const TQPopupMenu *) +Style_Enabled Set if the menuitem is enabled. + TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) + +mi is the menu item being drawn. TQMenuItem is currently an +internal class. +
      Style_Active Set if the menuitem is the current item. +tabwidth is the width of the tab column where key accelerators +are drawn. +
      Style_Down Set if the menuitem is down (i.e., the mouse button +or space bar is pressed). +maxpmwidth is the maximum width of the check column where +checkmarks and iconsets are drawn. +
      CE_MenuBarItem(const TQMenuBar *) +Style_Enabled Set if the menuitem is enabled + TQStyleOption ( TQMenuItem *mi ) + + mi is the menu item being drawn. +
      Style_Active Set if the menuitem is the current item. +
      Style_Down Set if the menuitem is down (i.e., a mouse button or +the space bar is pressed). +
      Style_HasFocus Set if the menubar has input focus. +
      CE_ToolButtonLabel(const TQToolButton *) +Style_Enabled Set if the toolbutton is enabled. + TQStyleOption ( ArrowType t ) + + When the tool button only contains an arrow, t is the +arrow's type. +
      Style_HasFocus Set if the toolbutton has input focus. +
      Style_Down Set if the toolbutton is down (i.e., a +mouse button or the space is pressed). +
      Style_On Set if the toolbutton is a toggle button +and is toggled on. +
      Style_AutoRaise Set if the toolbutton has auto-raise enabled. +
      Style_MouseOver Set if the mouse pointer is over the toolbutton. +
      Style_Raised Set if the button is not down, not on and doesn't +contain the mouse when auto-raise is enabled. +
      +

      See also ControlElement and StyleFlags. + +

      void TQStyle::drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Draw a bitmask for the ControlElement element using the painter +p in the area r. See drawControl() for an explanation of the +use of the widget and opt arguments. +

      The rect r should be in screen coordinates. +

      See also drawControl() and ControlElement. + +

      void TQStyle::drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const [virtual] +

      +Draws the text or pixmap in rectangle r using painter p and color group g. The pen color is specified with penColor. The enabled bool indicates whether or not the item is +enabled; when reimplementing this bool should influence how the +item is drawn. If len is -1 (the default) all the text is +drawn; otherwise only the first len characters of text are +drawn. The text is aligned and wrapped according to the alignment +flags (see TQt::AlignmentFlags). +

      By default, if both the text and the pixmap are not null, the +pixmap is drawn and the text is ignored. + +

      void TQStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Draws the style PrimitiveElement pe using the painter p in +the area r. Colors are used from the color group cg. +

      The rect r should be in screen coordinates. +

      The flags argument is used to control how the PrimitiveElement +is drawn. Multiple flags can be OR'ed together. +

      For example, a pressed button would be drawn with the flags Style_Enabled and Style_Down. +

      The opt argument can be used to control how various +PrimitiveElements are drawn. Note that opt may be the default +value even for PrimitiveElements that make use of extra options. +When opt is non-default, it is used as follows: +

      +
      PrimitiveElement Options Notes +
      PE_FocusRect +TQStyleOption ( const TQColor & bg ) + +bg is the background color on which the focus rect is being drawn. +
      PE_Panel + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
      midlinewidth is the mid-line width for drawing the panel. +
      PE_PanelPopup + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
      midlinewidth is the mid-line width for drawing the panel. +
      PE_PanelMenuBar + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
      midlinewidth is the mid-line width for drawing the panel. +
      PE_PanelDockWindow + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
      midlinewidth is the mid-line width for drawing the panel. +
      PE_GroupBoxFrame + TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) + +linewidth is the line width for the group box. +
      midlinewidth is the mid-line width for the group box. +
      shape is the frame shape +for the group box. +
      shadow is the frame shadow +for the group box. +
      +

      For all other PrimitiveElements, opt is unused. +

      See also StyleFlags. + +

      Example: themes/wood.cpp. +

      TQRect TQStyle::itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const [virtual] +

      +Returns the appropriate area (see below) within rectangle r in +which to draw the text or pixmap using painter p. If len is -1 (the default) all the text is drawn; otherwise only +the first len characters of text are drawn. The text is +aligned in accordance with the alignment flags (see +TQt::AlignmentFlags). The enabled bool indicates whether or +not the item is enabled. +

      If r is larger than the area needed to render the text the +rectangle that is returned will be offset within r in +accordance with the alignment flags. For example if flags is +AlignCenter the returned rectangle will be centered within r. If r is smaller than the area needed the rectangle that is +returned will be larger than r (the smallest rectangle large +enough to render the text or pixmap). +

      By default, if both the text and the pixmap are not null, the +pixmap is drawn and the text is ignored. + +

      int TQStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const [pure virtual] +

      + +

      Returns the pixel metric for metric. The widget argument is +a pointer to a TQWidget or one of its subclasses. The widget can be +cast to the appropriate type based on the value of metric. Note +that widget may be zero even for PixelMetrics that can make use +of widget. See the table below for the appropriate widget +casts: +

      +
      PixelMetric Widget Cast +
      PM_SliderControlThickness (const TQSlider *) +
      PM_SliderLength (const TQSlider *) +
      PM_SliderTickmarkOffset (const TQSlider *) +
      PM_SliderSpaceAvailable (const TQSlider *) +
      PM_TabBarTabOverlap (const TQTabBar *) +
      PM_TabBarTabHSpace (const TQTabBar *) +
      PM_TabBarTabVSpace (const TQTabBar *) +
      PM_TabBarBaseHeight (const TQTabBar *) +
      PM_TabBarBaseOverlap (const TQTabBar *) +
      + +

      void TQStyle::polish ( TQWidget * ) [virtual] +

      +Initializes the appearance of a widget. +

      This function is called for every widget at some point after it +has been fully created but just before it is shown the very +first time. +

      Reasonable actions in this function might be to call +TQWidget::setBackgroundMode() for the widget. An example of highly +unreasonable use would be setting the geometry! Reimplementing +this function gives you a back-door through which you can change +the appearance of a widget. With TQt 3.0's style engine you will +rarely need to write your own polish(); instead reimplement +drawItem(), drawPrimitive(), etc. +

      The TQWidget::inherits() function may provide enough information to +allow class-specific customizations. But be careful not to +hard-code things too much because new TQStyle subclasses are +expected to work reasonably with all current and future +widgets. +

      See also unPolish(). + +

      void TQStyle::polish ( TQApplication * ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Late initialization of the TQApplication object. +

      See also unPolish(). + +

      void TQStyle::polish ( TQPalette & ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      The style may have certain requirements for color palettes. In +this function it has the chance to change the palette according to +these requirements. +

      See also TQPalette and TQApplication::setPalette(). + +

      void TQStyle::polishPopupMenu ( TQPopupMenu * ) [pure virtual] +

      +Polishes the popup menu according to the GUI style. This usually +means setting the mouse tracking +(TQPopupMenu::setMouseTracking()) and whether the menu is +checkable by default (TQPopupMenu::setCheckable()). + +

      SubControl TQStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Returns the SubControl for widget at the point pos. The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information required when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See drawComplexControl() +for an explanation of the widget and opt arguments. +

      Note that pos is passed in screen coordinates. When using +querySubControlMetrics() to check for hits and misses, use +visualRect() to change the logical coordinates into screen +coordinates. +

      See also drawComplexControl(), ComplexControl, SubControl, and querySubControlMetrics(). + +

      TQRect TQStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Returns the rect for the SubControl subcontrol for widget in +logical coordinates. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information required when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See drawComplexControl() +for an explanation of the widget and opt arguments. +

      See also drawComplexControl(), ComplexControl, and SubControl. + +

      TQSize TQStyle::scrollBarExtent () const +

      + +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      +

      TQSize TQStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Returns the size of widget based on the contents size contentsSize. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of contents. The opt argument can be used to +pass extra information required when calculating the size. Note +that opt may be the default value even for ContentsTypes that +can make use of the extra options. See the table below for the +appropriate widget and opt usage: +

      +
      ContentsType Widget Cast Options Notes +
      CT_PushButton (const TQPushButton *) Unused.   +
      CT_CheckBox (const TQCheckBox *) Unused.   +
      CT_RadioButton (const TQRadioButton *) Unused.   +
      CT_ToolButton (const TQToolButton *) Unused.   +
      CT_ComboBox (const TQComboBox *) Unused.   +
      CT_Splitter (const TQSplitter *) Unused.   +
      CT_DockWindow (const TQDockWindow *) Unused.   +
      CT_ProgressBar (const TQProgressBar *) Unused.   +
      CT_PopupMenuItem (const TQPopupMenu *) +TQStyleOption ( TQMenuItem *mi ) + +mi is the menu item to use when calculating the size. +TQMenuItem is currently an internal class. +
      + +

      int TQStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const [pure virtual] +

      + +

      Returns the style hint stylehint for widget. Currently, widget, opt, and returnData are unused; they're included to +allow for future enhancements. +

      For an explanation of the return value see StyleHint. + +

      TQPixmap TQStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

      + +

      Returns a pixmap for stylepixmap. +

      The opt argument can be used to pass extra information required +when drawing the ControlElement. Note that opt may be the +default value even for StylePixmaps that can make use of the extra +options. Currently, the opt argument is unused. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of stylepixmap. See the table below for the +appropriate widget casts: +

      +
      StylePixmap Widget Cast +
      SP_TitleBarMinButton (const TQWidget *) +
      SP_TitleBarMaxButton (const TQWidget *) +
      SP_TitleBarCloseButton (const TQWidget *) +
      SP_TitleBarNormalButton (const TQWidget *) +
      SP_TitleBarShadeButton (const TQWidget *) +
      SP_TitleBarUnshadeButton (const TQWidget *) +
      SP_DockWindowCloseButton (const TQDockWindow *) +
      +

      See also StylePixmap. + +

      TQRect TQStyle::subRect ( SubRect subrect, const TQWidget * widget ) const [pure virtual] +

      + +

      Returns the sub-area subrect for the widget in logical +coordinates. +

      The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of subrect. See the table below for the +appropriate widget casts: +

      +
      SubRect Widget Cast +
      SR_PushButtonContents (const TQPushButton *) +
      SR_PushButtonFocusRect (const TQPushButton *) +
      SR_CheckBoxIndicator (const TQCheckBox *) +
      SR_CheckBoxContents (const TQCheckBox *) +
      SR_CheckBoxFocusRect (const TQCheckBox *) +
      SR_RadioButtonIndicator (const TQRadioButton *) +
      SR_RadioButtonContents (const TQRadioButton *) +
      SR_RadioButtonFocusRect (const TQRadioButton *) +
      SR_ComboBoxFocusRect (const TQComboBox *) +
      SR_DockWindowHandleRect (const TQWidget *) +
      SR_ProgressBarGroove (const TQProgressBar *) +
      SR_ProgressBarContents (const TQProgressBar *) +
      SR_ProgressBarLabel (const TQProgressBar *) +
      +

      The tear-off handle (SR_DockWindowHandleRect) for TQDockWindow +is a private class. Use TQWidget::parentWidget() to access the +TQDockWindow: +

      +        if ( !widget->parentWidget() )
      +            return;
      +        const TQDockWindow *dw = (const TQDockWindow *) widget->parentWidget();
      +    
      + +

      See also SubRect. + +

      void TQStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const +

      + +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      +

      void TQStyle::unPolish ( TQWidget * ) [virtual] +

      +Undoes the initialization of a widget's appearance. +

      This function is the counterpart to polish. It is called for every +polished widget when the style is dynamically changed. The former +style has to unpolish its settings before the new style can polish +them again. +

      See also polish(). + +

      void TQStyle::unPolish ( TQApplication * ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Undoes the application polish. +

      See also polish(). + +

      TQRect TQStyle::visualRect ( const TQRect & logical, const TQWidget * w ) [static] +

      + +

      Returns the rect logical in screen coordinates. The bounding +rect for widget w is used to perform the translation. This +function is provided to aid style implementors in supporting +right-to-left mode. +

      See also TQApplication::reverseLayout(). + +

      TQRect TQStyle::visualRect ( const TQRect & logical, const TQRect & bounding ) [static] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the rect logical in screen coordinates. The rect bounding is used to perform the translation. This function is +provided to aid style implementors in supporting right-to-left +mode. +

      See also TQApplication::reverseLayout(). + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylefactory-h.html b/doc/html/tqstylefactory-h.html new file mode 100644 index 00000000..9ad9da7c --- /dev/null +++ b/doc/html/tqstylefactory-h.html @@ -0,0 +1,107 @@ + + + + + +tqstylefactory.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqstylefactory.h

      + +

      This is the verbatim text of the tqstylefactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +** $Id: qt/tqstylefactory.h   3.3.8   edited Jan 11 14:46 $
      +**
      +** ...
      +**
      +** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the widgets module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSTYLEFACTORY_H
      +#define TQSTYLEFACTORY_H
      +
      +#ifndef QT_H
      +#include "tqstringlist.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_STYLE
      +
      +class TQString;
      +class TQStyle;
      +
      +class TQ_EXPORT TQStyleFactory
      +{
      +public:
      +#ifndef TQT_NO_STRINGLIST
      +    static TQStringList keys();
      +#endif
      +    static TQStyle *create( const TQString& );
      +};
      +
      +#endif //TQT_NO_STYLE
      +
      +#endif //TQSTYLEFACTORY_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylefactory-members.html b/doc/html/tqstylefactory-members.html new file mode 100644 index 00000000..754b120d --- /dev/null +++ b/doc/html/tqstylefactory-members.html @@ -0,0 +1,48 @@ + + + + + +TQStyleFactory Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStyleFactory

      + +

      This is the complete list of member functions for +TQStyleFactory, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylefactory.html b/doc/html/tqstylefactory.html new file mode 100644 index 00000000..04c2d8cf --- /dev/null +++ b/doc/html/tqstylefactory.html @@ -0,0 +1,80 @@ + + + + + +TQStyleFactory Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStyleFactory Class Reference

      + +

      The TQStyleFactory class creates TQStyle objects. +More... +

      #include <tqstylefactory.h> +

      List of all member functions. +

      Static Public Members

      +
        +
      • TQStringList keys ()
      • +
      • TQStyle * create ( const TQString & key )
      • +
      +

      Detailed Description

      + + +The TQStyleFactory class creates TQStyle objects. +

      The style factory creates a TQStyle object for a given key with +TQStyleFactory::create(key). +

      The styles are either built-in or dynamically loaded from a style +plugin (see TQStylePlugin). +

      TQStyleFactory::keys() returns a list of valid keys, typically +including "Windows", "Motif", "CDE", "MotifPlus", "Platinum", +"SGI" and "Compact". Depending on the platform, "WindowsXP", +"Aqua" or "Macintosh" may be available. + +


      Member Function Documentation

      +

      TQStyle * TQStyleFactory::create ( const TQString & key ) [static] +

      +Creates a TQStyle object that matches key case-insensitively. +This is either a built-in style, or a style from a style plugin. +

      See also keys(). + +

      Example: themes/wood.cpp. +

      TQStringList TQStyleFactory::keys () [static] +

      +Returns the list of keys this factory can create styles for. +

      See also create(). + +

      Example: themes/themes.cpp. + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyleoption-members.html b/doc/html/tqstyleoption-members.html new file mode 100644 index 00000000..8d59507b --- /dev/null +++ b/doc/html/tqstyleoption-members.html @@ -0,0 +1,64 @@ + + + + + +TQStyleOption Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStyleOption

      + +

      This is the complete list of member functions for +TQStyleOption, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyleoption.html b/doc/html/tqstyleoption.html new file mode 100644 index 00000000..9a952094 --- /dev/null +++ b/doc/html/tqstyleoption.html @@ -0,0 +1,297 @@ + + + + + +TQStyleOption Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStyleOption Class Reference

      + +

      The TQStyleOption class specifies optional parameters for TQStyle functions. +More... +

      #include <tqstyle.h> +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQStyleOption class specifies optional parameters for TQStyle functions. + +

      Some TQStyle functions take an optional argument specifying extra +information that is required for a paritical primitive or control. +So that the TQStyle class can be extended, TQStyleOption is used to +provide a variable-argument for these options. +

      The TQStyleOption class has constructors for each type of optional +argument, and this set of constructors may be extended in future +TQt releases. There are also corresponding access functions that +return the optional arguments: these too may be extended. +

      For each constructor, you should refer to the documentation of the +TQStyle functions to see the meaning of the arguments. +

      When calling TQStyle functions from your own widgets, you must only +pass the default TQStyleOption or the argument that TQStyle is +documented to accept. For example, if the function expects +TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *) +leaves the optional integer argument uninitialized. +

      When subclassing TQStyle, you must similarly only expect the +default or documented arguments. The other arguments will have +uninitialized values. +

      If you make your own TQStyle subclasses and your own widgets, you +can make a subclass of TQStyleOption to pass additional arguments +to your TQStyle subclass. You will need to cast the "const +TQStyleOption&" argument to your subclass, so be sure your style +has been called from your widget. +

      See also Widget Appearance and Style. + +


      Member Type Documentation

      +

      TQStyleOption::StyleOptionDefault

      + +

      This enum value can be passed as the optional argument to any +TQStyle function. +

        +
      • TQStyleOption::Default +
      +

      Member Function Documentation

      +

      TQStyleOption::TQStyleOption ( StyleOptionDefault = Default ) +

      + +

      The default option. This can always be passed as the optional +argument to TQStyle functions. + +

      TQStyleOption::TQStyleOption ( int in1 ) +

      + +

      Pass one integer, in1. For example, headerSection. + +

      TQStyleOption::TQStyleOption ( int in1, int in2 ) +

      + +

      Pass two integers, in1 and in2. For example, linewidth and +midlinewidth. + +

      TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 ) +

      + +

      Pass four integers, in1, in2, in3 and in4. + +

      TQStyleOption::TQStyleOption ( TQMenuItem * m ) +

      + +

      Pass a menu item, m. + +

      TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1 ) +

      + +

      Pass a menu item and an integer, m and in1. + +

      TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1, int in2 ) +

      + +

      Pass a menu item and two integers, m, in1 and in2. + +

      TQStyleOption::TQStyleOption ( const TQColor & c ) +

      + +

      Pass a color, c. + +

      TQStyleOption::TQStyleOption ( TQTab * t ) +

      + +

      Pass a TQTab, t. + +

      TQStyleOption::TQStyleOption ( TQListViewItem * i ) +

      + +

      Pass a TQListViewItem, i. + +

      TQStyleOption::TQStyleOption ( TQCheckListItem * i ) +

      + +

      Pass a TQCheckListItem, i. + +

      TQStyleOption::TQStyleOption ( TQt::ArrowType a ) +

      + +

      Pass an TQt::ArrowType, a. + +

      TQStyleOption::TQStyleOption ( const TQRect & r ) +

      + +

      Pass a TQRect, r. + +

      TQStyleOption::TQStyleOption ( TQWidget * w ) +

      + +

      Pass a TQWidget, w. + +

      TQt::ArrowType TQStyleOption::arrowType () const +

      + +

      Returns an arrow type if the appropriate constructor was called; +otherwise the return value is undefined. + +

      TQCheckListItem * TQStyleOption::checkListItem () const +

      + +

      Returns a check list item if the appropriate constructor was +called; otherwise the return value is undefined. + +

      const TQColor & TQStyleOption::color () const +

      + +

      Returns a color if the appropriate constructor was called; +otherwise the return value is undefined. + +

      int TQStyleOption::day () const +

      + +

      Returns the index of the day in the month if the appropriate +constructor was called; otherwise the return value is undefined. + +

      int TQStyleOption::frameShadow () const +

      + +

      Returns a TQFrame::Shadow value if the appropriate constructor was +called; otherwise the return value is undefined. + +

      int TQStyleOption::frameShape () const +

      + +

      Returns a TQFrame::Shape value if the appropriate constructor was +called; otherwise the return value is undefined. + +

      int TQStyleOption::headerSection () const +

      + +

      Returns the header section if the appropriate constructor was +called; otherwise the return value is undefined. + +

      bool TQStyleOption::isDefault () const +

      + +

      Returns TRUE if the option was constructed with the default +constructor; otherwise returns FALSE. + +

      int TQStyleOption::lineWidth () const +

      + +

      Returns the line width if the appropriate constructor was called; +otherwise the return value is undefined. + +

      TQListViewItem * TQStyleOption::listViewItem () const +

      + +

      Returns a TQListView item if the appropriate constructor was +called; otherwise the return value is undefined. + +

      int TQStyleOption::maxIconWidth () const +

      + +

      Returns the maximum width of the menu item check area if the +appropriate constructor was called; otherwise the return value is +undefined. + +

      TQMenuItem * TQStyleOption::menuItem () const +

      + +

      Returns a menu item if the appropriate constructor was called; +otherwise the return value is undefined. + +

      int TQStyleOption::midLineWidth () const +

      + +

      Returns the mid-line width if the appropriate constructor was +called; otherwise the return value is undefined. + +

      TQRect TQStyleOption::rect () const +

      + +

      Returns a rectangle if the appropriate constructor was called; +otherwise the return value is undefined. + +

      TQTab * TQStyleOption::tab () const +

      + +

      Returns a TQTabBar tab if the appropriate constructor was called; +otherwise the return value is undefined. + +

      int TQStyleOption::tabWidth () const +

      + +

      Returns the tab indent width if the appropriate constructor was +called; otherwise the return value is undefined. + +

      TQWidget * TQStyleOption::widget () const +

      + +

      Returns a pointer to a widget if the appropriate constructor was called; +otherwise the return value is undefined. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyleplugin-h.html b/doc/html/tqstyleplugin-h.html new file mode 100644 index 00000000..2dcd19c8 --- /dev/null +++ b/doc/html/tqstyleplugin-h.html @@ -0,0 +1,117 @@ + + + + + +tqstyleplugin.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqstyleplugin.h

      + +

      This is the verbatim text of the tqstyleplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +** $Id: qt/tqstyleplugin.h   3.3.8   edited Jan 11 14:46 $
      +**
      +** Definition of TQStylePlugin class
      +**
      +** Created : 010920
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the widgets module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSTYLEPLUGIN_H
      +#define TQSTYLEPLUGIN_H
      +
      +#ifndef QT_H
      +#include "ntqgplugin.h"
      +#include "tqstringlist.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_STYLE
      +#ifndef TQT_NO_COMPONENT
      +
      +class TQStyle;
      +class TQStylePluginPrivate;
      +
      +class TQ_EXPORT TQStylePlugin : public TQGPlugin
      +{
      +    TQ_OBJECT
      +public:
      +    TQStylePlugin();
      +    ~TQStylePlugin();
      +
      +    virtual TQStringList keys() const = 0;
      +    virtual TQStyle *create( const TQString &key ) = 0;
      +
      +private:
      +    TQStylePluginPrivate *d;
      +};
      +
      +#endif // TQT_NO_COMPONENT
      +#endif // TQT_NO_STYLE
      +
      +#endif // TQSTYLEPLUGIN_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyleplugin-members.html b/doc/html/tqstyleplugin-members.html new file mode 100644 index 00000000..c7118b01 --- /dev/null +++ b/doc/html/tqstyleplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQStylePlugin Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStylePlugin

      + +

      This is the complete list of member functions for +TQStylePlugin, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstyleplugin.html b/doc/html/tqstyleplugin.html new file mode 100644 index 00000000..98bb2f80 --- /dev/null +++ b/doc/html/tqstyleplugin.html @@ -0,0 +1,97 @@ + + + + + +TQStylePlugin Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStylePlugin Class Reference

      + +

      The TQStylePlugin class provides an abstract base for custom TQStyle plugins. +More... +

      #include <tqstyleplugin.h> +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQStylePlugin class provides an abstract base for custom TQStyle plugins. +

      +

      The style plugin is a simple plugin interface that makes it easy +to create custom styles that can be loaded dynamically into +applications with a TQStyleFactory. +

      Writing a style plugin is achieved by subclassing this base class, +reimplementing the pure virtual functions keys() and create(), and +exporting the class with the TQ_EXPORT_PLUGIN macro. See the +plugins documentation for an +example. +

      See also Plugins. + +


      Member Function Documentation

      +

      TQStylePlugin::TQStylePlugin () +

      +Constructs a style plugin. This is invoked automatically by the +TQ_EXPORT_PLUGIN macro. + +

      TQStylePlugin::~TQStylePlugin () +

      +Destroys the style plugin. +

      You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

      TQStyle * TQStylePlugin::create ( const TQString & key ) [pure virtual] +

      + +

      Creates and returns a TQStyle object for the style key key. The +style key is usually the class name of the required style. +

      See also keys(). + +

      TQStringList TQStylePlugin::keys () const [pure virtual] +

      + +

      Returns the list of style keys this plugin supports. +

      These keys are usually the class names of the custom styles that +are implemented in the plugin. +

      See also create(). + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylesheet-h.html b/doc/html/tqstylesheet-h.html new file mode 100644 index 00000000..a608c9d5 --- /dev/null +++ b/doc/html/tqstylesheet-h.html @@ -0,0 +1,298 @@ + + + + + +tqstylesheet.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqstylesheet.h

      + +

      This is the verbatim text of the tqstylesheet.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +** $Id: qt/tqstylesheet.h   3.3.8   edited Jan 11 14:38 $
      +**
      +** Definition of the TQStyleSheet class
      +**
      +** Created : 990101
      +**
      +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the kernel module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSTYLESHEET_H
      +#define TQSTYLESHEET_H
      +
      +#ifndef QT_H
      +#include "tqstring.h"
      +#include "tqvaluelist.h"
      +#include "tqptrvector.h"
      +#include "ntqdict.h"
      +#include "tqobject.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_RICHTEXT
      +
      +class TQStyleSheet;
      +class TQTextDocument;
      +template<class Key, class T> class TQMap;
      +class TQStyleSheetItemData;
      +
      +class TQ_EXPORT TQStyleSheetItem : public TQt
      +{
      +public:
      +    TQStyleSheetItem( TQStyleSheet* parent, const TQString& name );
      +    TQStyleSheetItem( const TQStyleSheetItem & );
      +    ~TQStyleSheetItem();
      +
      +    TQStyleSheetItem& operator=( const TQStyleSheetItem& other );
      +
      +    TQString name() const;
      +
      +    TQStyleSheet* styleSheet();
      +    const TQStyleSheet* styleSheet() const;
      +
      +    enum AdditionalStyleValues { Undefined  = - 1};
      +
      +    enum DisplayMode {
      +	DisplayBlock,
      +	DisplayInline,
      +	DisplayListItem,
      +	DisplayNone
      +#ifndef Q_QDOC
      +	, DisplayModeUndefined = -1
      +#endif
      +    };
      +
      +    DisplayMode displayMode() const;
      +    void setDisplayMode(DisplayMode m);
      +
      +    int alignment() const;
      +    void setAlignment( int f);
      +
      +    enum VerticalAlignment {
      +	VAlignBaseline,
      +	VAlignSub,
      +	VAlignSuper
      +    };
      +
      +    VerticalAlignment verticalAlignment() const;
      +    void setVerticalAlignment( VerticalAlignment valign );
      +
      +    int fontWeight() const;
      +    void setFontWeight(int w);
      +
      +    int logicalFontSize() const;
      +    void setLogicalFontSize(int s);
      +
      +    int logicalFontSizeStep() const;
      +    void setLogicalFontSizeStep( int s );
      +
      +    int fontSize() const;
      +    void setFontSize(int s);
      +
      +    TQString fontFamily() const;
      +    void setFontFamily( const TQString& );
      +
      +    int numberOfColumns() const;
      +    void setNumberOfColumns(int ncols);
      +
      +    TQColor color() const;
      +    void setColor( const TQColor &);
      +
      +    bool fontItalic() const;
      +    void setFontItalic( bool );
      +    bool definesFontItalic() const;
      +
      +    bool fontUnderline() const;
      +    void setFontUnderline( bool );
      +    bool definesFontUnderline() const;
      +
      +    bool fontStrikeOut() const;
      +    void setFontStrikeOut( bool );
      +    bool definesFontStrikeOut() const;
      +
      +    bool isAnchor() const;
      +    void setAnchor(bool anc);
      +
      +    enum WhiteSpaceMode {
      +	WhiteSpaceNormal,
      +	WhiteSpacePre,
      +	WhiteSpaceNoWrap
      +#ifndef Q_QDOC
      +	, WhiteSpaceModeUndefined = -1
      +#endif
      +    };
      +    WhiteSpaceMode whiteSpaceMode() const;
      +    void setWhiteSpaceMode(WhiteSpaceMode m);
      +
      +    enum Margin {
      +	MarginLeft,
      +	MarginRight,
      +	MarginTop,
      +	MarginBottom,
      +	MarginFirstLine,
      +	MarginAll,
      +	MarginVertical,
      +	MarginHorizontal
      +#ifndef Q_QDOC
      +	, MarginUndefined = -1
      +#endif
      +    };
      +
      +    int margin( Margin m) const;
      +    void setMargin( Margin, int);
      +
      +    enum ListStyle {
      +	ListDisc,
      +	ListCircle,
      +	ListSquare,
      +	ListDecimal,
      +	ListLowerAlpha,
      +	ListUpperAlpha
      +#ifndef Q_QDOC
      +	, ListStyleUndefined = -1
      +#endif
      +    };
      +
      +    ListStyle listStyle() const;
      +    void setListStyle( ListStyle );
      +
      +    TQString contexts() const;
      +    void setContexts( const TQString& );
      +    bool allowedInContext( const TQStyleSheetItem* ) const;
      +
      +    bool selfNesting() const;
      +    void setSelfNesting( bool );
      +
      +    void setLineSpacing( int ls );
      +    int lineSpacing() const;
      +
      +private:
      +    void init();
      +    TQStyleSheetItemData* d;
      +};
      +
      +
      +#if defined(Q_TEMPLATEDLL)
      +// MOC_SKIP_BEGIN
      +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict<TQStyleSheetItem>;
      +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector<TQStyleSheetItem> >;
      +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector<TQStyleSheetItem>;
      +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList<TQStyleSheetItem::ListStyle>;
      +// MOC_SKIP_END
      +#endif
      +
      +#ifndef TQT_NO_TEXTCUSTOMITEM
      +class TQTextCustomItem;
      +#endif
      +
      +class TQ_EXPORT TQStyleSheet : public TQObject
      +{
      +    TQ_OBJECT
      +public:
      +    TQStyleSheet( TQObject *parent=0, const char *name=0 );
      +    virtual ~TQStyleSheet();
      +
      +    static TQStyleSheet* defaultSheet();
      +    static void setDefaultSheet( TQStyleSheet* );
      +
      +
      +    TQStyleSheetItem* item( const TQString& name);
      +    const TQStyleSheetItem* item( const TQString& name) const;
      +
      +    void insert( TQStyleSheetItem* item);
      +
      +#ifndef TQT_NO_TEXTCUSTOMITEM
      +    virtual TQTextCustomItem* tag( const TQString& name,
      +				  const TQMap<TQString, TQString> &attr,
      +				  const TQString& context,
      +				  const TQMimeSourceFactory& factory,
      +				  bool emptyTag, TQTextDocument *doc ) const;
      +#endif
      +    static TQString escape( const TQString& );
      +    static TQString convertFromPlainText( const TQString&,
      +					 TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre );
      +    static bool mightBeRichText( const TQString& );
      +
      +    virtual void scaleFont( TQFont& font, int logicalSize ) const;
      +
      +    virtual void error( const TQString& ) const;
      +
      +private:
      +    void init();
      +    TQDict<TQStyleSheetItem> styles;
      +    TQStyleSheetItem* nullstyle;
      +private:	// Disabled copy constructor and operator=
      +#if defined(TQ_DISABLE_COPY)
      +    TQStyleSheet( const TQStyleSheet & );
      +    TQStyleSheet &operator=( const TQStyleSheet & );
      +#endif
      +};
      +
      +#endif // TQT_NO_RICHTEXT
      +
      +#endif // TQSTYLESHEET_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylesheet-members.html b/doc/html/tqstylesheet-members.html new file mode 100644 index 00000000..e5a86aa8 --- /dev/null +++ b/doc/html/tqstylesheet-members.html @@ -0,0 +1,99 @@ + + + + + +TQStyleSheet Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStyleSheet

      + +

      This is the complete list of member functions for +TQStyleSheet, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylesheet.html b/doc/html/tqstylesheet.html new file mode 100644 index 00000000..79b97e21 --- /dev/null +++ b/doc/html/tqstylesheet.html @@ -0,0 +1,383 @@ + + + + + +TQStyleSheet Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStyleSheet Class Reference

      + +

      The TQStyleSheet class is a collection of styles for rich text +rendering and a generator of tags. +More... +

      #include <tqstylesheet.h> +

      Inherits TQObject. +

      List of all member functions. +

      Public Members

      +
        +
      • TQStyleSheet ( TQObject * parent = 0, const char * name = 0 )
      • +
      • virtual ~TQStyleSheet ()
      • +
      • TQStyleSheetItem * item ( const TQString & name )
      • +
      • const TQStyleSheetItem * item ( const TQString & name ) const
      • +
      • virtual TQTextCustomItem * tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const
      • +
      • virtual void scaleFont ( TQFont & font, int logicalSize ) const
      • +
      • virtual void error ( const TQString & msg ) const
      • +
      +

      Static Public Members

      + +

      Detailed Description

      + + + +The TQStyleSheet class is a collection of styles for rich text +rendering and a generator of tags. +

      + +

      By creating TQStyleSheetItem objects for a style sheet you build a +definition of a set of tags. This definition will be used by the +internal rich text rendering system to parse and display text +documents to which the style sheet applies. Rich text is normally +visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, +TQWhatsThis and TQMessageBox also support it, and other classes are +likely to follow. With TQSimpleRichText it is possible to use the +rich text renderer for custom widgets as well. +

      The default TQStyleSheet object has the following style bindings, +sorted by structuring bindings, anchors, character style bindings +(i.e. inline styles), special elements such as horizontal lines or +images, and other tags. In addition, rich text supports simple +HTML tables. +

      The structuring tags are +

      +
      Structuring tags Notes +
      <qt>...</qt> +A TQt rich text document. It understands the following +attributes: +
        +
      • title -- The caption of the document. This attribute is +easily accessible with TQTextEdit::documentTitle(). +
      • type -- The type of the document. The default type is page. It indicates that the document is displayed in a +page of its own. Another style is detail, which can be +used to explain certain expressions in more detail in a +few sentences. For detail, TQTextBrowser will then keep +the current page and display the new document in a small +popup similar to TQWhatsThis. Note that links will not work +in documents with <qt type="detail">...</qt>. +
      • bgcolor -- The background color, for example bgcolor="yellow" or bgcolor="#0000FF". +
      • background -- The background pixmap, for example background="granite.xpm". The pixmap name will be resolved +by a TQMimeSourceFactory(). +
      • text -- The default text color, for example text="red". +
      • link -- The link color, for example link="green". +
      +
      <h1>...</h1> +A top-level heading. +
      <h2>...</h2> +A sublevel heading. +
      <h3>...</h3> +A sub-sublevel heading. +
      <h4>...</h4> <h5>...</h5> +Headings of lesser importance. +
      <p>...</p> +A left-aligned paragraph. Adjust the alignment with the align attribute. Possible values are left, right and +center. +
      <center>...
      </center> +
      A centered paragraph. +
      <blockquote>...
      </blockquote> +
      An indented paragraph that is useful for quotes. +
      <ul>...</ul> +An unordered list. You can also pass a type argument to +define the bullet style. The default is type=disc; +other types are circle and square. +
      <ol>...</ol> +An ordered list. You can also pass a type argument to +define the enumeration label style. The default is type="1"; other types are "a" and "A". +
      <li>...</li> +A list item. This tag can be used only within the context +of <ol> or <ul>. +
      <dl>...</dl> +A list of definitions, consisting of terms and descriptions. +
      <dt>...</dt> +A term in a list of definitions. This tag can be used only +in the context of <dl>...</dl>. +
      <dd>...</dd> +A description in a list of definitions. This tag can be +used only in the context of <dl>...</dl>. +
      <pre>...</pre> +For larger chunks of code. Whitespaces in the contents are +preserved. For small bits of code use the inline-style code. +
      <div>...</div> and <span>...</span> +Block grouping elements. These are used to structure the +document, and are often used to provide hints about the +intended presentation of the document. +
      +

      Anchors and links are done with a single tag: +

      +
      Anchor tags Notes +
      <a>...</a> +An anchor or link. +
        +
      • A link is created by using an href +attribute, for example +
        <a href="target.qml">Link Text</a>. Links to +targets within a document are achieved in the same way +as for HTML, e.g. +
        <a href="target.qml#subtitle">Link Text</a>. +
      • A target is created by using a name +attribute, for example +
        <a name="subtitle"><h2>Sub Title</h2></a>. +
      +
      +

      The default character style bindings are +

      +
      Style tags Notes +
      <em>...</em> +Emphasized. By default this is the same as <i>...</i> +(italic). +
      <strong>...</strong> +Strong. By default this is the same as <b>...</b> +(bold). +
      <i>...</i> +Italic font style. +
      <b>...</b> +Bold font style. +
      <u>...</u> +Underlined font style. +
      <s>...</s> +Strike out font style. +
      <big>...</big> +A larger font size. +
      <small>...</small> +A smaller font size. +
      <sub>...</sub> +Subscripted text +
      <sup>...</sup> +Superscripted text +
      <code>...</code> +Indicates code. By default this is the same as +<tt>...</tt> (typewriter). For larger chunks of code +use the block-tag <pre>. +
      <tt>...</tt> +Typewriter font style. +
      <font>...</font> +Customizes the font size, family and text color. The tag +understands the following attributes: +
        +
      • color -- The text color, for example color="red" or +color="#FF0000". +
      • size -- The logical size of the font. Logical sizes 1 +to 7 are supported. The value may either be absolute +(for example, size=3) or relative (size=-2). In +the latter case the sizes are simply added. +
      • face -- The family of the font, for example face=times. +
      +
      +

      Special elements are: +

      +
      Special tags Notes +
      <img> +An image. The image name for the mime source factory is +given in the source attribute, for example +<img src="qt.xpm"> The image tag also understands the +attributes width and height that determine the size +of the image. If the pixmap does not fit the specified +size it will be scaled automatically (by using +TQImage::smoothScale()). +
      +The align attribute determines where the image is +placed. By default, an image is placed inline just like a +normal character. Specify left or right to place the +image at the respective side. +
      <hr> +A horizontal line. +
      <br> +A line break. +
      <nobr>...</nobr> +No break. Prevents word wrap. +
      +

      In addition, rich text supports simple HTML tables. A table +consists of one or more rows each of which contains one or more +cells. Cells are either data cells or header cells, depending on +their content. Cells which span rows and columns are supported. +

      +
      Table tags Notes +
      <table>...</table> +A table. Tables support the following attributes: +
        +
      • bgcolor -- The background color. +
      • width -- The table width. This is either an absolute +pixel width or a relative percentage of the table's +width, for example width=80%. +
      • border -- The width of the table border. The default is +0 (= no border). +
      • cellspacing -- Additional space around the table cells. +The default is 2. +
      • cellpadding -- Additional space around the contents of +table cells. The default is 1. +
      +
      <tr>...</tr> +A table row. This is only valid within a table. Rows +support the following attribute: +
        +
      • bgcolor -- The background color. +
      +
      <th>...</th> +A table header cell. Similar to td, but defaults to +center alignment and a bold font. +
      <td>...</td> +A table data cell. This is only valid within a tr. +Cells support the following attributes: +
        +
      • bgcolor -- The background color. +
      • width -- The cell width. This is either an absolute +pixel width or a relative percentage of table's width, +for example width=50%. +
      • colspan -- Specifies how many columns this cell spans. +The default is 1. +
      • rowspan -- Specifies how many rows this cell spans. The +default is 1. +
      • align -- Alignment; possible values are left, right, and center. The default is left. +
      • valign -- Vertical alignment; possible values are top, middle, and bottom. The default is middle. +
      +
      +

      See also Graphics Classes, Help System, and Text Related Classes. + +


      Member Function Documentation

      +

      TQStyleSheet::TQStyleSheet ( TQObject * parent = 0, const char * name = 0 ) +

      +Creates a style sheet called name, with parent parent. Like +any TQObject it will be deleted when its parent is destroyed (if +the child still exists). +

      By default the style sheet has the tag definitions defined above. + +

      TQStyleSheet::~TQStyleSheet () [virtual] +

      +Destroys the style sheet. All styles inserted into the style sheet +will be deleted. + +

      TQString TQStyleSheet::convertFromPlainText ( const TQString & plain, TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre ) [static] +

      Auxiliary function. Converts the plain text string plain to a +rich text formatted paragraph while preserving most of its look. +

      mode defines the whitespace mode. Possible values are TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces +preserved) and TQStyleSheetItem::WhiteSpaceNormal (wrapping, +simplified whitespaces). +

      See also escape(). + +

      Examples: action/application.cpp, application/application.cpp, and mdi/application.cpp. +

      TQStyleSheet * TQStyleSheet::defaultSheet () [static] +

      +Returns the application-wide default style sheet. This style sheet +is used by rich text rendering classes such as TQSimpleRichText, +TQWhatsThis and TQMessageBox to define the rendering style and +available tags within rich text documents. It also serves as the +initial style sheet for the more complex render widgets, TQTextEdit +and TQTextBrowser. +

      See also setDefaultSheet(). + +

      void TQStyleSheet::error ( const TQString & msg ) const [virtual] +

      + +

      This virtual function is called when an error occurs when +processing rich text. Reimplement it if you need to catch error +messages. +

      Errors might occur if some rich text strings contain tags that are +not understood by the stylesheet, if some tags are nested +incorrectly, or if tags are not closed properly. +

      msg is the error message. + +

      TQString TQStyleSheet::escape ( const TQString & plain ) [static] +

      +Auxiliary function. Converts the plain text string plain to a +rich text formatted string with any HTML meta-characters escaped. +

      See also convertFromPlainText(). + +

      TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) +

      +Returns the style called name or 0 if there is no such style. + +

      const TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the style called name or 0 if there is no such style +(const version) + +

      bool TQStyleSheet::mightBeRichText ( const TQString & text ) [static] +

      +Returns TRUE if the string text is likely to be rich text; +otherwise returns FALSE. +

      This function uses a fast and therefore simple heuristic. It +mainly checks whether there is something that looks like a tag +before the first line break. Although the result may be correct +for common cases, there is no guarantee. + +

      void TQStyleSheet::scaleFont ( TQFont & font, int logicalSize ) const [virtual] +

      +Scales the font font to the appropriate physical point size +corresponding to the logical font size logicalSize. +

      When calling this function, font has a point size corresponding +to the logical font size 3. +

      Logical font sizes range from 1 to 7, with 1 being the smallest. +

      See also TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), and TQFont::setPointSize(). + +

      void TQStyleSheet::setDefaultSheet ( TQStyleSheet * sheet ) [static] +

      +Sets the application-wide default style sheet to sheet, +deleting any style sheet previously set. The ownership is +transferred to TQStyleSheet. +

      See also defaultSheet(). + +

      TQTextCustomItem * TQStyleSheet::tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const [virtual] +

      +

      This function is under development and is subject to change. +

      Generates an internal object for the tag called name, given the +attributes attr, and using additional information provided by +the mime source factory factory. +

      context is the optional context of the document, i.e. the path +to look for relative links. This becomes important if the text +contains relative references, for example within image tags. +TQSimpleRichText always uses the default mime source factory (see +TQMimeSourceFactory::defaultFactory()) to resolve these +references. The context will then be used to calculate the +absolute path. See TQMimeSourceFactory::makeAbsolute() for details. +

      emptyTag and doc are for internal use only. +

      This function should not be used in application code. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylesheetitem-members.html b/doc/html/tqstylesheetitem-members.html new file mode 100644 index 00000000..d040bd44 --- /dev/null +++ b/doc/html/tqstylesheetitem-members.html @@ -0,0 +1,94 @@ + + + + + +TQStyleSheetItem Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQStyleSheetItem

      + +

      This is the complete list of member functions for +TQStyleSheetItem, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqstylesheetitem.html b/doc/html/tqstylesheetitem.html new file mode 100644 index 00000000..f502f36e --- /dev/null +++ b/doc/html/tqstylesheetitem.html @@ -0,0 +1,491 @@ + + + + + +TQStyleSheetItem Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQStyleSheetItem Class Reference

      + +

      The TQStyleSheetItem class provides an encapsulation of a set of text styles. +More... +

      #include <tqstylesheet.h> +

      Inherits TQt. +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQStyleSheetItem class provides an encapsulation of a set of text styles. +

      +

      A style sheet item consists of a name and a set of attributes that +specifiy its font, color, etc. When used in a style sheet (see styleSheet()), items define the name() of +a rich text tag and the display property changes associated with +it. +

      The display mode +attribute indicates whether the item is a block, an inline element +or a list element; see setDisplayMode(). The treatment of +whitespace is controlled by the white space mode; see +setWhiteSpaceMode(). An item's margins are set with setMargin(), +In the case of list items, the list style is set with +setListStyle(). An item may be a hypertext link anchor; see +setAnchor(). Other attributes are set with setAlignment(), +setVerticalAlignment(), setFontFamily(), setFontSize(), +setFontWeight(), setFontItalic(), setFontUnderline(), +setFontStrikeOut and setColor(). +

      See also Text Related Classes. + +


      Member Type Documentation

      +

      TQStyleSheetItem::DisplayMode

      + +

      This enum type defines the way adjacent elements are displayed. +

        +
      • TQStyleSheetItem::DisplayBlock - elements are displayed as a rectangular block +(e.g. <p>...</p>). +
      • TQStyleSheetItem::DisplayInline - elements are displayed in a horizontally +flowing sequence (e.g. <em>...</em>). +
      • TQStyleSheetItem::DisplayListItem - elements are displayed in a vertical +sequence (e.g. <li>...</li>). +
      • TQStyleSheetItem::DisplayNone - elements are not displayed at all. +
      +

      TQStyleSheetItem::ListStyle

      + +

      This enum type defines how the items in a list are prefixed when +displayed. +

        +
      • TQStyleSheetItem::ListDisc - a filled circle (i.e. a bullet) +
      • TQStyleSheetItem::ListCircle - an unfilled circle +
      • TQStyleSheetItem::ListSquare - a filled square +
      • TQStyleSheetItem::ListDecimal - an integer in base 10: 1, 2, 3, ... +
      • TQStyleSheetItem::ListLowerAlpha - a lowercase letter: a, b, c, ... +
      • TQStyleSheetItem::ListUpperAlpha - an uppercase letter: A, B, C, ... +
      +

      TQStyleSheetItem::Margin

      + +
        +
      • TQStyleSheetItem::MarginLeft - left margin +
      • TQStyleSheetItem::MarginRight - right margin +
      • TQStyleSheetItem::MarginTop - top margin +
      • TQStyleSheetItem::MarginBottom - bottom margin +
      • TQStyleSheetItem::MarginAll - all margins (left, right, top and bottom) +
      • TQStyleSheetItem::MarginVertical - top and bottom margins +
      • TQStyleSheetItem::MarginHorizontal - left and right margins +
      • TQStyleSheetItem::MarginFirstLine - margin (indentation) of the first line of +a paragarph (in addition to the MarginLeft of the paragraph) +
      +

      TQStyleSheetItem::VerticalAlignment

      + +

      This enum type defines the way elements are aligned vertically. +This is only supported for text elements. +

        +
      • TQStyleSheetItem::VAlignBaseline - align the baseline of the element (or the +bottom, if the element doesn't have a baseline) with the +baseline of the parent +
      • TQStyleSheetItem::VAlignSub - subscript the element +
      • TQStyleSheetItem::VAlignSuper - superscript the element +

      +

      TQStyleSheetItem::WhiteSpaceMode

      + +

      This enum defines the ways in which TQStyleSheet can treat +whitespace. +

        +
      • TQStyleSheetItem::WhiteSpaceNormal - any sequence of whitespace (including +line-breaks) is equivalent to a single space. +
      • TQStyleSheetItem::WhiteSpacePre - whitespace must be output exactly as given +in the input. +
      • TQStyleSheetItem::WhiteSpaceNoWrap - multiple spaces are collapsed as with +WhiteSpaceNormal, but no automatic line-breaks occur. To break +lines manually, use the <br> tag. +

      +


      Member Function Documentation

      +

      TQStyleSheetItem::TQStyleSheetItem ( TQStyleSheet * parent, const TQString & name ) +

      +Constructs a new style called name for the stylesheet parent. +

      All properties in TQStyleSheetItem are initially in the "do not +change" state, except display + mode, which defaults to DisplayInline. + +

      TQStyleSheetItem::TQStyleSheetItem ( const TQStyleSheetItem & other ) +

      +Copy constructor. Constructs a copy of other that is not bound +to any style sheet. + +

      TQStyleSheetItem::~TQStyleSheetItem () +

      +Destroys the style. Note that TQStyleSheetItem objects become +owned by TQStyleSheet when they are created. + +

      int TQStyleSheetItem::alignment () const +

      +Returns the alignment of this style. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify. +

      See also setAlignment() and TQt::AlignmentFlags. + +

      bool TQStyleSheetItem::allowedInContext ( const TQStyleSheetItem * s ) const +

      +Returns TRUE if this style can be nested into an element of style +s; otherwise returns FALSE. +

      See also contexts() and setContexts(). + +

      TQColor TQStyleSheetItem::color () const +

      +Returns the text color of this style or an invalid color if no +color has been set. +

      See also setColor() and TQColor::isValid(). + +

      TQString TQStyleSheetItem::contexts () const +

      +Returns a space-separated list of names of styles that may contain +elements of this style. If nothing has been set, contexts() +returns an empty string, which indicates that this style can be +nested everywhere. +

      See also setContexts(). + +

      bool TQStyleSheetItem::definesFontItalic () const +

      +Returns TRUE if the style defines a font shape; otherwise returns +FALSE. A style does not define any shape until setFontItalic() is +called. +

      See also setFontItalic() and fontItalic(). + +

      bool TQStyleSheetItem::definesFontStrikeOut () const +

      +Returns TRUE if the style defines a setting for the strikeOut +property of the font; otherwise returns FALSE. A style does not +define this until setFontStrikeOut() is called. +

      See also setFontStrikeOut() and fontStrikeOut(). + +

      bool TQStyleSheetItem::definesFontUnderline () const +

      +Returns TRUE if the style defines a setting for the underline +property of the font; otherwise returns FALSE. A style does not +define this until setFontUnderline() is called. +

      See also setFontUnderline() and fontUnderline(). + +

      DisplayMode TQStyleSheetItem::displayMode () const +

      +Returns the display + mode of the style. +

      See also setDisplayMode(). + +

      TQString TQStyleSheetItem::fontFamily () const +

      +Returns the font family setting of the style. This is either a +valid font family or TQString::null if no family has been set. +

      See also setFontFamily(), TQFont::family(), and TQFont::setFamily(). + +

      bool TQStyleSheetItem::fontItalic () const +

      +Returns TRUE if the style sets an italic font; otherwise returns +FALSE. +

      See also setFontItalic() and definesFontItalic(). + +

      int TQStyleSheetItem::fontSize () const +

      +Returns the font size setting of the style. This is either a valid +point size or TQStyleSheetItem::Undefined. +

      See also setFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

      bool TQStyleSheetItem::fontStrikeOut () const +

      +Returns TRUE if the style sets a strike out font; otherwise +returns FALSE. +

      See also setFontStrikeOut() and definesFontStrikeOut(). + +

      bool TQStyleSheetItem::fontUnderline () const +

      +Returns TRUE if the style sets an underlined font; otherwise +returns FALSE. +

      See also setFontUnderline() and definesFontUnderline(). + +

      int TQStyleSheetItem::fontWeight () const +

      +Returns the font weight setting of the style. This is either a +valid TQFont::Weight or the value TQStyleSheetItem::Undefined. +

      See also setFontWeight() and TQFont. + +

      bool TQStyleSheetItem::isAnchor () const +

      +Returns whether this style is an anchor. +

      See also setAnchor(). + +

      int TQStyleSheetItem::lineSpacing () const +

      +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      Returns the linespacing + +

      ListStyle TQStyleSheetItem::listStyle () const +

      +Returns the list style of the style. +

      See also setListStyle() and ListStyle. + +

      int TQStyleSheetItem::logicalFontSize () const +

      +Returns the logical font size setting of the style. This is either +a valid size between 1 and 7 or TQStyleSheetItem::Undefined. +

      See also setLogicalFontSize(), setLogicalFontSizeStep(), TQFont::pointSize(), and TQFont::setPointSize(). + +

      int TQStyleSheetItem::logicalFontSizeStep () const +

      +Returns the logical font size step of this style. +

      The default is 0. Tags such as big define +1; small +defines -1. +

      See also setLogicalFontSizeStep(). + +

      int TQStyleSheetItem::margin ( Margin m ) const +

      +Returns the width of margin m in pixels. +

      The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, or MarginFirstLine. +

      See also setMargin() and Margin. + +

      TQString TQStyleSheetItem::name () const +

      +Returns the name of the style item. + +

      int TQStyleSheetItem::numberOfColumns () const +

      This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      Returns the number of columns for this style. +

      See also setNumberOfColumns(), displayMode(), and setDisplayMode(). + +

      +

      TQStyleSheetItem & TQStyleSheetItem::operator= ( const TQStyleSheetItem & other ) +

      +Assignment. Assings a copy of other that is not bound to any style sheet. +Unbounds first from previous style sheet. + +

      bool TQStyleSheetItem::selfNesting () const +

      +Returns TRUE if this style has self-nesting enabled; otherwise +returns FALSE. +

      See also setSelfNesting(). + +

      void TQStyleSheetItem::setAlignment ( int f ) +

      +Sets the alignment to f. This only makes sense for styles with +a display mode of +DisplayBlock. Possible values are AlignAuto, AlignLeft, +AlignRight, AlignCenter or AlignJustify. +

      See also alignment(), displayMode(), and TQt::AlignmentFlags. + +

      void TQStyleSheetItem::setAnchor ( bool anc ) +

      +If anc is TRUE, sets this style to be an anchor (hypertext +link); otherwise sets it to not be an anchor. Elements in this +style link to other documents or anchors. +

      See also isAnchor(). + +

      void TQStyleSheetItem::setColor ( const TQColor & c ) +

      +Sets the text color of this style to c. +

      See also color(). + +

      void TQStyleSheetItem::setContexts ( const TQString & c ) +

      +Sets a space-separated list of names of styles that may contain +elements of this style. If c is empty, the style can be nested +everywhere. +

      See also contexts(). + +

      void TQStyleSheetItem::setDisplayMode ( DisplayMode m ) +

      +Sets the display mode of the style to m. +

      See also displayMode(). + +

      void TQStyleSheetItem::setFontFamily ( const TQString & fam ) +

      +Sets the font family setting of the style to fam. +

      See also fontFamily(), TQFont::family(), and TQFont::setFamily(). + +

      void TQStyleSheetItem::setFontItalic ( bool italic ) +

      +If italic is TRUE sets italic for the style; otherwise sets +upright. +

      See also fontItalic() and definesFontItalic(). + +

      void TQStyleSheetItem::setFontSize ( int s ) +

      +Sets the font size setting of the style to s points. +

      See also fontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

      void TQStyleSheetItem::setFontStrikeOut ( bool strikeOut ) +

      +If strikeOut is TRUE, sets strike out for the style; otherwise +sets no strike out. +

      See also fontStrikeOut() and definesFontStrikeOut(). + +

      void TQStyleSheetItem::setFontUnderline ( bool underline ) +

      +If underline is TRUE, sets underline for the style; otherwise +sets no underline. +

      See also fontUnderline() and definesFontUnderline(). + +

      void TQStyleSheetItem::setFontWeight ( int w ) +

      +Sets the font weight setting of the style to w. Valid values +are those defined by TQFont::Weight. +

      See also TQFont and fontWeight(). + +

      void TQStyleSheetItem::setListStyle ( ListStyle s ) +

      +Sets the list style of the style to s. +

      This is used by nested elements that have a display mode of DisplayListItem. +

      See also listStyle(), DisplayMode, and ListStyle. + +

      void TQStyleSheetItem::setLogicalFontSize ( int s ) +

      +Sets the logical font size setting of the style to s. Valid +logical sizes are 1 to 7. +

      See also logicalFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

      void TQStyleSheetItem::setLogicalFontSizeStep ( int s ) +

      +Sets the logical font size step of this style to s. +

      See also logicalFontSizeStep(). + +

      void TQStyleSheetItem::setMargin ( Margin m, int v ) +

      +Sets the width of margin m to v pixels. +

      The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, +MarginVertical or MarginHorizontal. The value v must +be >= 0. +

      See also margin(). + +

      void TQStyleSheetItem::setNumberOfColumns ( int ncols ) +

      This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      Sets the number of columns for this style. Elements in the style +are divided into columns. +

      This makes sense only if the style uses a block display mode +(see TQStyleSheetItem::DisplayMode). +

      See also numberOfColumns(). + +

      void TQStyleSheetItem::setSelfNesting ( bool nesting ) +

      +Sets the self-nesting property for this style to nesting. +

      In order to support "dirty" HTML, paragraphs <p> and list +items <li> are not self-nesting. This means that starting a +new paragraph or list item automatically closes the previous one. +

      See also selfNesting(). + +

      void TQStyleSheetItem::setVerticalAlignment ( VerticalAlignment valign ) +

      +Sets the vertical alignment to valign. Possible values are +VAlignBaseline, VAlignSub or VAlignSuper. +

      The vertical alignment property is not inherited. +

      See also verticalAlignment(). + +

      void TQStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m ) +

      +Sets the whitespace mode to m. +

      See also WhiteSpaceMode. + +

      TQStyleSheet * TQStyleSheetItem::styleSheet () +

      +Returns the style sheet this item is in. + +

      const TQStyleSheet * TQStyleSheetItem::styleSheet () const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the style sheet this item is in. + +

      VerticalAlignment TQStyleSheetItem::verticalAlignment () const +

      +Returns the vertical alignment of the style. Possible values are +VAlignBaseline, VAlignSub or VAlignSuper. +

      See also setVerticalAlignment(). + +

      WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode () const +

      +Returns the whitespace mode. +

      See also setWhiteSpaceMode() and WhiteSpaceMode. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqtextbrowser.html b/doc/html/tqtextbrowser.html index a1e37938..906f578c 100644 --- a/doc/html/tqtextbrowser.html +++ b/doc/html/tqtextbrowser.html @@ -109,7 +109,7 @@ This is to ensure that the factory is able to resolve the document names.

      TQTextBrowser interprets the tags it processes in accordance with the default style sheet. Change the style sheet with -setStyleSheet(); see TQStyleSheet for details. +setStyleSheet(); see TQStyleSheet for details.

      If you want to provide your users with editable rich text use TQTextEdit. If you want a text browser without hypertext navigation use TQTextEdit, and use TQTextEdit::setReadOnly() to disable diff --git a/doc/html/tqtextedit-h.html b/doc/html/tqtextedit-h.html index 94375129..87bb4f8f 100644 --- a/doc/html/tqtextedit-h.html +++ b/doc/html/tqtextedit-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "ntqscrollview.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "tqptrvector.h" #include "tqvaluelist.h" #include "tqptrlist.h" diff --git a/doc/html/tqtextedit.html b/doc/html/tqtextedit.html index fc28e21b..29d52d81 100644 --- a/doc/html/tqtextedit.html +++ b/doc/html/tqtextedit.html @@ -305,7 +305,7 @@ plain text and HTML files (a subset of HTML 3.2 and 4). The rendering style and the set of valid tags are defined by a styleSheet(). Custom tags can be created and placed in a custom style sheet. Change the style sheet with setStyleSheet(); see -TQStyleSheet for details. The images identified by image tags are +TQStyleSheet for details. The images identified by image tags are displayed if they can be interpreted using the text edit's TQMimeSourceFactory; see setMimeSourceFactory().

      If you want a text browser with more navigation use TQTextBrowser. @@ -449,15 +449,15 @@ custom tag, you could do the following:

           TQTextEdit * log = new TQTextEdit( this );
           log->setTextFormat( TQt::LogText );
      -    TQStyleSheetItem * item = new TQStyleSheetItem( log->styleSheet(), "mytag" );
      -    item->setColor( "red" );
      -    item->setFontWeight( TQFont::Bold );
      -    item->setFontUnderline( TRUE );
      +    TQStyleSheetItem * item = new TQStyleSheetItem( log->styleSheet(), "mytag" );
      +    item->setColor( "red" );
      +    item->setFontWeight( TQFont::Bold );
      +    item->setFontUnderline( TRUE );
           log->append( "This is a <mytag>custom tag</mytag>!" );
           
      Note that only the color, bold, underline and italic attributes of -a TQStyleSheetItem is used in LogText mode. +a TQStyleSheetItem is used in LogText mode.

      Note that you can use setMaxLogLines() to limit the number of lines the widget can hold in LogText mode.

      There are a few things that you need to be aware of when the @@ -1280,7 +1280,7 @@ inverted with invertText.

      This only works for selNum > 0. The default selection (selNum == 0) gets its attributes from the text edit's colorGroup(). -

      void TQTextEdit::setStyleSheet ( TQStyleSheet * styleSheet ) [virtual slot] +

      void TQTextEdit::setStyleSheet ( TQStyleSheet * styleSheet ) [virtual slot]

      Sets the stylesheet to use with this text edit to styleSheet. Changes will only take effect for new text added with setText() or @@ -1305,7 +1305,7 @@ context to context. Any previous text is removed. depending on the textFormat(). The default setting is AutoText, i.e. the text edit auto-detects the format from text.

      For rich text the rendering style and available tags are defined -by a styleSheet(); see TQStyleSheet for details. +by a styleSheet(); see TQStyleSheet for details.

      The optional context is a path which the text edit's TQMimeSourceFactory uses to resolve the locations of files and images. (See TQTextEdit::TQTextEdit().) It is passed to the text @@ -1343,9 +1343,9 @@ See the "wrapColumnOrWidth"

      void TQTextEdit::setWrapPolicy ( WrapPolicy policy ) [virtual slot]

      Sets the word wrap policy, at whitespace or anywhere to policy. See the "wrapPolicy" property for details. -

      TQStyleSheet * TQTextEdit::styleSheet () const +

      TQStyleSheet * TQTextEdit::styleSheet () const

      -Returns the TQStyleSheet which is being used by this text edit. +Returns the TQStyleSheet which is being used by this text edit.

      See also setStyleSheet().

      Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. @@ -1563,13 +1563,13 @@ verbatim, including spaces. Whenever a newline appears in the text the text edit inserts a hard line break and begins a new paragraph.

    • RichText - rich text rendering. The available styles are -defined in the default stylesheet TQStyleSheet::defaultSheet(). +defined in the default stylesheet TQStyleSheet::defaultSheet().
    • LogText - optimized mode for very large texts. Supports a very limited set of formatting tags (color, bold, underline and italic settings).
    • AutoText - this is the default. The text edit autodetects which rendering style is best, PlainText or RichText. This is done -by using the TQStyleSheet::mightBeRichText() function. +by using the TQStyleSheet::mightBeRichText() function.

    Set this property's value with setTextFormat() and get this property's value with textFormat(). diff --git a/doc/html/tqwidget.html b/doc/html/tqwidget.html index 291594fe..964ee839 100644 --- a/doc/html/tqwidget.html +++ b/doc/html/tqwidget.html @@ -2181,7 +2181,7 @@ This is an overloaded member function, provided for convenience. It behaves esse (height for width).

    See also TQSizePolicy::TQSizePolicy(). -

    void TQWidget::setStyle ( TQStyle * style ) +

    void TQWidget::setStyle ( TQStyle * style )

    Sets the widget's GUI style to style. Ownership of the style object is not transferred. @@ -2193,13 +2193,13 @@ widgets. purposes, where you want to show TQt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead. -

    See also style(), TQStyle, TQApplication::style(), and TQApplication::setStyle(). +

    See also style(), TQStyle, TQApplication::style(), and TQApplication::setStyle().

    Examples: grapher/grapher.cpp and progressbar/progressbar.cpp. -

    TQStyle * TQWidget::setStyle ( const TQString & style ) +

    TQStyle * TQWidget::setStyle ( const TQString & style )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    Sets the widget's GUI style to style using the TQStyleFactory. +

    Sets the widget's GUI style to style using the TQStyleFactory.

    void TQWidget::setTabOrder ( TQWidget * first, TQWidget * second ) [static]

    @@ -2353,12 +2353,12 @@ Places the widget under w in the parent widget's stack.

    To make this work, the widget itself and w must be siblings.

    See also raise() and lower(). -

    TQStyle & TQWidget::style () const +

    TQStyle & TQWidget::style () const

    Returns the GUI style for this widget

    See also TQWidget::setStyle(), TQApplication::setStyle(), and TQApplication::style(). -

    void TQWidget::styleChange ( TQStyle & oldStyle ) [virtual protected] +

    void TQWidget::styleChange ( TQStyle & oldStyle ) [virtual protected]

    This virtual function is called when the style of the widgets changes. oldStyle is the previous GUI style; you can get the diff --git a/doc/html/whatsthis b/doc/html/whatsthis index f50d3c36..45f01294 100644 --- a/doc/html/whatsthis +++ b/doc/html/whatsthis @@ -8,7 +8,7 @@ Abstract base for Qt/Embedded graphics driver plugins. | QGfxDriverPlugin Abstract base for Qt/Embedded keyboard driver plugins. | QKbdDriverPlugin Abstract base for Qt/Embedded mouse driver plugins. | QMouseDriverPlugin Abstract base for custom TQSqlDriver plugins. | TQSqlDriverPlugin -Abstract base for custom QStyle plugins. | QStylePlugin +Abstract base for custom TQStyle plugins. | TQStylePlugin Abstract base for custom TQTextCodec plugins. | TQTextCodecPlugin Abstract base for custom TQWidget plugins. | TQWidgetPlugin Abstract base for custom image format plugins. | TQImageFormatPlugin @@ -59,7 +59,7 @@ Checkboxes in QTables. | QCheckTableItem Clip region for a painter. | QRegion Clock time functions. | QTime Collection of nodes that can be accessed by name. | TQDomNamedNodeMap -Collection of styles for rich text rendering and a generator of tags. | QStyleSheet +Collection of styles for rich text rendering and a generator of tags. | TQStyleSheet Collects tool tips into related groups. | QToolTipGroup Color groups for each widget state. | QPalette Colors based on RGB or HSV values. | TQColor @@ -89,7 +89,7 @@ Conversion to and from visually ordered Hebrew. | QHebrewCodec Converts between numbers and their string representations in various languages. | QLocale Corner-grip for resizing a top-level window. | QSizeGrip Creates QScreen objects for Qt/Embedded. | QGfxDriverFactory -Creates QStyle objects. | QStyleFactory +Creates TQStyle objects. | TQStyleFactory Creates QWSKeyboardHandler objects for Qt/Embedded. | QKbdDriverFactory Creates QWSMouseHandler objects for Qt/Embedded. | QMouseDriverFactory Creates and manages data entry forms tied to SQL databases. | TQSqlForm @@ -128,7 +128,7 @@ Encapsulates a key sequence as used by accelerators. | QKeySequence Encapsulates a set of database field meta data. | TQSqlRecordInfo Encapsulates an OpenGL rendering context. | QGLContext Encapsulates the common Look and Feel of a GUI. | QCommonStyle -Encapsulation of a set of text styles. | QStyleSheetItem +Encapsulation of a set of text styles. | TQStyleSheetItem Enums and static functions relating to accessibility. | QAccessible Error message display dialog. | QErrorMessage Event parameters for child object events. | QChildEvent @@ -257,7 +257,7 @@ Namespace for miscellaneous identifiers that need to be global-like. | Qt Off-screen, pixel-based paint device. | QPixmap On-screen view of a TQCanvas. | TQCanvasView One-line text editor. | QLineEdit -Optional parameters for QStyle functions. | QStyleOption +Optional parameters for TQStyle functions. | TQStyleOption Organizes QButton widgets in a group. | QButtonGroup Organizes QButton widgets in a group with one horizontal row. | QHButtonGroup Organizes QButton widgets in a vertical column. | QVButtonGroup @@ -377,7 +377,7 @@ The basis of the Motif Extension. | QMotif The cell content for QTable cells. | QTableItem The display format of an OpenGL rendering context. | QGLFormat The input data for the TQXmlReader subclasses. | TQXmlInputSource -The look and feel of a GUI. | QStyle +The look and feel of a GUI. | TQStyle The main factory for plugin objects. | QNPlugin The representation of the DTD in the document tree. | TQDomDocumentType The structures in a QTabBar. | QTab diff --git a/doc/man/man3/tqaction.3qt b/doc/man/man3/tqaction.3qt index 1d6c29ff..9ca76d07 100644 --- a/doc/man/man3/tqaction.3qt +++ b/doc/man/man3/tqaction.3qt @@ -504,7 +504,7 @@ Set this property's value with setVisible() and get this property's value with i .SH "TQString whatsThis" This property holds the action's "What's This?" help text. .PP -The whats this text is used to provide a brief description of the action. The text may contain rich text (HTML-like tags -- see QStyleSheet for the list of supported tags). There is no default" What's This" text. +The whats this text is used to provide a brief description of the action. The text may contain rich text (HTML-like tags -- see TQStyleSheet for the list of supported tags). There is no default" What's This" text. .PP See also QWhatsThis. .PP diff --git a/doc/man/man3/tqapplication.3qt b/doc/man/man3/tqapplication.3qt index 37c4ea97..41f5c36f 100644 --- a/doc/man/man3/tqapplication.3qt +++ b/doc/man/man3/tqapplication.3qt @@ -193,13 +193,13 @@ Inherits TQObject. .SS "Static Public Members" .in +1c .ti -1c -.BI "QStyle & \fBstyle\fR ()" +.BI "TQStyle & \fBstyle\fR ()" .br .ti -1c -.BI "void \fBsetStyle\fR ( QStyle * style )" +.BI "void \fBsetStyle\fR ( TQStyle * style )" .br .ti -1c -.BI "QStyle * \fBsetStyle\fR ( const TQString & style )" +.BI "TQStyle * \fBsetStyle\fR ( const TQString & style )" .br .ti -1c .BI "int \fBcolorSpec\fR ()" @@ -434,7 +434,7 @@ It performs event handling, meaning that it receives events from the underlying It parses common command line arguments and sets its internal state accordingly. See the constructor documentation below for more details about this. .IP .TP -It defines the application's look and feel, which is encapsulated in a QStyle object. This can be changed at runtime with setStyle(). +It defines the application's look and feel, which is encapsulated in a TQStyle object. This can be changed at runtime with setStyle(). .IP .TP It specifies how the application is to allocate colors. See setColorSpec() for details. @@ -1084,7 +1084,7 @@ Usually widgets call this automatically when they are polished. It may be used t .PP Note that you are not limited to the public functions of TQWidget. Instead, based on meta information like TQObject::className() you are able to customize any kind of widget. .PP -See also QStyle::polish(), TQWidget::polish(), setPalette(), and setFont(). +See also TQStyle::polish(), TQWidget::polish(), setPalette(), and setFont(). .SH "void QApplication::postEvent ( TQObject * receiver, QEvent * event )\fC [static]\fR" \fBNote:\fR This function is thread-safe when TQt is built withthread support.

    Adds the event \fIevent\fR with the object \fIreceiver\fR as the receiver of the event, to an event queue and returns immediately. .PP @@ -1444,9 +1444,9 @@ Changes the default application palette to \fIpalette\fR. If \fIinformWidgets\fR .PP If \fIclassName\fR is passed, the change applies only to widgets that inherit \fIclassName\fR (as reported by TQObject::inherits()). If \fIclassName\fR is left 0, the change affects all widgets, thus overriding any previously set class specific palettes. .PP -The palette may be changed according to the current GUI style in QStyle::polish(). +The palette may be changed according to the current GUI style in TQStyle::polish(). .PP -See also TQWidget::palette, palette(), and QStyle::polish(). +See also TQWidget::palette, palette(), and TQStyle::polish(). .PP Examples: .)l i18n/main.cpp, themes/metal.cpp, themes/themes.cpp, and themes/wood.cpp. @@ -1464,7 +1464,7 @@ See also startDragDistance(). Sets the time after which a drag should start to \fIms\fR ms. .PP See also startDragTime(). -.SH "void QApplication::setStyle ( QStyle * style )\fC [static]\fR" +.SH "void QApplication::setStyle ( TQStyle * style )\fC [static]\fR" Sets the application's GUI style to \fIstyle\fR. Ownership of the style object is transferred to QApplication, so QApplication will delete the style object on application exit or when a new style is set. .PP Example usage: @@ -1477,19 +1477,19 @@ Example usage: .PP When switching application styles, the color palette is set back to the initial colors or the system defaults. This is necessary since certain styles have to adapt the color palette to be fully style-guide compliant. .PP -See also style(), QStyle, setPalette(), and desktopSettingsAware(). +See also style(), TQStyle, setPalette(), and desktopSettingsAware(). .PP Example: themes/themes.cpp. -.SH "QStyle * QApplication::setStyle ( const TQString & style )\fC [static]\fR" +.SH "TQStyle * QApplication::setStyle ( const TQString & style )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP -Requests a QStyle object for \fIstyle\fR from the QStyleFactory. +Requests a TQStyle object for \fIstyle\fR from the TQStyleFactory. .PP -The string must be one of the QStyleFactory::keys(), typically one of "windows", "motif", "cde", "motifplus", "platinum", "sgi" and" compact". Depending on the platform, "windowsxp", "aqua" or" macintosh" may be available. +The string must be one of the TQStyleFactory::keys(), typically one of "windows", "motif", "cde", "motifplus", "platinum", "sgi" and" compact". Depending on the platform, "windowsxp", "aqua" or" macintosh" may be available. .PP A later call to the QApplication constructor will override the requested style when a "-style" option is passed in as a commandline parameter. .PP -Returns 0 if an unknown \fIstyle\fR is passed, otherwise the QStyle object returned is set as the application's GUI style. +Returns 0 if an unknown \fIstyle\fR is passed, otherwise the TQStyle object returned is set as the application's GUI style. .SH "void QApplication::setWheelScrollLines ( int n )\fC [static]\fR" Sets the number of lines to scroll when the mouse wheel is rotated to \fIn\fR. .PP @@ -1536,10 +1536,10 @@ See also setStartDragTime() and startDragDistance(). Returns TRUE if an application object has not been created yet; otherwise returns FALSE. .PP See also closingDown(). -.SH "QStyle & QApplication::style ()\fC [static]\fR" +.SH "TQStyle & QApplication::style ()\fC [static]\fR" Returns the application's style object. .PP -See also setStyle() and QStyle. +See also setStyle() and TQStyle. .SH "void QApplication::syncX ()\fC [static]\fR" Synchronizes with the X server in the X11 implementation. This normally takes some time. Does nothing on other platforms. .PP diff --git a/doc/man/man3/tqcdestyle.3qt b/doc/man/man3/tqcdestyle.3qt index 877a911d..c101317a 100644 --- a/doc/man/man3/tqcdestyle.3qt +++ b/doc/man/man3/tqcdestyle.3qt @@ -27,7 +27,7 @@ The QCDEStyle class provides a CDE look and feel. .PP This style provides a slightly improved Motif look similar to some versions of the Common Desktop Environment (CDE). The main differences are thinner frames and more modern radio buttons and checkboxes. Together with a dark background and a bright text/foreground color, the style looks quite attractive (at least for Motif fans). .PP -Note that the functions provided by QCDEStyle are reimplementations of QStyle functions; see QStyle for their documentation. +Note that the functions provided by QCDEStyle are reimplementations of TQStyle functions; see TQStyle for their documentation. .PP See also Widget Appearance and Style. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqcommonstyle.3qt b/doc/man/man3/tqcommonstyle.3qt index 33ed312c..ad8f79e7 100644 --- a/doc/man/man3/tqcommonstyle.3qt +++ b/doc/man/man3/tqcommonstyle.3qt @@ -11,7 +11,7 @@ QCommonStyle \- Encapsulates the common Look and Feel of a GUI .SH SYNOPSIS \fC#include \fR .PP -Inherits QStyle. +Inherits TQStyle. .PP Inherited by QMotifStyle and QWindowsStyle. .PP @@ -26,7 +26,7 @@ The QCommonStyle class encapsulates the common Look and Feel of a GUI. .PP This abstract class implements some of the widget's look and feel that is common to all GUI styles provided and shipped as part of Qt. .PP -All the functions are documented in QStyle. +All the functions are documented in TQStyle. .PP See also Widget Appearance and Style. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqdict.3qt b/doc/man/man3/tqdict.3qt index ded30bab..f8856386 100644 --- a/doc/man/man3/tqdict.3qt +++ b/doc/man/man3/tqdict.3qt @@ -155,7 +155,7 @@ Example #2: .PP .nf .br - TQStringList styleList = QStyleFactory::styles(); + TQStringList styleList = TQStyleFactory::styles(); .br styleList.sort(); .br @@ -196,7 +196,7 @@ Example #2: } .br .fi -In the example we are using the dictionary to provide fast random access to the keys, and we don't care what the values are. The example is used to generate a menu of QStyles, each with a unique accelerator key (or no accelerator if there are no unused letters left). +In the example we are using the dictionary to provide fast random access to the keys, and we don't care what the values are. The example is used to generate a menu of TQStyles, each with a unique accelerator key (or no accelerator if there are no unused letters left). .PP We first obtain the list of available styles, then sort them so that the menu items will be ordered alphabetically. Next we create a dictionary of int pointers. The keys in the dictionary are each one character long, representing letters that have been used for accelerators. We iterate through our list of style names. If the first letter of the style name is in the dictionary, i.e. has been used, we iterate over all the characters in the style name to see if we can find a letter that hasn't been used. If we find an unused letter we put the accelerator ampersand (&) in front of it and add that letter to the dictionary. If we can't find an unused letter the style will simply have no accelerator. If the first letter of the style name is not in the dictionary we use it for the accelerator and add it to the dictionary. Finally we create a QAction for each style. .PP diff --git a/doc/man/man3/tqframe.3qt b/doc/man/man3/tqframe.3qt index 30dcce7b..1c326229 100644 --- a/doc/man/man3/tqframe.3qt +++ b/doc/man/man3/tqframe.3qt @@ -209,9 +209,9 @@ This enum type defines the shapes of a QFrame's frame. .TP \fCQFrame::MShape\fR - internal mask .PP -When it does not call QStyle, Shape interacts with QFrame::Shadow, the lineWidth() and the midLineWidth() to create the total result. See the picture of the frames in the class description. +When it does not call TQStyle, Shape interacts with QFrame::Shadow, the lineWidth() and the midLineWidth() to create the total result. See the picture of the frames in the class description. .PP -See also QFrame::Shadow, QFrame::style(), and QStyle::drawPrimitive(). +See also QFrame::Shadow, QFrame::style(), and TQStyle::drawPrimitive(). .SH MEMBER FUNCTION DOCUMENTATION .SH "QFrame::QFrame ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )" Constructs a frame widget with frame style NoFrame and a 1-pixel frame width. diff --git a/doc/man/man3/tqmacstyle.3qt b/doc/man/man3/tqmacstyle.3qt index 5bd3da5f..6a8c4707 100644 --- a/doc/man/man3/tqmacstyle.3qt +++ b/doc/man/man3/tqmacstyle.3qt @@ -46,15 +46,15 @@ Inherits QWindowsStyle. .SH DESCRIPTION The QMacStyle class implements an Appearance Manager style. .PP -This class is implemented as a wrapper to the Apple Appearance Manager. This allows your application to be styled by whatever theme your Macintosh is using. This is done by having primitives in QStyle implemented in terms of what the Macintosh would normally theme (i.e. the Finder). +This class is implemented as a wrapper to the Apple Appearance Manager. This allows your application to be styled by whatever theme your Macintosh is using. This is done by having primitives in TQStyle implemented in terms of what the Macintosh would normally theme (i.e. the Finder). .PP There are additional issues that should be taken into consideration to make an application compatible with the Aqua Style Guidelines. Some of these issues are outlined below. .IP .TP -Layout - The restrictions on window layout are such that some aspects of layout that are style-dependent cannot be achieved using QLayout. Changes are being considered (and feedback would be appreciated) to make layouts QStyle-able. Some of the restrictions involve horizontal and vertical widget alignment and widget size (covered below). +Layout - The restrictions on window layout are such that some aspects of layout that are style-dependent cannot be achieved using QLayout. Changes are being considered (and feedback would be appreciated) to make layouts TQStyle-able. Some of the restrictions involve horizontal and vertical widget alignment and widget size (covered below). .IP .TP -Widget size - Aqua allows widgets to have specific fixed sizes. TQt does not fully implement this behaviour so as to maintain multiplatform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the Appearance Manager).The TQWidget::sizeHint() will return the appropriate size for many managed widgets (widgets enumerated in QStyle::ContentsType). +Widget size - Aqua allows widgets to have specific fixed sizes. TQt does not fully implement this behaviour so as to maintain multiplatform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the Appearance Manager).The TQWidget::sizeHint() will return the appropriate size for many managed widgets (widgets enumerated in TQStyle::ContentsType). .IP .TP Effects - QMacStyle (in contrast to QAquaStyle) is not emulating (except where Appearance Manager does not provide certain capabilities), for example QPushButton pulsing effects. In this case a near matching emulation has been implemented, but naturally this will not be identical to the similar functionality built into the Appearance Manager. Please report any issues you see in effects or non-standard widgets. @@ -62,7 +62,7 @@ Effects - QMacStyle (in contrast to QAquaStyle) is not emulating (except where A .PP There are other issues that need to be considered in the feel of your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current with new advances and design suggestions for Mac OS X. .PP -Note that the functions provided by QMacStyle are reimplementations of QStyle functions; see QStyle for their documentation. +Note that the functions provided by QMacStyle are reimplementations of TQStyle functions; see TQStyle for their documentation. .PP See also Widget Appearance and Style. .SS "Member Type Documentation" diff --git a/doc/man/man3/tqmessagebox.3qt b/doc/man/man3/tqmessagebox.3qt index 7824db39..f7e0762e 100644 --- a/doc/man/man3/tqmessagebox.3qt +++ b/doc/man/man3/tqmessagebox.3qt @@ -214,7 +214,7 @@ warning() can be used to tell the user about unusual errors, or errors which can .br .fi .PP -The text part of all message box messages can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. See QStyleSheet::defaultSheet() for details. With certain strings that contain XML meta characters, the auto-rich text detection may fail, interpreting plain text incorrectly as rich text. In these rare cases, use QStyleSheet::convertFromPlainText() to convert your plain text string to a visually equivalent rich text string or set the text format explicitly with setTextFormat(). +The text part of all message box messages can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. See TQStyleSheet::defaultSheet() for details. With certain strings that contain XML meta characters, the auto-rich text detection may fail, interpreting plain text incorrectly as rich text. In these rare cases, use TQStyleSheet::convertFromPlainText() to convert your plain text string to a visually equivalent rich text string or set the text format explicitly with setTextFormat(). .PP Note that the Microsoft Windows User Interface Guidelines recommend using the application name as the window's caption. .PP diff --git a/doc/man/man3/tqmotifstyle.3qt b/doc/man/man3/tqmotifstyle.3qt index 3d085b07..3204a3e0 100644 --- a/doc/man/man3/tqmotifstyle.3qt +++ b/doc/man/man3/tqmotifstyle.3qt @@ -43,7 +43,7 @@ If \fIarg\fR is FALSE, the style will polish the application's color palette to .PP The effect will show up the next time an application palette is set via QApplication::setPalette(). The current color palette of the application remains unchanged. .PP -See also QStyle::polish(). +See also TQStyle::polish(). .SH "bool QMotifStyle::useHighlightColors () const" Returns TRUE if the style treats the highlight colors of the palette in a Motif-like manner, which is a simple inversion diff --git a/doc/man/man3/tqobject.3qt b/doc/man/man3/tqobject.3qt index c96785f3..a43f1d0d 100644 --- a/doc/man/man3/tqobject.3qt +++ b/doc/man/man3/tqobject.3qt @@ -15,7 +15,7 @@ All the functions in this class are reentrant when TQt is built with thread supp .PP Inherits Qt. .PP -Inherited by QAccel, QAccessibleObject, QAction, QApplication, QAssistantClient, QDataPump, QAxObject, QAxScript, QAxScriptManager, TQWidget, TQCanvas, QStyle, QClipboard, QCopChannel, QDns, QLayout, QDragObject, TQEditorFactory, QEventLoop, QFileIconProvider, QNetworkProtocol, QWSKeyboardHandler, QNetworkOperation, QNPInstance, TQObjectCleanupHandler, QProcess, QServerSocket, QSessionManager, QSignal, QSignalMapper, QSocket, QSocketNotifier, QSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, QStyleSheet, QTimer, QToolTipGroup, QTranslator, QUrlOperator, and QValidator. +Inherited by QAccel, QAccessibleObject, QAction, QApplication, QAssistantClient, QDataPump, QAxObject, QAxScript, QAxScriptManager, TQWidget, TQCanvas, TQStyle, QClipboard, QCopChannel, QDns, QLayout, QDragObject, TQEditorFactory, QEventLoop, QFileIconProvider, QNetworkProtocol, QWSKeyboardHandler, QNetworkOperation, QNPInstance, TQObjectCleanupHandler, QProcess, QServerSocket, QSessionManager, QSignal, QSignalMapper, QSocket, QSocketNotifier, QSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, QTimer, QToolTipGroup, QTranslator, QUrlOperator, and QValidator. .PP .SS "Public Members" .in +1c diff --git a/doc/man/man3/tqpainter.3qt b/doc/man/man3/tqpainter.3qt index 6b8005fb..c24562c0 100644 --- a/doc/man/man3/tqpainter.3qt +++ b/doc/man/man3/tqpainter.3qt @@ -1587,9 +1587,9 @@ The rectangle's interior is filled with the \fIfill\fR brush unless \fIfill\fR i .PP If you want to use a QFrame widget instead, you can make it display a plain rectangle, for example \fCQFrame::setFrameStyle( QFrame::Box | QFrame::Plain )\fR. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawShadeRect() and QStyle::drawPrimitive(). +See also qDrawShadeRect() and TQStyle::drawPrimitive(). .SH "void qDrawShadeLine ( QPainter * p, int x1, int y1, int x2, int y2, const QColorGroup & g, bool sunken, int lineWidth, int midLineWidth )" \fC#include \fR .PP @@ -1607,9 +1607,9 @@ The \fImidLineWidth\fR argument specifies the width of a middle line drawn in th .PP If you want to use a QFrame widget instead, you can make it display a shaded line, for example \fCQFrame::setFrameStyle( QFrame::HLine | QFrame::Sunken )\fR. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawShadeRect(), qDrawShadePanel(), and QStyle::drawPrimitive(). +See also qDrawShadeRect(), qDrawShadePanel(), and TQStyle::drawPrimitive(). .SH "void qDrawShadePanel ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken, int lineWidth, const QBrush * fill )" \fC#include \fR .PP @@ -1625,9 +1625,9 @@ The panel's interior is filled with the \fIfill\fR brush unless \fIfill\fR is 0. .PP If you want to use a QFrame widget instead, you can make it display a shaded panel, for example \fCQFrame::setFrameStyle( QFrame::Panel | QFrame::Sunken )\fR. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and QStyle::drawPrimitive(). +See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and TQStyle::drawPrimitive(). .SH "void qDrawShadeRect ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken, int lineWidth, int midLineWidth, const QBrush * fill )" \fC#include \fR .PP @@ -1645,9 +1645,9 @@ The rectangle's interior is filled with the \fIfill\fR brush unless \fIfill\fR i .PP If you want to use a QFrame widget instead, you can make it display a shaded rectangle, for example \fCQFrame::setFrameStyle( QFrame::Box | QFrame::Raised )\fR. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), QStyle::drawItem(), QStyle::drawControl(), and QStyle::drawComplexControl(). +See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), TQStyle::drawItem(), TQStyle::drawControl(), and TQStyle::drawComplexControl(). .SH "void qDrawWinButton ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken, const QBrush * fill )" \fC#include \fR .PP @@ -1661,9 +1661,9 @@ The line width is 2 pixels. .PP The button's interior is filled with the \fI*fill\fR brush unless \fIfill\fR is 0. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawWinPanel() and QStyle::drawControl(). +See also qDrawWinPanel() and TQStyle::drawControl(). .SH "void qDrawWinPanel ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken, const QBrush * fill )" \fC#include \fR .PP @@ -1679,9 +1679,9 @@ The button's interior is filled with the \fIfill\fR brush unless \fIfill\fR is 0 .PP If you want to use a QFrame widget instead, you can make it display a shaded panel, for example \fCQFrame::setFrameStyle( QFrame::WinPanel | QFrame::Raised )\fR. .PP -\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style. +\fBWarning:\fR This function does not look at TQWidget::style() or QApplication::style(). Use the drawing functions in TQStyle to make widgets that follow the current GUI style. .PP -See also qDrawShadePanel(), qDrawWinButton(), and QStyle::drawPrimitive(). +See also qDrawShadePanel(), qDrawWinButton(), and TQStyle::drawPrimitive(). .SH "SEE ALSO" .BR http://doc.trolltech.com/ntqpainter.html diff --git a/doc/man/man3/tqplatinumstyle.3qt b/doc/man/man3/tqplatinumstyle.3qt index b8b89a4c..9a935c94 100644 --- a/doc/man/man3/tqplatinumstyle.3qt +++ b/doc/man/man3/tqplatinumstyle.3qt @@ -31,7 +31,7 @@ Inherits QWindowsStyle. .SH DESCRIPTION The QPlatinumStyle class provides Mac/Platinum look and feel. .PP -This class implements the Platinum look and feel. It's an experimental class that tries to resemble a Macinosh-like GUI style with the QStyle system. The emulation is currently far from perfect. +This class implements the Platinum look and feel. It's an experimental class that tries to resemble a Macinosh-like GUI style with the TQStyle system. The emulation is currently far from perfect. .PP See also QAquaStyle and Widget Appearance and Style. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqpopupmenu.3qt b/doc/man/man3/tqpopupmenu.3qt index b51ca54a..82a6acab 100644 --- a/doc/man/man3/tqpopupmenu.3qt +++ b/doc/man/man3/tqpopupmenu.3qt @@ -335,7 +335,7 @@ Reimplemented from QFrame. .SH "void QPopupMenu::drawItem ( QPainter * p, int tab_, QMenuItem * mi, bool act, int x, int y, int w, int h )\fC [protected]\fR" Draws menu item \fImi\fR in the area \fIx\fR, \fIy\fR, \fIw\fR, \fIh\fR, using painter \fIp\fR. The item is drawn active if \fIact\fR is TRUE or drawn inactive if \fIact\fR is FALSE. The rightmost \fItab_\fR pixels are used for accelerator text. .PP -See also QStyle::drawControl(). +See also TQStyle::drawControl(). .SH "int QPopupMenu::exec ()" Executes this popup synchronously. .PP diff --git a/doc/man/man3/tqsgistyle.3qt b/doc/man/man3/tqsgistyle.3qt index 4eebaaf4..aa0b419c 100644 --- a/doc/man/man3/tqsgistyle.3qt +++ b/doc/man/man3/tqsgistyle.3qt @@ -25,7 +25,7 @@ Inherits QMotifStyle. .SH DESCRIPTION The QSGIStyle class provides SGI/Irix look and feel. .PP -This class implements the SGI look and feel. It resembles the SGI/Irix Motif GUI style as closely as QStyle allows. +This class implements the SGI look and feel. It resembles the SGI/Irix Motif GUI style as closely as TQStyle allows. .PP See also Widget Appearance and Style. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqsimplerichtext.3qt b/doc/man/man3/tqsimplerichtext.3qt index 834f3c16..05c35617 100644 --- a/doc/man/man3/tqsimplerichtext.3qt +++ b/doc/man/man3/tqsimplerichtext.3qt @@ -14,10 +14,10 @@ QSimpleRichText \- Small displayable piece of rich text .SS "Public Members" .in +1c .ti -1c -.BI "\fBQSimpleRichText\fR ( const TQString & text, const QFont & fnt, const TQString & context = TQString::null, const QStyleSheet * sheet = 0 )" +.BI "\fBQSimpleRichText\fR ( const TQString & text, const QFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" .br .ti -1c -.BI "\fBQSimpleRichText\fR ( const TQString & text, const QFont & fnt, const TQString & context, const QStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" +.BI "\fBQSimpleRichText\fR ( const TQString & text, const QFont & fnt, const TQString & context, const TQStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" .br .ti -1c .BI "\fB~QSimpleRichText\fR ()" @@ -62,7 +62,7 @@ QSimpleRichText \- Small displayable piece of rich text .SH DESCRIPTION The QSimpleRichText class provides a small displayable piece of rich text. .PP -This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A QStyleSheet is needed to interpret the tags and format the rich text. TQt provides a default HTML-like style sheet, but you may define custom style sheets. +This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A TQStyleSheet is needed to interpret the tags and format the rich text. TQt provides a default HTML-like style sheet, but you may define custom style sheets. .PP Once created, the rich text object can be queried for its width(), height(), and the actual width used (see widthUsed()). Most importantly, it can be drawn on any given QPainter with draw(). QSimpleRichText can also be used to implement hypertext or active text facilities by using anchorAt(). A hit test through inText() makes it possible to use simple rich text for text objects in editable drawing canvases. .PP @@ -74,7 +74,7 @@ If you are using QSimpleRichText to print in high resolution you should call set .PP See also Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const QFont & fnt, const TQString & context = TQString::null, const QStyleSheet * sheet = 0 )" +.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const QFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" Constructs a QSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. .PP The font is used as a basis for the text rendering. When using rich text rendering on a widget \fIw\fR, you would normally specify the widget's font, for example: @@ -87,15 +87,15 @@ The font is used as a basis for the text rendering. When using rich text renderi .PP \fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see QMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See QMimeSourceFactory::makeAbsolute() for details. .PP -The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see QStyleSheet::defaultSheet()). -.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const QFont & fnt, const TQString & context, const QStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" +The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see TQStyleSheet::defaultSheet()). +.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const QFont & fnt, const TQString & context, const TQStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" Constructs a QSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. .PP This is a slightly more complex constructor for QSimpleRichText that takes an additional mime source factory \fIfactory\fR, a page break parameter \fIpageBreak\fR and a bool \fIlinkUnderline\fR. \fIlinkColor\fR is only provided for compatibility, but has no effect, as QColorGroup's QColorGroup::link() color is used now. .PP \fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see QMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See QMimeSourceFactory::makeAbsolute() for details. .PP -The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see QStyleSheet::defaultSheet()). +The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see TQStyleSheet::defaultSheet()). .PP This constructor is useful for creating a QSimpleRichText object suitable for printing. Set \fIpageBreak\fR to be the height of the contents area of the pages. .SH "QSimpleRichText::~QSimpleRichText ()" diff --git a/doc/man/man3/tqsplitter.3qt b/doc/man/man3/tqsplitter.3qt index 0c6021a8..ce513d6c 100644 --- a/doc/man/man3/tqsplitter.3qt +++ b/doc/man/man3/tqsplitter.3qt @@ -191,7 +191,7 @@ Returns TRUE if child widgets can be resized down to size 0 by the user; otherwi .PP Draws the splitter handle in the rectangle described by \fIx\fR, \fIy\fR, \fIw\fR, \fIh\fR using painter \fIp\fR. .PP -See also QStyle::drawPrimitive(). +See also TQStyle::drawPrimitive(). .SH "void QSplitter::getRange ( int id, int * min, int * max )\fC [protected]\fR" Returns the valid range of the splitter with ID \fIid\fR in \fI*min\fR and \fI*max\fR if \fImin\fR and \fImax\fR are not 0. .PP diff --git a/doc/man/man3/tqstyle.3qt b/doc/man/man3/tqstyle.3qt index 1f679058..d975ad6f 100644 --- a/doc/man/man3/tqstyle.3qt +++ b/doc/man/man3/tqstyle.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStyle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStyle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,9 +7,9 @@ .ad l .nh .SH NAME -QStyle \- The look and feel of a GUI +TQStyle \- The look and feel of a GUI .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits TQObject. .PP @@ -18,10 +18,10 @@ Inherited by QCommonStyle. .SS "Public Members" .in +1c .ti -1c -.BI "\fBQStyle\fR ()" +.BI "\fBTQStyle\fR ()" .br .ti -1c -.BI "virtual \fB~QStyle\fR ()" +.BI "virtual \fB~TQStyle\fR ()" .br .ti -1c .BI "virtual void \fBpolish\fR ( TQWidget * )" @@ -54,16 +54,16 @@ Inherited by QCommonStyle. .BI "enum \fBStyleFlags\fR { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }" .br .ti -1c -.BI "virtual void \fBdrawPrimitive\fR ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg, SFlags flags = Style_Default, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual void \fBdrawPrimitive\fR ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBControlElement\fR { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea, CE_PopupMenuScroller, CE_DockWindowEmptyArea, CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra, CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }" .br .ti -1c -.BI "virtual void \fBdrawControl\fR ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual void \fBdrawControl\fR ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c -.BI "virtual void \fBdrawControlMask\fR ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual void \fBdrawControlMask\fR ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBSubRect\fR { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply, SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort, SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom, SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }" @@ -78,16 +78,16 @@ Inherited by QCommonStyle. .BI "enum \fBSubControl\fR { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }" .br .ti -1c -.BI "virtual void \fBdrawComplexControl\fR ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual void \fBdrawComplexControl\fR ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c -.BI "virtual void \fBdrawComplexControlMask\fR ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual void \fBdrawComplexControlMask\fR ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c -.BI "virtual QRect \fBquerySubControlMetrics\fR ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual QRect \fBquerySubControlMetrics\fR ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c -.BI "virtual SubControl \fBquerySubControl\fR ( ComplexControl control, const TQWidget * widget, const QPoint & pos, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual SubControl \fBquerySubControl\fR ( ComplexControl control, const TQWidget * widget, const QPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBPixelMetric\fR { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_PopupMenuScrollerHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize, PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing, PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }" @@ -99,19 +99,19 @@ Inherited by QCommonStyle. .BI "enum \fBContentsType\fR { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip, CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }" .br .ti -1c -.BI "virtual QSize \fBsizeFromContents\fR ( ContentsType contents, const TQWidget * widget, const QSize & contentsSize, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual QSize \fBsizeFromContents\fR ( ContentsType contents, const TQWidget * widget, const QSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBStyleHint\fR { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable, SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor, SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator, SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }" .br .ti -1c -.BI "virtual int \fBstyleHint\fR ( StyleHint stylehint, const TQWidget * widget = 0, const QStyleOption & opt = QStyleOption::Default, QStyleHintReturn * returnData = 0 ) const = 0" +.BI "virtual int \fBstyleHint\fR ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const = 0" .br .ti -1c .BI "enum \fBStylePixmap\fR { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion, SP_CustomBase = 0xf0000000 }" .br .ti -1c -.BI "virtual QPixmap \fBstylePixmap\fR ( StylePixmap stylepixmap, const TQWidget * widget = 0, const QStyleOption & opt = QStyleOption::Default ) const = 0" +.BI "virtual QPixmap \fBstylePixmap\fR ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "int defaultFrameWidth () const \fI(obsolete)\fR" @@ -133,11 +133,11 @@ Inherited by QCommonStyle. .br .in -1c .SH DESCRIPTION -The QStyle class specifies the look and feel of a GUI. +The TQStyle class specifies the look and feel of a GUI. .PP -A large number of GUI elements are common to many widgets. The QStyle class allows the look of these elements to be modified across all widgets that use the QStyle functions. It also provides two feel options: Motif and Windows. +A large number of GUI elements are common to many widgets. The TQStyle class allows the look of these elements to be modified across all widgets that use the TQStyle functions. It also provides two feel options: Motif and Windows. .PP -Although it is not possible to fully enumerate the look of graphical elements and the feel of widgets in a GUI, QStyle provides a considerable amount of control and customisability. +Although it is not possible to fully enumerate the look of graphical elements and the feel of widgets in a GUI, TQStyle provides a considerable amount of control and customisability. .PP In TQt 1.x the look and feel option for widgets was specified by a single value: the GUIStyle. Starting with TQt 2.0, this notion was expanded to allow the look to be specified by virtual drawing functions. .PP @@ -145,7 +145,7 @@ Derived classes may reimplement some or all of the drawing functions to modify t .PP Languages written from right to left (such as Arabic and Hebrew) usually also mirror the whole layout of widgets. If you design a style, you should take special care when drawing asymmetric elements to make sure that they also look correct in a mirrored layout. You can start your application with \fC-reverse\fR to check the mirrored layout. Also notice, that for a reversed layout, the light usually comes from top right instead of top left. .PP -The actual reverse layout is performed automatically when possible. However, for the sake of flexibility, the translation cannot be performed everywhere. The documentation for each function in the QStyle API states whether the function expects/returns logical or screen coordinates. Using logical coordinates (in ComplexControls, for example) provides great flexibility in controlling the look of a widget. Use visualRect() when necessary to translate logical coordinates into screen coordinates for drawing. +The actual reverse layout is performed automatically when possible. However, for the sake of flexibility, the translation cannot be performed everywhere. The documentation for each function in the TQStyle API states whether the function expects/returns logical or screen coordinates. Using logical coordinates (in ComplexControls, for example) provides great flexibility in controlling the look of a widget. Use visualRect() when necessary to translate logical coordinates into screen coordinates for drawing. .PP In TQt versions prior to 3.0, if you wanted a low level route into changing the appearance of a widget, you would reimplement polish(). With the new 3.0 style engine the recommended approach is to reimplement the draw functions, for example drawItem(), drawPrimitive(), drawControl(), drawControlMask(), drawComplexControl() and drawComplexControlMask(). Each of these functions is called with a range of parameters that provide information that you can use to determine how to draw them, e.g. style flags, rectangle, color group, etc. .PP @@ -155,632 +155,632 @@ Styles can also be created as plugins. .PP See also Widget Appearance and Style. .SS "Member Type Documentation" -.SH "QStyle::ComplexControl" +.SH "TQStyle::ComplexControl" This enum represents a ComplexControl. ComplexControls have different behaviour depending upon where the user clicks on them or which keys are pressed. .TP -\fCQStyle::CC_SpinWidget\fR +\fCTQStyle::CC_SpinWidget\fR .TP -\fCQStyle::CC_ComboBox\fR +\fCTQStyle::CC_ComboBox\fR .TP -\fCQStyle::CC_ScrollBar\fR +\fCTQStyle::CC_ScrollBar\fR .TP -\fCQStyle::CC_Slider\fR +\fCTQStyle::CC_Slider\fR .TP -\fCQStyle::CC_ToolButton\fR +\fCTQStyle::CC_ToolButton\fR .TP -\fCQStyle::CC_TitleBar\fR +\fCTQStyle::CC_TitleBar\fR .TP -\fCQStyle::CC_ListView\fR +\fCTQStyle::CC_ListView\fR .TP -\fCQStyle::CC_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::CC_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also SubControl and drawComplexControl(). -.SH "QStyle::ContentsType" +.SH "TQStyle::ContentsType" This enum represents a ContentsType. It is used to calculate sizes for the contents of various widgets. .TP -\fCQStyle::CT_PushButton\fR +\fCTQStyle::CT_PushButton\fR .TP -\fCQStyle::CT_CheckBox\fR +\fCTQStyle::CT_CheckBox\fR .TP -\fCQStyle::CT_RadioButton\fR +\fCTQStyle::CT_RadioButton\fR .TP -\fCQStyle::CT_ToolButton\fR +\fCTQStyle::CT_ToolButton\fR .TP -\fCQStyle::CT_ComboBox\fR +\fCTQStyle::CT_ComboBox\fR .TP -\fCQStyle::CT_Splitter\fR +\fCTQStyle::CT_Splitter\fR .TP -\fCQStyle::CT_DockWindow\fR +\fCTQStyle::CT_DockWindow\fR .TP -\fCQStyle::CT_ProgressBar\fR +\fCTQStyle::CT_ProgressBar\fR .TP -\fCQStyle::CT_PopupMenuItem\fR +\fCTQStyle::CT_PopupMenuItem\fR .TP -\fCQStyle::CT_TabBarTab\fR +\fCTQStyle::CT_TabBarTab\fR .TP -\fCQStyle::CT_Slider\fR +\fCTQStyle::CT_Slider\fR .TP -\fCQStyle::CT_Header\fR +\fCTQStyle::CT_Header\fR .TP -\fCQStyle::CT_LineEdit\fR +\fCTQStyle::CT_LineEdit\fR .TP -\fCQStyle::CT_MenuBar\fR +\fCTQStyle::CT_MenuBar\fR .TP -\fCQStyle::CT_SpinBox\fR +\fCTQStyle::CT_SpinBox\fR .TP -\fCQStyle::CT_SizeGrip\fR +\fCTQStyle::CT_SizeGrip\fR .TP -\fCQStyle::CT_TabWidget\fR +\fCTQStyle::CT_TabWidget\fR .TP -\fCQStyle::CT_DialogButtons\fR +\fCTQStyle::CT_DialogButtons\fR .TP -\fCQStyle::CT_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Custom values must be greater than this value. +\fCTQStyle::CT_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Custom values must be greater than this value. .PP See also sizeFromContents(). -.SH "QStyle::ControlElement" +.SH "TQStyle::ControlElement" This enum represents a ControlElement. A ControlElement is part of a widget that performs some action or displays information to the user. .TP -\fCQStyle::CE_PushButton\fR - the bevel and default indicator of a QPushButton. +\fCTQStyle::CE_PushButton\fR - the bevel and default indicator of a QPushButton. .TP -\fCQStyle::CE_PushButtonLabel\fR - the label (iconset with text or pixmap) of a QPushButton. +\fCTQStyle::CE_PushButtonLabel\fR - the label (iconset with text or pixmap) of a QPushButton. .TP -\fCQStyle::CE_CheckBox\fR - the indicator of a QCheckBox. +\fCTQStyle::CE_CheckBox\fR - the indicator of a QCheckBox. .TP -\fCQStyle::CE_CheckBoxLabel\fR - the label (text or pixmap) of a QCheckBox. +\fCTQStyle::CE_CheckBoxLabel\fR - the label (text or pixmap) of a QCheckBox. .TP -\fCQStyle::CE_RadioButton\fR - the indicator of a QRadioButton. +\fCTQStyle::CE_RadioButton\fR - the indicator of a QRadioButton. .TP -\fCQStyle::CE_RadioButtonLabel\fR - the label (text or pixmap) of a QRadioButton. +\fCTQStyle::CE_RadioButtonLabel\fR - the label (text or pixmap) of a QRadioButton. .TP -\fCQStyle::CE_TabBarTab\fR - the tab within a QTabBar (a QTab). +\fCTQStyle::CE_TabBarTab\fR - the tab within a QTabBar (a QTab). .TP -\fCQStyle::CE_TabBarLabel\fR - the label within a QTab. +\fCTQStyle::CE_TabBarLabel\fR - the label within a QTab. .TP -\fCQStyle::CE_ProgressBarGroove\fR - the groove where the progress indicator is drawn in a QProgressBar. +\fCTQStyle::CE_ProgressBarGroove\fR - the groove where the progress indicator is drawn in a QProgressBar. .TP -\fCQStyle::CE_ProgressBarContents\fR - the progress indicator of a QProgressBar. +\fCTQStyle::CE_ProgressBarContents\fR - the progress indicator of a QProgressBar. .TP -\fCQStyle::CE_ProgressBarLabel\fR - the text label of a QProgressBar. +\fCTQStyle::CE_ProgressBarLabel\fR - the text label of a QProgressBar. .TP -\fCQStyle::CE_PopupMenuItem\fR - a menu item in a QPopupMenu. +\fCTQStyle::CE_PopupMenuItem\fR - a menu item in a QPopupMenu. .TP -\fCQStyle::CE_PopupMenuScroller\fR - scrolling areas in a popumenu when the style supports scrolling. +\fCTQStyle::CE_PopupMenuScroller\fR - scrolling areas in a popumenu when the style supports scrolling. .TP -\fCQStyle::CE_PopupMenuHorizontalExtra\fR - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra +\fCTQStyle::CE_PopupMenuHorizontalExtra\fR - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra .TP -\fCQStyle::CE_PopupMenuVerticalExtra\fR - extra frame area set aside with PM_PopupMenuFrameVerticalExtra +\fCTQStyle::CE_PopupMenuVerticalExtra\fR - extra frame area set aside with PM_PopupMenuFrameVerticalExtra .TP -\fCQStyle::CE_MenuBarItem\fR - a menu item in a QMenuBar. +\fCTQStyle::CE_MenuBarItem\fR - a menu item in a QMenuBar. .TP -\fCQStyle::CE_ToolButtonLabel\fR - a tool button's label. +\fCTQStyle::CE_ToolButtonLabel\fR - a tool button's label. .TP -\fCQStyle::CE_MenuBarEmptyArea\fR - the empty area of a QMenuBar. +\fCTQStyle::CE_MenuBarEmptyArea\fR - the empty area of a QMenuBar. .TP -\fCQStyle::CE_DockWindowEmptyArea\fR - the empty area of a QDockWindow. +\fCTQStyle::CE_DockWindowEmptyArea\fR - the empty area of a QDockWindow. .TP -\fCQStyle::CE_ToolBoxTab\fR - the toolbox's tab area +\fCTQStyle::CE_ToolBoxTab\fR - the toolbox's tab area .TP -\fCQStyle::CE_HeaderLabel\fR - the header's label +\fCTQStyle::CE_HeaderLabel\fR - the header's label .TP -\fCQStyle::CE_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::CE_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also drawControl(). -.SH "QStyle::PixelMetric" +.SH "TQStyle::PixelMetric" This enum represents a PixelMetric. A PixelMetric is a style dependent size represented as a single pixel value. .TP -\fCQStyle::PM_ButtonMargin\fR - amount of whitespace between pushbutton labels and the frame. +\fCTQStyle::PM_ButtonMargin\fR - amount of whitespace between pushbutton labels and the frame. .TP -\fCQStyle::PM_ButtonDefaultIndicator\fR - width of the default-button indicator frame. +\fCTQStyle::PM_ButtonDefaultIndicator\fR - width of the default-button indicator frame. .TP -\fCQStyle::PM_MenuButtonIndicator\fR - width of the menu button indicator proportional to the widget height. +\fCTQStyle::PM_MenuButtonIndicator\fR - width of the menu button indicator proportional to the widget height. .TP -\fCQStyle::PM_ButtonShiftHorizontal\fR - horizontal contents shift of a button when the button is down. +\fCTQStyle::PM_ButtonShiftHorizontal\fR - horizontal contents shift of a button when the button is down. .TP -\fCQStyle::PM_ButtonShiftVertical\fR - vertical contents shift of a button when the button is down. +\fCTQStyle::PM_ButtonShiftVertical\fR - vertical contents shift of a button when the button is down. .TP -\fCQStyle::PM_DefaultFrameWidth\fR - default frame width, usually 2. +\fCTQStyle::PM_DefaultFrameWidth\fR - default frame width, usually 2. .TP -\fCQStyle::PM_SpinBoxFrameWidth\fR - frame width of a spin box. +\fCTQStyle::PM_SpinBoxFrameWidth\fR - frame width of a spin box. .TP -\fCQStyle::PM_MDIFrameWidth\fR - frame width of an MDI window. +\fCTQStyle::PM_MDIFrameWidth\fR - frame width of an MDI window. .TP -\fCQStyle::PM_MDIMinimizedWidth\fR - width of a minimized MSI window. +\fCTQStyle::PM_MDIMinimizedWidth\fR - width of a minimized MSI window. .TP -\fCQStyle::PM_MaximumDragDistance\fR - Some feels require the scrollbar or other sliders to jump back to the original position when the mouse pointer is too far away while dragging. A value of -1 disables this behavior. +\fCTQStyle::PM_MaximumDragDistance\fR - Some feels require the scrollbar or other sliders to jump back to the original position when the mouse pointer is too far away while dragging. A value of -1 disables this behavior. .TP -\fCQStyle::PM_ScrollBarExtent\fR - width of a vertical scrollbar and the height of a horizontal scrollbar. +\fCTQStyle::PM_ScrollBarExtent\fR - width of a vertical scrollbar and the height of a horizontal scrollbar. .TP -\fCQStyle::PM_ScrollBarSliderMin\fR - the minimum height of a vertical scrollbar's slider and the minimum width of a horiztonal scrollbar slider. +\fCTQStyle::PM_ScrollBarSliderMin\fR - the minimum height of a vertical scrollbar's slider and the minimum width of a horiztonal scrollbar slider. .TP -\fCQStyle::PM_SliderThickness\fR - total slider thickness. +\fCTQStyle::PM_SliderThickness\fR - total slider thickness. .TP -\fCQStyle::PM_SliderControlThickness\fR - thickness of the slider handle. +\fCTQStyle::PM_SliderControlThickness\fR - thickness of the slider handle. .TP -\fCQStyle::PM_SliderLength\fR - length of the slider. +\fCTQStyle::PM_SliderLength\fR - length of the slider. .TP -\fCQStyle::PM_SliderTickmarkOffset\fR - the offset between the tickmarks and the slider. +\fCTQStyle::PM_SliderTickmarkOffset\fR - the offset between the tickmarks and the slider. .TP -\fCQStyle::PM_SliderSpaceAvailable\fR - the available space for the slider to move. +\fCTQStyle::PM_SliderSpaceAvailable\fR - the available space for the slider to move. .TP -\fCQStyle::PM_DockWindowSeparatorExtent\fR - width of a separator in a horiztonal dock window and the height of a separator in a vertical dock window. +\fCTQStyle::PM_DockWindowSeparatorExtent\fR - width of a separator in a horiztonal dock window and the height of a separator in a vertical dock window. .TP -\fCQStyle::PM_DockWindowHandleExtent\fR - width of the handle in a horizontal dock window and the height of the handle in a vertical dock window. +\fCTQStyle::PM_DockWindowHandleExtent\fR - width of the handle in a horizontal dock window and the height of the handle in a vertical dock window. .TP -\fCQStyle::PM_DockWindowFrameWidth\fR - frame width of a dock window. +\fCTQStyle::PM_DockWindowFrameWidth\fR - frame width of a dock window. .TP -\fCQStyle::PM_MenuBarFrameWidth\fR - frame width of a menubar. +\fCTQStyle::PM_MenuBarFrameWidth\fR - frame width of a menubar. .TP -\fCQStyle::PM_MenuBarItemSpacing\fR - spacing between menubar items. +\fCTQStyle::PM_MenuBarItemSpacing\fR - spacing between menubar items. .TP -\fCQStyle::PM_ToolBarItemSpacing\fR - spacing between toolbar items. +\fCTQStyle::PM_ToolBarItemSpacing\fR - spacing between toolbar items. .TP -\fCQStyle::PM_TabBarTabOverlap\fR - number of pixels the tabs should overlap. +\fCTQStyle::PM_TabBarTabOverlap\fR - number of pixels the tabs should overlap. .TP -\fCQStyle::PM_TabBarTabHSpace\fR - extra space added to the tab width. +\fCTQStyle::PM_TabBarTabHSpace\fR - extra space added to the tab width. .TP -\fCQStyle::PM_TabBarTabVSpace\fR - extra space added to the tab height. +\fCTQStyle::PM_TabBarTabVSpace\fR - extra space added to the tab height. .TP -\fCQStyle::PM_TabBarBaseHeight\fR - height of the area between the tab bar and the tab pages. +\fCTQStyle::PM_TabBarBaseHeight\fR - height of the area between the tab bar and the tab pages. .TP -\fCQStyle::PM_TabBarBaseOverlap\fR - number of pixels the tab bar overlaps the tab bar base. +\fCTQStyle::PM_TabBarBaseOverlap\fR - number of pixels the tab bar overlaps the tab bar base. .TP -\fCQStyle::PM_TabBarScrollButtonWidth\fR +\fCTQStyle::PM_TabBarScrollButtonWidth\fR .TP -\fCQStyle::PM_TabBarTabShiftHorizontal\fR - horizontal pixel shift when a tab is selected. +\fCTQStyle::PM_TabBarTabShiftHorizontal\fR - horizontal pixel shift when a tab is selected. .TP -\fCQStyle::PM_TabBarTabShiftVertical\fR - vertical pixel shift when a tab is selected. +\fCTQStyle::PM_TabBarTabShiftVertical\fR - vertical pixel shift when a tab is selected. .TP -\fCQStyle::PM_ProgressBarChunkWidth\fR - width of a chunk in a progress bar indicator. +\fCTQStyle::PM_ProgressBarChunkWidth\fR - width of a chunk in a progress bar indicator. .TP -\fCQStyle::PM_SplitterWidth\fR - width of a splitter. +\fCTQStyle::PM_SplitterWidth\fR - width of a splitter. .TP -\fCQStyle::PM_TitleBarHeight\fR - height of the title bar. +\fCTQStyle::PM_TitleBarHeight\fR - height of the title bar. .TP -\fCQStyle::PM_PopupMenuFrameHorizontalExtra\fR - additional border, e.g. for panels +\fCTQStyle::PM_PopupMenuFrameHorizontalExtra\fR - additional border, e.g. for panels .TP -\fCQStyle::PM_PopupMenuFrameVerticalExtra\fR - additional border, e.g. for panels +\fCTQStyle::PM_PopupMenuFrameVerticalExtra\fR - additional border, e.g. for panels .TP -\fCQStyle::PM_IndicatorWidth\fR - width of a check box indicator. +\fCTQStyle::PM_IndicatorWidth\fR - width of a check box indicator. .TP -\fCQStyle::PM_IndicatorHeight\fR - height of a checkbox indicator. +\fCTQStyle::PM_IndicatorHeight\fR - height of a checkbox indicator. .TP -\fCQStyle::PM_ExclusiveIndicatorWidth\fR - width of a radio button indicator. +\fCTQStyle::PM_ExclusiveIndicatorWidth\fR - width of a radio button indicator. .TP -\fCQStyle::PM_ExclusiveIndicatorHeight\fR - height of a radio button indicator. +\fCTQStyle::PM_ExclusiveIndicatorHeight\fR - height of a radio button indicator. .TP -\fCQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. +\fCTQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. .TP -\fCQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. +\fCTQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. .TP -\fCQStyle::PM_CheckListButtonSize\fR - area (width/height) of the checkbox/radiobutton in a QCheckListItem +\fCTQStyle::PM_CheckListButtonSize\fR - area (width/height) of the checkbox/radiobutton in a QCheckListItem .TP -\fCQStyle::PM_CheckListControllerSize\fR - area (width/height) of the controller in a QCheckListItem +\fCTQStyle::PM_CheckListControllerSize\fR - area (width/height) of the controller in a QCheckListItem .TP -\fCQStyle::PM_DialogButtonsSeparator\fR - distance between buttons in a dialog buttons widget. +\fCTQStyle::PM_DialogButtonsSeparator\fR - distance between buttons in a dialog buttons widget. .TP -\fCQStyle::PM_DialogButtonsButtonWidth\fR - minimum width of a button in a dialog buttons widget. +\fCTQStyle::PM_DialogButtonsButtonWidth\fR - minimum width of a button in a dialog buttons widget. .TP -\fCQStyle::PM_DialogButtonsButtonHeight\fR - minimum height of a button in a dialog buttons widget. +\fCTQStyle::PM_DialogButtonsButtonHeight\fR - minimum height of a button in a dialog buttons widget. .TP -\fCQStyle::PM_HeaderMarkSize\fR +\fCTQStyle::PM_HeaderMarkSize\fR .TP -\fCQStyle::PM_HeaderGripMargin\fR +\fCTQStyle::PM_HeaderGripMargin\fR .TP -\fCQStyle::PM_HeaderMargin\fR +\fCTQStyle::PM_HeaderMargin\fR .TP -\fCQStyle::PM_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::PM_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also pixelMetric(). -.SH "QStyle::PrimitiveElement" +.SH "TQStyle::PrimitiveElement" This enum represents the PrimitiveElements of a style. A PrimitiveElement is a common GUI element, such as a checkbox indicator or pushbutton bevel. .TP -\fCQStyle::PE_ButtonCommand\fR - button used to initiate an action, for example, a QPushButton. +\fCTQStyle::PE_ButtonCommand\fR - button used to initiate an action, for example, a QPushButton. .TP -\fCQStyle::PE_ButtonDefault\fR - this button is the default button, e.g. in a dialog. +\fCTQStyle::PE_ButtonDefault\fR - this button is the default button, e.g. in a dialog. .TP -\fCQStyle::PE_ButtonBevel\fR - generic button bevel. +\fCTQStyle::PE_ButtonBevel\fR - generic button bevel. .TP -\fCQStyle::PE_ButtonTool\fR - tool button, for example, a QToolButton. +\fCTQStyle::PE_ButtonTool\fR - tool button, for example, a QToolButton. .TP -\fCQStyle::PE_ButtonDropDown\fR - drop down button, for example, a tool button that displays a popup menu, for example, QPopupMenu. +\fCTQStyle::PE_ButtonDropDown\fR - drop down button, for example, a tool button that displays a popup menu, for example, QPopupMenu. .TP -\fCQStyle::PE_FocusRect\fR - generic focus indicator. +\fCTQStyle::PE_FocusRect\fR - generic focus indicator. .TP -\fCQStyle::PE_ArrowUp\fR - up arrow. +\fCTQStyle::PE_ArrowUp\fR - up arrow. .TP -\fCQStyle::PE_ArrowDown\fR - down arrow. +\fCTQStyle::PE_ArrowDown\fR - down arrow. .TP -\fCQStyle::PE_ArrowRight\fR - right arrow. +\fCTQStyle::PE_ArrowRight\fR - right arrow. .TP -\fCQStyle::PE_ArrowLeft\fR - left arrow. +\fCTQStyle::PE_ArrowLeft\fR - left arrow. .TP -\fCQStyle::PE_SpinWidgetUp\fR - up symbol for a spin widget, for example a QSpinBox. +\fCTQStyle::PE_SpinWidgetUp\fR - up symbol for a spin widget, for example a QSpinBox. .TP -\fCQStyle::PE_SpinWidgetDown\fR - down symbol for a spin widget. +\fCTQStyle::PE_SpinWidgetDown\fR - down symbol for a spin widget. .TP -\fCQStyle::PE_SpinWidgetPlus\fR - increase symbol for a spin widget. +\fCTQStyle::PE_SpinWidgetPlus\fR - increase symbol for a spin widget. .TP -\fCQStyle::PE_SpinWidgetMinus\fR - decrease symbol for a spin widget. +\fCTQStyle::PE_SpinWidgetMinus\fR - decrease symbol for a spin widget. .TP -\fCQStyle::PE_Indicator\fR - on/off indicator, for example, a QCheckBox. +\fCTQStyle::PE_Indicator\fR - on/off indicator, for example, a QCheckBox. .TP -\fCQStyle::PE_IndicatorMask\fR - bitmap mask for an indicator. +\fCTQStyle::PE_IndicatorMask\fR - bitmap mask for an indicator. .TP -\fCQStyle::PE_ExclusiveIndicator\fR - exclusive on/off indicator, for example, a QRadioButton. +\fCTQStyle::PE_ExclusiveIndicator\fR - exclusive on/off indicator, for example, a QRadioButton. .TP -\fCQStyle::PE_ExclusiveIndicatorMask\fR - bitmap mask for an exclusive indicator. +\fCTQStyle::PE_ExclusiveIndicatorMask\fR - bitmap mask for an exclusive indicator. .TP -\fCQStyle::PE_DockWindowHandle\fR - tear off handle for dock windows and toolbars, for example QDockWindows and QToolBars. +\fCTQStyle::PE_DockWindowHandle\fR - tear off handle for dock windows and toolbars, for example QDockWindows and QToolBars. .TP -\fCQStyle::PE_DockWindowSeparator\fR - item separator for dock window and toolbar contents. +\fCTQStyle::PE_DockWindowSeparator\fR - item separator for dock window and toolbar contents. .TP -\fCQStyle::PE_DockWindowResizeHandle\fR - resize handle for dock windows. +\fCTQStyle::PE_DockWindowResizeHandle\fR - resize handle for dock windows. .TP -\fCQStyle::PE_Splitter\fR - splitter handle; see also QSplitter. +\fCTQStyle::PE_Splitter\fR - splitter handle; see also QSplitter. .TP -\fCQStyle::PE_Panel\fR - generic panel frame; see also QFrame. +\fCTQStyle::PE_Panel\fR - generic panel frame; see also QFrame. .TP -\fCQStyle::PE_PanelPopup\fR - panel frame for popup windows/menus; see also QPopupMenu. +\fCTQStyle::PE_PanelPopup\fR - panel frame for popup windows/menus; see also QPopupMenu. .TP -\fCQStyle::PE_PanelMenuBar\fR - panel frame for menu bars. +\fCTQStyle::PE_PanelMenuBar\fR - panel frame for menu bars. .TP -\fCQStyle::PE_PanelDockWindow\fR - panel frame for dock windows and toolbars. +\fCTQStyle::PE_PanelDockWindow\fR - panel frame for dock windows and toolbars. .TP -\fCQStyle::PE_PanelTabWidget\fR - panel frame for tab widgets. +\fCTQStyle::PE_PanelTabWidget\fR - panel frame for tab widgets. .TP -\fCQStyle::PE_PanelLineEdit\fR - panel frame for line edits. +\fCTQStyle::PE_PanelLineEdit\fR - panel frame for line edits. .TP -\fCQStyle::PE_PanelGroupBox\fR - panel frame for group boxes. +\fCTQStyle::PE_PanelGroupBox\fR - panel frame for group boxes. .TP -\fCQStyle::PE_TabBarBase\fR - area below tabs in a tab widget, for example, QTab. +\fCTQStyle::PE_TabBarBase\fR - area below tabs in a tab widget, for example, QTab. .TP -\fCQStyle::PE_HeaderSection\fR - section of a list or table header; see also QHeader. +\fCTQStyle::PE_HeaderSection\fR - section of a list or table header; see also QHeader. .TP -\fCQStyle::PE_HeaderArrow\fR - arrow used to indicate sorting on a list or table header +\fCTQStyle::PE_HeaderArrow\fR - arrow used to indicate sorting on a list or table header .TP -\fCQStyle::PE_StatusBarSection\fR - section of a status bar; see also QStatusBar. +\fCTQStyle::PE_StatusBarSection\fR - section of a status bar; see also QStatusBar. .TP -\fCQStyle::PE_GroupBoxFrame\fR - frame around a group box; see also QGroupBox. +\fCTQStyle::PE_GroupBoxFrame\fR - frame around a group box; see also QGroupBox. .TP -\fCQStyle::PE_WindowFrame\fR - frame around a MDI window or a docking window +\fCTQStyle::PE_WindowFrame\fR - frame around a MDI window or a docking window .TP -\fCQStyle::PE_Separator\fR - generic separator. +\fCTQStyle::PE_Separator\fR - generic separator. .TP -\fCQStyle::PE_SizeGrip\fR - window resize handle; see also QSizeGrip. +\fCTQStyle::PE_SizeGrip\fR - window resize handle; see also QSizeGrip. .TP -\fCQStyle::PE_CheckMark\fR - generic check mark; see also QCheckBox. +\fCTQStyle::PE_CheckMark\fR - generic check mark; see also QCheckBox. .TP -\fCQStyle::PE_ScrollBarAddLine\fR - scrollbar line increase indicator (i.e. scroll down); see also QScrollBar. +\fCTQStyle::PE_ScrollBarAddLine\fR - scrollbar line increase indicator (i.e. scroll down); see also QScrollBar. .TP -\fCQStyle::PE_ScrollBarSubLine\fR - scrollbar line decrease indicator (i.e. scroll up). +\fCTQStyle::PE_ScrollBarSubLine\fR - scrollbar line decrease indicator (i.e. scroll up). .TP -\fCQStyle::PE_ScrollBarAddPage\fR - scolllbar page increase indicator (i.e. page down). +\fCTQStyle::PE_ScrollBarAddPage\fR - scolllbar page increase indicator (i.e. page down). .TP -\fCQStyle::PE_ScrollBarSubPage\fR - scrollbar page decrease indicator (i.e. page up). +\fCTQStyle::PE_ScrollBarSubPage\fR - scrollbar page decrease indicator (i.e. page up). .TP -\fCQStyle::PE_ScrollBarSlider\fR - scrollbar slider +\fCTQStyle::PE_ScrollBarSlider\fR - scrollbar slider .TP -\fCQStyle::PE_ScrollBarFirst\fR - scrollbar first line indicator (i.e. home). +\fCTQStyle::PE_ScrollBarFirst\fR - scrollbar first line indicator (i.e. home). .TP -\fCQStyle::PE_ScrollBarLast\fR - scrollbar last line indicator (i.e. end). +\fCTQStyle::PE_ScrollBarLast\fR - scrollbar last line indicator (i.e. end). .TP -\fCQStyle::PE_ProgressBarChunk\fR - section of a progress bar indicator; see also QProgressBar. +\fCTQStyle::PE_ProgressBarChunk\fR - section of a progress bar indicator; see also QProgressBar. .TP -\fCQStyle::PE_CheckListController\fR - controller part of a listview item +\fCTQStyle::PE_CheckListController\fR - controller part of a listview item .TP -\fCQStyle::PE_CheckListIndicator\fR - checkbox part of a listview item +\fCTQStyle::PE_CheckListIndicator\fR - checkbox part of a listview item .TP -\fCQStyle::PE_CheckListExclusiveIndicator\fR - radiobutton part of a listview item +\fCTQStyle::PE_CheckListExclusiveIndicator\fR - radiobutton part of a listview item .TP -\fCQStyle::PE_RubberBand\fR - rubber band used in such things as iconview +\fCTQStyle::PE_RubberBand\fR - rubber band used in such things as iconview .TP -\fCQStyle::PE_CustomBase\fR - base value for custom PrimitiveElements. All values above this are reserved for custom use. Custom values must be greater than this value. +\fCTQStyle::PE_CustomBase\fR - base value for custom PrimitiveElements. All values above this are reserved for custom use. Custom values must be greater than this value. .PP See also drawPrimitive(). -.SH "QStyle::StyleFlags" +.SH "TQStyle::StyleFlags" This enum represents flags for drawing PrimitiveElements. Not all primitives use all of these flags. Note that these flags may mean different things to different primitives. For an explanation of the relationship between primitives and their flags, as well as the different meanings of the flags, see the Style overview. .TP -\fCQStyle::Style_Default\fR +\fCTQStyle::Style_Default\fR .TP -\fCQStyle::Style_Enabled\fR +\fCTQStyle::Style_Enabled\fR .TP -\fCQStyle::Style_Raised\fR +\fCTQStyle::Style_Raised\fR .TP -\fCQStyle::Style_Sunken\fR +\fCTQStyle::Style_Sunken\fR .TP -\fCQStyle::Style_Off\fR +\fCTQStyle::Style_Off\fR .TP -\fCQStyle::Style_NoChange\fR +\fCTQStyle::Style_NoChange\fR .TP -\fCQStyle::Style_On\fR +\fCTQStyle::Style_On\fR .TP -\fCQStyle::Style_Down\fR +\fCTQStyle::Style_Down\fR .TP -\fCQStyle::Style_Horizontal\fR +\fCTQStyle::Style_Horizontal\fR .TP -\fCQStyle::Style_HasFocus\fR +\fCTQStyle::Style_HasFocus\fR .TP -\fCQStyle::Style_Top\fR +\fCTQStyle::Style_Top\fR .TP -\fCQStyle::Style_Bottom\fR +\fCTQStyle::Style_Bottom\fR .TP -\fCQStyle::Style_FocusAtBorder\fR +\fCTQStyle::Style_FocusAtBorder\fR .TP -\fCQStyle::Style_AutoRaise\fR +\fCTQStyle::Style_AutoRaise\fR .TP -\fCQStyle::Style_MouseOver\fR +\fCTQStyle::Style_MouseOver\fR .TP -\fCQStyle::Style_Up\fR +\fCTQStyle::Style_Up\fR .TP -\fCQStyle::Style_Selected\fR +\fCTQStyle::Style_Selected\fR .TP -\fCQStyle::Style_HasFocus\fR +\fCTQStyle::Style_HasFocus\fR .TP -\fCQStyle::Style_Active\fR +\fCTQStyle::Style_Active\fR .TP -\fCQStyle::Style_ButtonDefault\fR +\fCTQStyle::Style_ButtonDefault\fR .PP See also drawPrimitive(). -.SH "QStyle::StyleHint" +.SH "TQStyle::StyleHint" This enum represents a StyleHint. A StyleHint is a general look and/or feel hint. .TP -\fCQStyle::SH_EtchDisabledText\fR - disabled text is "etched" like Windows. +\fCTQStyle::SH_EtchDisabledText\fR - disabled text is "etched" like Windows. .TP -\fCQStyle::SH_GUIStyle\fR - the GUI style to use. +\fCTQStyle::SH_GUIStyle\fR - the GUI style to use. .TP -\fCQStyle::SH_ScrollBar_BackgroundMode\fR - the background mode for a QScrollBar. Possible values are any of those in the BackgroundMode enum. +\fCTQStyle::SH_ScrollBar_BackgroundMode\fR - the background mode for a QScrollBar. Possible values are any of those in the BackgroundMode enum. .TP -\fCQStyle::SH_ScrollBar_MiddleClickAbsolutePosition\fR - a boolean value. If TRUE, middle clicking on a scrollbar causes the slider to jump to that position. If FALSE, the middle clicking is ignored. +\fCTQStyle::SH_ScrollBar_MiddleClickAbsolutePosition\fR - a boolean value. If TRUE, middle clicking on a scrollbar causes the slider to jump to that position. If FALSE, the middle clicking is ignored. .TP -\fCQStyle::SH_ScrollBar_LeftClickAbsolutePosition\fR - a boolean value. If TRUE, left clicking on a scrollbar causes the slider to jump to that position. If FALSE, the left clicking will behave as appropriate for each control. +\fCTQStyle::SH_ScrollBar_LeftClickAbsolutePosition\fR - a boolean value. If TRUE, left clicking on a scrollbar causes the slider to jump to that position. If FALSE, the left clicking will behave as appropriate for each control. .TP -\fCQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl\fR - a boolean value. If TRUE, when clicking a scrollbar SubControl, holding the mouse button down and moving the pointer outside the SubControl, the scrollbar continues to scroll. If FALSE, the scollbar stops scrolling when the pointer leaves the SubControl. +\fCTQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl\fR - a boolean value. If TRUE, when clicking a scrollbar SubControl, holding the mouse button down and moving the pointer outside the SubControl, the scrollbar continues to scroll. If FALSE, the scollbar stops scrolling when the pointer leaves the SubControl. .TP -\fCQStyle::SH_TabBar_Alignment\fR - the alignment for tabs in a QTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. +\fCTQStyle::SH_TabBar_Alignment\fR - the alignment for tabs in a QTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. .TP -\fCQStyle::SH_Header_ArrowAlignment\fR - the placement of the sorting indicator may appear in list or table headers. Possible values are TQt::Left or TQt::Right. +\fCTQStyle::SH_Header_ArrowAlignment\fR - the placement of the sorting indicator may appear in list or table headers. Possible values are TQt::Left or TQt::Right. .TP -\fCQStyle::SH_Slider_SnapToValue\fR - sliders snap to values while moving, like Windows +\fCTQStyle::SH_Slider_SnapToValue\fR - sliders snap to values while moving, like Windows .TP -\fCQStyle::SH_Slider_SloppyKeyEvents\fR - key presses handled in a sloppy manner, i.e. left on a vertical slider subtracts a line. +\fCTQStyle::SH_Slider_SloppyKeyEvents\fR - key presses handled in a sloppy manner, i.e. left on a vertical slider subtracts a line. .TP -\fCQStyle::SH_ProgressDialog_CenterCancelButton\fR - center button on progress dialogs, like Motif, otherwise right aligned. +\fCTQStyle::SH_ProgressDialog_CenterCancelButton\fR - center button on progress dialogs, like Motif, otherwise right aligned. .TP -\fCQStyle::SH_ProgressDialog_TextLabelAlignment\fR - TQt::AlignmentFlags -- text label alignment in progress dialogs; Center on windows, Auto|VCenter otherwise. +\fCTQStyle::SH_ProgressDialog_TextLabelAlignment\fR - TQt::AlignmentFlags -- text label alignment in progress dialogs; Center on windows, Auto|VCenter otherwise. .TP -\fCQStyle::SH_PrintDialog_RightAlignButtons\fR - right align buttons in the print dialog, like Windows. +\fCTQStyle::SH_PrintDialog_RightAlignButtons\fR - right align buttons in the print dialog, like Windows. .TP -\fCQStyle::SH_MainWindow_SpaceBelowMenuBar\fR - 1 or 2 pixel space between the menubar and the dockarea, like Windows. +\fCTQStyle::SH_MainWindow_SpaceBelowMenuBar\fR - 1 or 2 pixel space between the menubar and the dockarea, like Windows. .TP -\fCQStyle::SH_FontDialog_SelectAssociatedText\fR - select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, like Windows. +\fCTQStyle::SH_FontDialog_SelectAssociatedText\fR - select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, like Windows. .TP -\fCQStyle::SH_PopupMenu_AllowActiveAndDisabled\fR - allows disabled menu items to be active. +\fCTQStyle::SH_PopupMenu_AllowActiveAndDisabled\fR - allows disabled menu items to be active. .TP -\fCQStyle::SH_PopupMenu_SpaceActivatesItem\fR - pressing Space activates the item, like Motif. +\fCTQStyle::SH_PopupMenu_SpaceActivatesItem\fR - pressing Space activates the item, like Motif. .TP -\fCQStyle::SH_PopupMenu_SubMenuPopupDelay\fR - the number of milliseconds to wait before opening a submenu; 256 on windows, 96 on Motif. +\fCTQStyle::SH_PopupMenu_SubMenuPopupDelay\fR - the number of milliseconds to wait before opening a submenu; 256 on windows, 96 on Motif. .TP -\fCQStyle::SH_PopupMenu_Scrollable\fR - whether popupmenu's must support scrolling. +\fCTQStyle::SH_PopupMenu_Scrollable\fR - whether popupmenu's must support scrolling. .TP -\fCQStyle::SH_PopupMenu_SloppySubMenus\fR - whether popupmenu's must support sloppy submenu; as implemented on Mac OS. +\fCTQStyle::SH_PopupMenu_SloppySubMenus\fR - whether popupmenu's must support sloppy submenu; as implemented on Mac OS. .TP -\fCQStyle::SH_ScrollView_FrameOnlyAroundContents\fR - whether scrollviews draw their frame only around contents (like Motif), or around contents, scrollbars and corner widgets (like Windows). +\fCTQStyle::SH_ScrollView_FrameOnlyAroundContents\fR - whether scrollviews draw their frame only around contents (like Motif), or around contents, scrollbars and corner widgets (like Windows). .TP -\fCQStyle::SH_MenuBar_AltKeyNavigation\fR - menubars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item. +\fCTQStyle::SH_MenuBar_AltKeyNavigation\fR - menubars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item. .TP -\fCQStyle::SH_ComboBox_ListMouseTracking\fR - mouse tracking in combobox dropdown lists. +\fCTQStyle::SH_ComboBox_ListMouseTracking\fR - mouse tracking in combobox dropdown lists. .TP -\fCQStyle::SH_PopupMenu_MouseTracking\fR - mouse tracking in popup menus. +\fCTQStyle::SH_PopupMenu_MouseTracking\fR - mouse tracking in popup menus. .TP -\fCQStyle::SH_MenuBar_MouseTracking\fR - mouse tracking in menubars. +\fCTQStyle::SH_MenuBar_MouseTracking\fR - mouse tracking in menubars. .TP -\fCQStyle::SH_ItemView_ChangeHighlightOnFocus\fR - gray out selected items when losing focus. +\fCTQStyle::SH_ItemView_ChangeHighlightOnFocus\fR - gray out selected items when losing focus. .TP -\fCQStyle::SH_Widget_ShareActivation\fR - turn on sharing activation with floating modeless dialogs. +\fCTQStyle::SH_Widget_ShareActivation\fR - turn on sharing activation with floating modeless dialogs. .TP -\fCQStyle::SH_TabBar_SelectMouseType\fR - which type of mouse event should cause a tab to be selected. +\fCTQStyle::SH_TabBar_SelectMouseType\fR - which type of mouse event should cause a tab to be selected. .TP -\fCQStyle::SH_ListViewExpand_SelectMouseType\fR - which type of mouse event should cause a listview expansion to be selected. +\fCTQStyle::SH_ListViewExpand_SelectMouseType\fR - which type of mouse event should cause a listview expansion to be selected. .TP -\fCQStyle::SH_TabBar_PreferNoArrows\fR - whether a tabbar should suggest a size to prevent scoll arrows. +\fCTQStyle::SH_TabBar_PreferNoArrows\fR - whether a tabbar should suggest a size to prevent scoll arrows. .TP -\fCQStyle::SH_ComboBox_Popup\fR - allows popups as a combobox dropdown menu. +\fCTQStyle::SH_ComboBox_Popup\fR - allows popups as a combobox dropdown menu. .TP -\fCQStyle::SH_Workspace_FillSpaceOnMaximize\fR - the workspace should maximize the client area. +\fCTQStyle::SH_Workspace_FillSpaceOnMaximize\fR - the workspace should maximize the client area. .TP -\fCQStyle::SH_TitleBar_NoBorder\fR - the titlebar has no border +\fCTQStyle::SH_TitleBar_NoBorder\fR - the titlebar has no border .TP -\fCQStyle::SH_ScrollBar_StopMouseOverSlider\fR - stops autorepeat when slider reaches mouse +\fCTQStyle::SH_ScrollBar_StopMouseOverSlider\fR - stops autorepeat when slider reaches mouse .TP -\fCQStyle::SH_BlinkCursorWhenTextSelected\fR - whether cursor should blink when text is selected +\fCTQStyle::SH_BlinkCursorWhenTextSelected\fR - whether cursor should blink when text is selected .TP -\fCQStyle::SH_RichText_FullWidthSelection\fR - whether richtext selections should extend the full width of the document. +\fCTQStyle::SH_RichText_FullWidthSelection\fR - whether richtext selections should extend the full width of the document. .TP -\fCQStyle::SH_GroupBox_TextLabelVerticalAlignment\fR - how to vertically align a groupbox's text label. +\fCTQStyle::SH_GroupBox_TextLabelVerticalAlignment\fR - how to vertically align a groupbox's text label. .TP -\fCQStyle::SH_GroupBox_TextLabelColor\fR - how to paint a groupbox's text label. +\fCTQStyle::SH_GroupBox_TextLabelColor\fR - how to paint a groupbox's text label. .TP -\fCQStyle::SH_DialogButtons_DefaultButton\fR - which buttons gets the default status in a dialog's button widget. +\fCTQStyle::SH_DialogButtons_DefaultButton\fR - which buttons gets the default status in a dialog's button widget. .TP -\fCQStyle::SH_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::SH_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .TP -\fCQStyle::SH_ToolButton_Uses3D\fR - indicates whether QToolButtons should use a 3D frame when the mouse is over them +\fCTQStyle::SH_ToolButton_Uses3D\fR - indicates whether QToolButtons should use a 3D frame when the mouse is over them .TP -\fCQStyle::SH_ToolBox_SelectedPageTitleBold\fR - Boldness of the selected page title in a QToolBox. +\fCTQStyle::SH_ToolBox_SelectedPageTitleBold\fR - Boldness of the selected page title in a QToolBox. .TP -\fCQStyle::SH_LineEdit_PasswordCharacter\fR - The TQChar Unicode character to be used for passwords. +\fCTQStyle::SH_LineEdit_PasswordCharacter\fR - The TQChar Unicode character to be used for passwords. .TP -\fCQStyle::SH_Table_GridLineColor\fR +\fCTQStyle::SH_Table_GridLineColor\fR .TP -\fCQStyle::SH_UnderlineAccelerator\fR - whether accelerators are underlined +\fCTQStyle::SH_UnderlineAccelerator\fR - whether accelerators are underlined .PP See also styleHint(). -.SH "QStyle::StylePixmap" +.SH "TQStyle::StylePixmap" This enum represents a StylePixmap. A StylePixmap is a pixmap that can follow some existing GUI style or guideline. .TP -\fCQStyle::SP_TitleBarMinButton\fR - minimize button on titlebars. For example, in a QWorkspace. +\fCTQStyle::SP_TitleBarMinButton\fR - minimize button on titlebars. For example, in a QWorkspace. .TP -\fCQStyle::SP_TitleBarMaxButton\fR - maximize button on titlebars. +\fCTQStyle::SP_TitleBarMaxButton\fR - maximize button on titlebars. .TP -\fCQStyle::SP_TitleBarCloseButton\fR - close button on titlebars. +\fCTQStyle::SP_TitleBarCloseButton\fR - close button on titlebars. .TP -\fCQStyle::SP_TitleBarNormalButton\fR - normal (restore) button on titlebars. +\fCTQStyle::SP_TitleBarNormalButton\fR - normal (restore) button on titlebars. .TP -\fCQStyle::SP_TitleBarShadeButton\fR - shade button on titlebars. +\fCTQStyle::SP_TitleBarShadeButton\fR - shade button on titlebars. .TP -\fCQStyle::SP_TitleBarUnshadeButton\fR - unshade button on titlebars. +\fCTQStyle::SP_TitleBarUnshadeButton\fR - unshade button on titlebars. .TP -\fCQStyle::SP_MessageBoxInformation\fR - the 'information' icon. +\fCTQStyle::SP_MessageBoxInformation\fR - the 'information' icon. .TP -\fCQStyle::SP_MessageBoxWarning\fR - the 'warning' icon. +\fCTQStyle::SP_MessageBoxWarning\fR - the 'warning' icon. .TP -\fCQStyle::SP_MessageBoxCritical\fR - the 'critical' icon. +\fCTQStyle::SP_MessageBoxCritical\fR - the 'critical' icon. .TP -\fCQStyle::SP_MessageBoxQuestion\fR - the 'question' icon. +\fCTQStyle::SP_MessageBoxQuestion\fR - the 'question' icon. .TP -\fCQStyle::SP_DockWindowCloseButton\fR - close button on dock windows; see also QDockWindow. +\fCTQStyle::SP_DockWindowCloseButton\fR - close button on dock windows; see also QDockWindow. .TP -\fCQStyle::SP_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::SP_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also stylePixmap(). -.SH "QStyle::SubControl" +.SH "TQStyle::SubControl" This enum represents a SubControl within a ComplexControl. .TP -\fCQStyle::SC_None\fR - special value that matches no other SubControl. +\fCTQStyle::SC_None\fR - special value that matches no other SubControl. .TP -\fCQStyle::SC_ScrollBarAddLine\fR - scrollbar add line (i.e. down/right arrow); see also QScrollbar. +\fCTQStyle::SC_ScrollBarAddLine\fR - scrollbar add line (i.e. down/right arrow); see also QScrollbar. .TP -\fCQStyle::SC_ScrollBarSubLine\fR - scrollbar sub line (i.e. up/left arrow). +\fCTQStyle::SC_ScrollBarSubLine\fR - scrollbar sub line (i.e. up/left arrow). .TP -\fCQStyle::SC_ScrollBarAddPage\fR - scrollbar add page (i.e. page down). +\fCTQStyle::SC_ScrollBarAddPage\fR - scrollbar add page (i.e. page down). .TP -\fCQStyle::SC_ScrollBarSubPage\fR - scrollbar sub page (i.e. page up). +\fCTQStyle::SC_ScrollBarSubPage\fR - scrollbar sub page (i.e. page up). .TP -\fCQStyle::SC_ScrollBarFirst\fR - scrollbar first line (i.e. home). +\fCTQStyle::SC_ScrollBarFirst\fR - scrollbar first line (i.e. home). .TP -\fCQStyle::SC_ScrollBarLast\fR - scrollbar last line (i.e. end). +\fCTQStyle::SC_ScrollBarLast\fR - scrollbar last line (i.e. end). .TP -\fCQStyle::SC_ScrollBarSlider\fR - scrollbar slider handle. +\fCTQStyle::SC_ScrollBarSlider\fR - scrollbar slider handle. .TP -\fCQStyle::SC_ScrollBarGroove\fR - special subcontrol which contains the area in which the slider handle may move. +\fCTQStyle::SC_ScrollBarGroove\fR - special subcontrol which contains the area in which the slider handle may move. .TP -\fCQStyle::SC_SpinWidgetUp\fR - spinwidget up/increase; see also QSpinBox. +\fCTQStyle::SC_SpinWidgetUp\fR - spinwidget up/increase; see also QSpinBox. .TP -\fCQStyle::SC_SpinWidgetDown\fR - spinwidget down/decrease. +\fCTQStyle::SC_SpinWidgetDown\fR - spinwidget down/decrease. .TP -\fCQStyle::SC_SpinWidgetFrame\fR - spinwidget frame. +\fCTQStyle::SC_SpinWidgetFrame\fR - spinwidget frame. .TP -\fCQStyle::SC_SpinWidgetEditField\fR - spinwidget edit field. +\fCTQStyle::SC_SpinWidgetEditField\fR - spinwidget edit field. .TP -\fCQStyle::SC_SpinWidgetButtonField\fR - spinwidget button field. +\fCTQStyle::SC_SpinWidgetButtonField\fR - spinwidget button field. .TP -\fCQStyle::SC_ComboBoxEditField\fR - combobox edit field; see also QComboBox. +\fCTQStyle::SC_ComboBoxEditField\fR - combobox edit field; see also QComboBox. .TP -\fCQStyle::SC_ComboBoxArrow\fR - combobox arrow +\fCTQStyle::SC_ComboBoxArrow\fR - combobox arrow .TP -\fCQStyle::SC_ComboBoxFrame\fR - combobox frame +\fCTQStyle::SC_ComboBoxFrame\fR - combobox frame .TP -\fCQStyle::SC_ComboBoxListBoxPopup\fR - combobox list box +\fCTQStyle::SC_ComboBoxListBoxPopup\fR - combobox list box .TP -\fCQStyle::SC_SliderGroove\fR - special subcontrol which contains the area in which the slider handle may move. +\fCTQStyle::SC_SliderGroove\fR - special subcontrol which contains the area in which the slider handle may move. .TP -\fCQStyle::SC_SliderHandle\fR - slider handle. +\fCTQStyle::SC_SliderHandle\fR - slider handle. .TP -\fCQStyle::SC_SliderTickmarks\fR - slider tickmarks. +\fCTQStyle::SC_SliderTickmarks\fR - slider tickmarks. .TP -\fCQStyle::SC_ToolButton\fR - tool button; see also QToolbutton. +\fCTQStyle::SC_ToolButton\fR - tool button; see also QToolbutton. .TP -\fCQStyle::SC_ToolButtonMenu\fR - subcontrol for opening a popup menu in a tool button; see also QPopupMenu. +\fCTQStyle::SC_ToolButtonMenu\fR - subcontrol for opening a popup menu in a tool button; see also QPopupMenu. .TP -\fCQStyle::SC_TitleBarSysMenu\fR - system menu button (i.e. restore, close, etc.). +\fCTQStyle::SC_TitleBarSysMenu\fR - system menu button (i.e. restore, close, etc.). .TP -\fCQStyle::SC_TitleBarMinButton\fR - minimize button. +\fCTQStyle::SC_TitleBarMinButton\fR - minimize button. .TP -\fCQStyle::SC_TitleBarMaxButton\fR - maximize button. +\fCTQStyle::SC_TitleBarMaxButton\fR - maximize button. .TP -\fCQStyle::SC_TitleBarCloseButton\fR - close button. +\fCTQStyle::SC_TitleBarCloseButton\fR - close button. .TP -\fCQStyle::SC_TitleBarLabel\fR - window title label. +\fCTQStyle::SC_TitleBarLabel\fR - window title label. .TP -\fCQStyle::SC_TitleBarNormalButton\fR - normal (restore) button. +\fCTQStyle::SC_TitleBarNormalButton\fR - normal (restore) button. .TP -\fCQStyle::SC_TitleBarShadeButton\fR - shade button. +\fCTQStyle::SC_TitleBarShadeButton\fR - shade button. .TP -\fCQStyle::SC_TitleBarUnshadeButton\fR - unshade button. +\fCTQStyle::SC_TitleBarUnshadeButton\fR - unshade button. .TP -\fCQStyle::SC_ListView\fR - the list view area. +\fCTQStyle::SC_ListView\fR - the list view area. .TP -\fCQStyle::SC_ListViewBranch\fR - (internal) +\fCTQStyle::SC_ListViewBranch\fR - (internal) .TP -\fCQStyle::SC_ListViewExpand\fR - expand item (i.e. show/hide child items). +\fCTQStyle::SC_ListViewExpand\fR - expand item (i.e. show/hide child items). .TP -\fCQStyle::SC_All\fR - special value that matches all SubControls. +\fCTQStyle::SC_All\fR - special value that matches all SubControls. .PP See also ComplexControl. -.SH "QStyle::SubRect" +.SH "TQStyle::SubRect" This enum represents a sub-area of a widget. Style implementations would use these areas to draw the different parts of a widget. .TP -\fCQStyle::SR_PushButtonContents\fR - area containing the label (iconset with text or pixmap). +\fCTQStyle::SR_PushButtonContents\fR - area containing the label (iconset with text or pixmap). .TP -\fCQStyle::SR_PushButtonFocusRect\fR - area for the focus rect (usually larger than the contents rect). +\fCTQStyle::SR_PushButtonFocusRect\fR - area for the focus rect (usually larger than the contents rect). .TP -\fCQStyle::SR_CheckBoxIndicator\fR - area for the state indicator (e.g. check mark). +\fCTQStyle::SR_CheckBoxIndicator\fR - area for the state indicator (e.g. check mark). .TP -\fCQStyle::SR_CheckBoxContents\fR - area for the label (text or pixmap). +\fCTQStyle::SR_CheckBoxContents\fR - area for the label (text or pixmap). .TP -\fCQStyle::SR_CheckBoxFocusRect\fR - area for the focus indicator. +\fCTQStyle::SR_CheckBoxFocusRect\fR - area for the focus indicator. .TP -\fCQStyle::SR_RadioButtonIndicator\fR - area for the state indicator. +\fCTQStyle::SR_RadioButtonIndicator\fR - area for the state indicator. .TP -\fCQStyle::SR_RadioButtonContents\fR - area for the label. +\fCTQStyle::SR_RadioButtonContents\fR - area for the label. .TP -\fCQStyle::SR_RadioButtonFocusRect\fR - area for the focus indicator. +\fCTQStyle::SR_RadioButtonFocusRect\fR - area for the focus indicator. .TP -\fCQStyle::SR_ComboBoxFocusRect\fR - area for the focus indicator. +\fCTQStyle::SR_ComboBoxFocusRect\fR - area for the focus indicator. .TP -\fCQStyle::SR_SliderFocusRect\fR - area for the focus indicator. +\fCTQStyle::SR_SliderFocusRect\fR - area for the focus indicator. .TP -\fCQStyle::SR_DockWindowHandleRect\fR - area for the tear-off handle. +\fCTQStyle::SR_DockWindowHandleRect\fR - area for the tear-off handle. .TP -\fCQStyle::SR_ProgressBarGroove\fR - area for the groove. +\fCTQStyle::SR_ProgressBarGroove\fR - area for the groove. .TP -\fCQStyle::SR_ProgressBarContents\fR - area for the progress indicator. +\fCTQStyle::SR_ProgressBarContents\fR - area for the progress indicator. .TP -\fCQStyle::SR_ProgressBarLabel\fR - area for the text label. +\fCTQStyle::SR_ProgressBarLabel\fR - area for the text label. .TP -\fCQStyle::SR_ToolButtonContents\fR - area for the tool button's label. +\fCTQStyle::SR_ToolButtonContents\fR - area for the tool button's label. .TP -\fCQStyle::SR_DialogButtonAccept\fR - area for a dialog's accept button. +\fCTQStyle::SR_DialogButtonAccept\fR - area for a dialog's accept button. .TP -\fCQStyle::SR_DialogButtonReject\fR - area for a dialog's reject button. +\fCTQStyle::SR_DialogButtonReject\fR - area for a dialog's reject button. .TP -\fCQStyle::SR_DialogButtonApply\fR - area for a dialog's apply button. +\fCTQStyle::SR_DialogButtonApply\fR - area for a dialog's apply button. .TP -\fCQStyle::SR_DialogButtonHelp\fR - area for a dialog's help button. +\fCTQStyle::SR_DialogButtonHelp\fR - area for a dialog's help button. .TP -\fCQStyle::SR_DialogButtonAll\fR - area for a dialog's all button. +\fCTQStyle::SR_DialogButtonAll\fR - area for a dialog's all button. .TP -\fCQStyle::SR_DialogButtonRetry\fR - area for a dialog's retry button. +\fCTQStyle::SR_DialogButtonRetry\fR - area for a dialog's retry button. .TP -\fCQStyle::SR_DialogButtonAbort\fR - area for a dialog's abort button. +\fCTQStyle::SR_DialogButtonAbort\fR - area for a dialog's abort button. .TP -\fCQStyle::SR_DialogButtonIgnore\fR - area for a dialog's ignore button. +\fCTQStyle::SR_DialogButtonIgnore\fR - area for a dialog's ignore button. .TP -\fCQStyle::SR_DialogButtonCustom\fR - area for a dialog's custom widget area (in button row). +\fCTQStyle::SR_DialogButtonCustom\fR - area for a dialog's custom widget area (in button row). .TP -\fCQStyle::SR_ToolBoxTabContents\fR - area for a toolbox tab's icon and label +\fCTQStyle::SR_ToolBoxTabContents\fR - area for a toolbox tab's icon and label .TP -\fCQStyle::SR_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. +\fCTQStyle::SR_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also subRect(). .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStyle::QStyle ()" -Constructs a QStyle. -.SH "QStyle::~QStyle ()\fC [virtual]\fR" +.SH "TQStyle::TQStyle ()" +Constructs a TQStyle. +.SH "TQStyle::~TQStyle ()\fC [virtual]\fR" Destroys the style and frees all allocated resources. -.SH "int QStyle::defaultFrameWidth () const" +.SH "int TQStyle::defaultFrameWidth () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.SH "void QStyle::drawComplexControl ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "void TQStyle::drawComplexControl ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. The \fIsub\fR argument specifies which SubControls to draw. Multiple SubControls can be OR'ed together. The \fIsubActive\fR argument specifies which SubControl is active. .PP The rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates when using drawPrimitive() and drawControl(). @@ -793,9 +793,9 @@ The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. T .TS l - l. ComplexControl .br -& Widget Cast Style Flags Notes Options Notes CC_SpinWidget(const QSpinWidget *) Style_Enabled Set if the spinwidget is enabled. Unused. Style_HasFocus Set if the spinwidget has input focus. CC_ComboBox(const QComboBox *) Style_Enabled Set if the combobox is enabled. Unused. Style_HasFocus Set if the combobox has input focus. CC_ScrollBar(const QScrollBar *) Style_Enabled Set if the scrollbar is enabled. Unused. Style_HasFocus Set if the scrollbar has input focus. CC_Slider(const QSlider *) Style_Enabled Set if the slider is enabled. Unused. Style_HasFocus Set if the slider has input focus. CC_ToolButton(const QToolButton *) Style_Enabled Set if the toolbutton is enabled. QStyleOption ( ArrowType t ) +& Widget Cast Style Flags Notes Options Notes CC_SpinWidget(const QSpinWidget *) Style_Enabled Set if the spinwidget is enabled. Unused. Style_HasFocus Set if the spinwidget has input focus. CC_ComboBox(const QComboBox *) Style_Enabled Set if the combobox is enabled. Unused. Style_HasFocus Set if the combobox has input focus. CC_ScrollBar(const QScrollBar *) Style_Enabled Set if the scrollbar is enabled. Unused. Style_HasFocus Set if the scrollbar has input focus. CC_Slider(const QSlider *) Style_Enabled Set if the slider is enabled. Unused. Style_HasFocus Set if the slider has input focus. CC_ToolButton(const QToolButton *) Style_Enabled Set if the toolbutton is enabled. TQStyleOption ( ArrowType t ) .TP -opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (ie. mouse button or space pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_Raised Set if the button is not down, not on and doesn't contain the mouse when auto-raise is enabled. CC_TitleBar(const TQWidget *) Style_Enabled Set if the titlebar is enabled. Unused. CC_ListView(const QListView *) Style_Enabled Set if the titlebar is enabled. QStyleOption ( QListViewItem *item ) +opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (ie. mouse button or space pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_Raised Set if the button is not down, not on and doesn't contain the mouse when auto-raise is enabled. CC_TitleBar(const TQWidget *) Style_Enabled Set if the titlebar is enabled. Unused. CC_ListView(const QListView *) Style_Enabled Set if the titlebar is enabled. TQStyleOption ( QListViewItem *item ) .TP opt.listViewItem() .TE @@ -803,13 +803,13 @@ opt.listViewItem() .PP See also ComplexControl and SubControl. -.SH "void QStyle::drawComplexControlMask ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "void TQStyle::drawComplexControlMask ( ComplexControl control, QPainter * p, const TQWidget * widget, const QRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draw a bitmask for the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. See drawComplexControl() for an explanation of the use of the \fIwidget\fR and \fIopt\fR arguments. .PP The rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical corrdinates into screen coordinates when using drawPrimitive() and drawControl(). .PP See also drawComplexControl() and ComplexControl. -.SH "void QStyle::drawControl ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "void TQStyle::drawControl ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the ControlElement \fIelement\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. .PP The rect \fIr\fR should be in screen coordinates. @@ -841,7 +841,7 @@ CE_RadioButtonLabel(const QRadioButton *) Style_Enabled Set if the radiobutton i and .PP CE_TabBarLabel(const QTabBar *) -.PP Style_Enabled Set if the tabbar and tab is enabled. QStyleOption ( QTab *t ) +.PP Style_Enabled Set if the tabbar and tab is enabled. TQStyleOption ( QTab *t ) .TP opt.tab() \fIt\fR is the QTab being drawn. Style_Selected Set if the tab is the current tab. CE_ProgressBarGroove(const QProgressBar *) .PP @@ -853,15 +853,15 @@ and .PP CE_ProgressBarLabel(const QProgressBar *) .PP Style_Enabled Set if the progressbar is enabled. Unused. -Style_HasFocus Set if the progressbar has input focus. CE_PopupMenuItem(const QPopupMenu *) Style_Enabled Set if the menuitem is enabled. QStyleOption ( QMenuItem *mi, int tabwidth, int maxpmwidth ) +Style_HasFocus Set if the progressbar has input focus. CE_PopupMenuItem(const QPopupMenu *) Style_Enabled Set if the menuitem is enabled. TQStyleOption ( QMenuItem *mi, int tabwidth, int maxpmwidth ) .TP opt.menuItem() .TP opt.tabWidth() .TP -opt.maxIconWidth() \fImi\fR is the menu item being drawn. QMenuItem is currently an internal class. Style_Active Set if the menuitem is the current item. \fItabwidth\fR is the width of the tab column where key accelerators are drawn. Style_Down Set if the menuitem is down (i.e., the mouse button or space bar is pressed). \fImaxpmwidth\fR is the maximum width of the check column where checkmarks and iconsets are drawn. CE_MenuBarItem(const QMenuBar *) Style_Enabled Set if the menuitem is enabled QStyleOption ( QMenuItem *mi ) +opt.maxIconWidth() \fImi\fR is the menu item being drawn. QMenuItem is currently an internal class. Style_Active Set if the menuitem is the current item. \fItabwidth\fR is the width of the tab column where key accelerators are drawn. Style_Down Set if the menuitem is down (i.e., the mouse button or space bar is pressed). \fImaxpmwidth\fR is the maximum width of the check column where checkmarks and iconsets are drawn. CE_MenuBarItem(const QMenuBar *) Style_Enabled Set if the menuitem is enabled TQStyleOption ( QMenuItem *mi ) .TP -opt.menuItem() \fImi\fR is the menu item being drawn. Style_Active Set if the menuitem is the current item. Style_Down Set if the menuitem is down (i.e., a mouse button or the space bar is pressed). Style_HasFocus Set if the menubar has input focus. CE_ToolButtonLabel(const QToolButton *) Style_Enabled Set if the toolbutton is enabled. QStyleOption ( ArrowType t ) +opt.menuItem() \fImi\fR is the menu item being drawn. Style_Active Set if the menuitem is the current item. Style_Down Set if the menuitem is down (i.e., a mouse button or the space bar is pressed). Style_HasFocus Set if the menubar has input focus. CE_ToolButtonLabel(const QToolButton *) Style_Enabled Set if the toolbutton is enabled. TQStyleOption ( ArrowType t ) .TP opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (i.e., a mouse button or the space is pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_MouseOver Set if the mouse pointer is over the toolbutton. Style_Raised .TE @@ -869,17 +869,17 @@ opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arro .PP See also ControlElement and StyleFlags. -.SH "void QStyle::drawControlMask ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "void TQStyle::drawControlMask ( ControlElement element, QPainter * p, const TQWidget * widget, const QRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draw a bitmask for the ControlElement \fIelement\fR using the painter \fIp\fR in the area \fIr\fR. See drawControl() for an explanation of the use of the \fIwidget\fR and \fIopt\fR arguments. .PP The rect \fIr\fR should be in screen coordinates. .PP See also drawControl() and ControlElement. -.SH "void QStyle::drawItem ( QPainter * p, const QRect & r, int flags, const QColorGroup & g, bool enabled, const QPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const\fC [virtual]\fR" +.SH "void TQStyle::drawItem ( QPainter * p, const QRect & r, int flags, const QColorGroup & g, bool enabled, const QPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const\fC [virtual]\fR" Draws the \fItext\fR or \fIpixmap\fR in rectangle \fIr\fR using painter \fIp\fR and color group \fIg\fR. The pen color is specified with \fIpenColor\fR. The \fIenabled\fR bool indicates whether or not the item is enabled; when reimplementing this bool should influence how the item is drawn. If \fIlen\fR is -1 (the default) all the \fItext\fR is drawn; otherwise only the first \fIlen\fR characters of \fItext\fR are drawn. The text is aligned and wrapped according to the alignment \fIflags\fR (see TQt::AlignmentFlags). .PP By default, if both the text and the pixmap are not null, the pixmap is drawn and the text is ignored. -.SH "void QStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg, SFlags flags = Style_Default, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "void TQStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the style PrimitiveElement \fIpe\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. .PP The rect \fIr\fR should be in screen coordinates. @@ -892,25 +892,25 @@ The \fIopt\fR argument can be used to control how various PrimitiveElements are .PP
    .nf .TS -l - l. PrimitiveElement Options Notes PE_FocusRect QStyleOption ( const TQColor & bg ) +l - l. PrimitiveElement Options Notes PE_FocusRect TQStyleOption ( const TQColor & bg ) .TP -opt.color() \fIbg\fR is the background color on which the focus rect is being drawn. PE_Panel QStyleOption ( int linewidth, int midlinewidth ) +opt.color() \fIbg\fR is the background color on which the focus rect is being drawn. PE_Panel TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP -opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelPopup QStyleOption ( int linewidth, int midlinewidth ) +opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelPopup TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP -opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelMenuBar QStyleOption ( int linewidth, int midlinewidth ) +opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelMenuBar TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP -opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelDockWindow QStyleOption ( int linewidth, int midlinewidth ) +opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelDockWindow TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP -opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_GroupBoxFrame QStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) +opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_GroupBoxFrame TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) .TP opt.lineWidth() .TP @@ -928,13 +928,13 @@ For all other PrimitiveElements, \fIopt\fR is unused. See also StyleFlags. .PP Example: themes/wood.cpp. -.SH "QRect QStyle::itemRect ( QPainter * p, const QRect & r, int flags, bool enabled, const QPixmap * pixmap, const TQString & text, int len = -1 ) const\fC [virtual]\fR" +.SH "QRect TQStyle::itemRect ( QPainter * p, const QRect & r, int flags, bool enabled, const QPixmap * pixmap, const TQString & text, int len = -1 ) const\fC [virtual]\fR" Returns the appropriate area (see below) within rectangle \fIr\fR in which to draw the \fItext\fR or \fIpixmap\fR using painter \fIp\fR. If \fIlen\fR is -1 (the default) all the \fItext\fR is drawn; otherwise only the first \fIlen\fR characters of \fItext\fR are drawn. The text is aligned in accordance with the alignment \fIflags\fR (see TQt::AlignmentFlags). The \fIenabled\fR bool indicates whether or not the item is enabled. .PP If \fIr\fR is larger than the area needed to render the \fItext\fR the rectangle that is returned will be offset within \fIr\fR in accordance with the alignment \fIflags\fR. For example if \fIflags\fR is AlignCenter the returned rectangle will be centered within \fIr\fR. If \fIr\fR is smaller than the area needed the rectangle that is returned will be \fIlarger\fR than \fIr\fR (the smallest rectangle large enough to render the \fItext\fR or \fIpixmap\fR). .PP By default, if both the text and the pixmap are not null, the pixmap is drawn and the text is ignored. -.SH "int QStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const\fC [pure virtual]\fR" +.SH "int TQStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const\fC [pure virtual]\fR" Returns the pixel metric for \fImetric\fR. The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fImetric\fR. Note that \fIwidget\fR may be zero even for PixelMetrics that can make use of \fIwidget\fR. See the table below for the appropriate \fIwidget\fR casts: .PP
    .nf @@ -943,62 +943,62 @@ l - l. PixelMetric Widget Cast PM_SliderControlThickness (const QSlider *) PM_Sl .TE .fi
    -.SH "void QStyle::polish ( TQWidget * )\fC [virtual]\fR" +.SH "void TQStyle::polish ( TQWidget * )\fC [virtual]\fR" Initializes the appearance of a widget. .PP This function is called for every widget at some point after it has been fully created but just \fIbefore\fR it is shown the very first time. .PP Reasonable actions in this function might be to call TQWidget::setBackgroundMode() for the widget. An example of highly unreasonable use would be setting the geometry! Reimplementing this function gives you a back-door through which you can change the appearance of a widget. With TQt 3.0's style engine you will rarely need to write your own polish(); instead reimplement drawItem(), drawPrimitive(), etc. .PP -The TQWidget::inherits() function may provide enough information to allow class-specific customizations. But be careful not to hard-code things too much because new QStyle subclasses are expected to work reasonably with all current and \fIfuture\fR widgets. +The TQWidget::inherits() function may provide enough information to allow class-specific customizations. But be careful not to hard-code things too much because new TQStyle subclasses are expected to work reasonably with all current and \fIfuture\fR widgets. .PP See also unPolish(). -.SH "void QStyle::polish ( QApplication * )\fC [virtual]\fR" +.SH "void TQStyle::polish ( QApplication * )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Late initialization of the QApplication object. .PP See also unPolish(). -.SH "void QStyle::polish ( QPalette & )\fC [virtual]\fR" +.SH "void TQStyle::polish ( QPalette & )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP The style may have certain requirements for color palettes. In this function it has the chance to change the palette according to these requirements. .PP See also QPalette and QApplication::setPalette(). -.SH "void QStyle::polishPopupMenu ( QPopupMenu * )\fC [pure virtual]\fR" +.SH "void TQStyle::polishPopupMenu ( QPopupMenu * )\fC [pure virtual]\fR" Polishes the popup menu according to the GUI style. This usually means setting the mouse tracking (QPopupMenu::setMouseTracking()) and whether the menu is checkable by default (QPopupMenu::setCheckable()). -.SH "SubControl QStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const QPoint & pos, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "SubControl TQStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const QPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the SubControl for \fIwidget\fR at the point \fIpos\fR. The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See drawComplexControl() for an explanation of the \fIwidget\fR and \fIopt\fR arguments. .PP Note that \fIpos\fR is passed in screen coordinates. When using querySubControlMetrics() to check for hits and misses, use visualRect() to change the logical coordinates into screen coordinates. .PP See also drawComplexControl(), ComplexControl, SubControl, and querySubControlMetrics(). -.SH "QRect QStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "QRect TQStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the rect for the SubControl \fIsubcontrol\fR for \fIwidget\fR in logical coordinates. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See drawComplexControl() for an explanation of the \fIwidget\fR and \fIopt\fR arguments. .PP See also drawComplexControl(), ComplexControl, and SubControl. -.SH "QSize QStyle::scrollBarExtent () const" +.SH "QSize TQStyle::scrollBarExtent () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.SH "QSize QStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const QSize & contentsSize, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "QSize TQStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const QSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the size of \fIwidget\fR based on the contents size \fIcontentsSize\fR. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontents\fR. The \fIopt\fR argument can be used to pass extra information required when calculating the size. Note that \fIopt\fR may be the default value even for ContentsTypes that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage: .PP
    .nf .TS -l - l. ContentsType Widget Cast Options Notes CT_PushButton (const QPushButton *) Unused. CT_CheckBox (const QCheckBox *) Unused. CT_RadioButton (const QRadioButton *) Unused. CT_ToolButton (const QToolButton *) Unused. CT_ComboBox (const QComboBox *) Unused. CT_Splitter (const QSplitter *) Unused. CT_DockWindow (const QDockWindow *) Unused. CT_ProgressBar (const QProgressBar *) Unused. CT_PopupMenuItem (const QPopupMenu *) QStyleOption ( QMenuItem *mi ) +l - l. ContentsType Widget Cast Options Notes CT_PushButton (const QPushButton *) Unused. CT_CheckBox (const QCheckBox *) Unused. CT_RadioButton (const QRadioButton *) Unused. CT_ToolButton (const QToolButton *) Unused. CT_ComboBox (const QComboBox *) Unused. CT_Splitter (const QSplitter *) Unused. CT_DockWindow (const QDockWindow *) Unused. CT_ProgressBar (const QProgressBar *) Unused. CT_PopupMenuItem (const QPopupMenu *) TQStyleOption ( QMenuItem *mi ) .TP opt.menuItem() .TE .fi
    -.SH "int QStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const QStyleOption & opt = QStyleOption::Default, QStyleHintReturn * returnData = 0 ) const\fC [pure virtual]\fR" +.SH "int TQStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const\fC [pure virtual]\fR" Returns the style hint \fIstylehint\fR for \fIwidget\fR. Currently, \fIwidget\fR, \fIopt\fR, and \fIreturnData\fR are unused; they're included to allow for future enhancements. .PP For an explanation of the return value see StyleHint. -.SH "QPixmap QStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR" +.SH "QPixmap TQStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns a pixmap for \fIstylepixmap\fR. .PP The \fIopt\fR argument can be used to pass extra information required when drawing the ControlElement. Note that \fIopt\fR may be the default value even for StylePixmaps that can make use of the extra options. Currently, the \fIopt\fR argument is unused. @@ -1013,7 +1013,7 @@ l - l. StylePixmap Widget Cast SP_TitleBarMinButton (const TQWidget *) SP_TitleB
    .PP See also StylePixmap. -.SH "QRect QStyle::subRect ( SubRect subrect, const TQWidget * widget ) const\fC [pure virtual]\fR" +.SH "QRect TQStyle::subRect ( SubRect subrect, const TQWidget * widget ) const\fC [pure virtual]\fR" Returns the sub-area \fIsubrect\fR for the \fIwidget\fR in logical coordinates. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIsubrect\fR. See the table below for the appropriate \fIwidget\fR casts: @@ -1038,25 +1038,25 @@ The tear-off handle (SR_DockWindowHandleRect) for QDockWindow is a private class .fi .PP See also SubRect. -.SH "void QStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const" +.SH "void TQStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.SH "void QStyle::unPolish ( TQWidget * )\fC [virtual]\fR" +.SH "void TQStyle::unPolish ( TQWidget * )\fC [virtual]\fR" Undoes the initialization of a widget's appearance. .PP This function is the counterpart to polish. It is called for every polished widget when the style is dynamically changed. The former style has to unpolish its settings before the new style can polish them again. .PP See also polish(). -.SH "void QStyle::unPolish ( QApplication * )\fC [virtual]\fR" +.SH "void TQStyle::unPolish ( QApplication * )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Undoes the application polish. .PP See also polish(). -.SH "QRect QStyle::visualRect ( const QRect & logical, const TQWidget * w )\fC [static]\fR" +.SH "QRect TQStyle::visualRect ( const QRect & logical, const TQWidget * w )\fC [static]\fR" Returns the rect \fIlogical\fR in screen coordinates. The bounding rect for widget \fIw\fR is used to perform the translation. This function is provided to aid style implementors in supporting right-to-left mode. .PP See also QApplication::reverseLayout(). -.SH "QRect QStyle::visualRect ( const QRect & logical, const QRect & bounding )\fC [static]\fR" +.SH "QRect TQStyle::visualRect ( const QRect & logical, const QRect & bounding )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the rect \fIlogical\fR in screen coordinates. The rect \fIbounding\fR is used to perform the translation. This function is provided to aid style implementors in supporting right-to-left mode. @@ -1064,7 +1064,7 @@ Returns the rect \fIlogical\fR in screen coordinates. The rect \fIbounding\fR is See also QApplication::reverseLayout(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqstyle.html +.BR http://doc.trolltech.com/tqstyle.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqstylefactory.3qt b/doc/man/man3/tqstylefactory.3qt index caa2cc05..23b51abc 100644 --- a/doc/man/man3/tqstylefactory.3qt +++ b/doc/man/man3/tqstylefactory.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStyleFactory 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStyleFactory 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,28 +7,28 @@ .ad l .nh .SH NAME -QStyleFactory \- Creates QStyle objects +TQStyleFactory \- Creates TQStyle objects .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Static Public Members" -
  • TQStringList \fBkeys\fR ()
  • QStyle * \fBcreate\fR ( const TQString & key ) +
  • TQStringList \fBkeys\fR ()
  • TQStyle * \fBcreate\fR ( const TQString & key ) .SH DESCRIPTION -The QStyleFactory class creates QStyle objects. +The TQStyleFactory class creates TQStyle objects. .PP -The style factory creates a QStyle object for a given key with QStyleFactory::create(key). +The style factory creates a TQStyle object for a given key with TQStyleFactory::create(key). .PP -The styles are either built-in or dynamically loaded from a style plugin (see QStylePlugin). +The styles are either built-in or dynamically loaded from a style plugin (see TQStylePlugin). .PP -QStyleFactory::keys() returns a list of valid keys, typically including "Windows", "Motif", "CDE", "MotifPlus", "Platinum"," SGI" and "Compact". Depending on the platform, "WindowsXP"," Aqua" or "Macintosh" may be available. +TQStyleFactory::keys() returns a list of valid keys, typically including "Windows", "Motif", "CDE", "MotifPlus", "Platinum"," SGI" and "Compact". Depending on the platform, "WindowsXP"," Aqua" or "Macintosh" may be available. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStyle * QStyleFactory::create ( const TQString & key )\fC [static]\fR" -Creates a QStyle object that matches \fIkey\fR case-insensitively. This is either a built-in style, or a style from a style plugin. +.SH "TQStyle * TQStyleFactory::create ( const TQString & key )\fC [static]\fR" +Creates a TQStyle object that matches \fIkey\fR case-insensitively. This is either a built-in style, or a style from a style plugin. .PP See also keys(). .PP Example: themes/wood.cpp. -.SH "TQStringList QStyleFactory::keys ()\fC [static]\fR" +.SH "TQStringList TQStyleFactory::keys ()\fC [static]\fR" Returns the list of keys this factory can create styles for. .PP See also create(). @@ -36,7 +36,7 @@ See also create(). Example: themes/themes.cpp. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqstylefactory.html +.BR http://doc.trolltech.com/tqstylefactory.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqstyleoption.3qt b/doc/man/man3/tqstyleoption.3qt index 4ab61430..1fa3764c 100644 --- a/doc/man/man3/tqstyleoption.3qt +++ b/doc/man/man3/tqstyleoption.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStyleOption 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStyleOption 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,9 +7,9 @@ .ad l .nh .SH NAME -QStyleOption \- Optional parameters for QStyle functions +TQStyleOption \- Optional parameters for TQStyle functions .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -17,46 +17,46 @@ QStyleOption \- Optional parameters for QStyle functions .BI "enum \fBStyleOptionDefault\fR { Default }" .br .ti -1c -.BI "\fBQStyleOption\fR ( StyleOptionDefault = Default )" +.BI "\fBTQStyleOption\fR ( StyleOptionDefault = Default )" .br .ti -1c -.BI "\fBQStyleOption\fR ( int in1 )" +.BI "\fBTQStyleOption\fR ( int in1 )" .br .ti -1c -.BI "\fBQStyleOption\fR ( int in1, int in2 )" +.BI "\fBTQStyleOption\fR ( int in1, int in2 )" .br .ti -1c -.BI "\fBQStyleOption\fR ( int in1, int in2, int in3, int in4 )" +.BI "\fBTQStyleOption\fR ( int in1, int in2, int in3, int in4 )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QMenuItem * m )" +.BI "\fBTQStyleOption\fR ( QMenuItem * m )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QMenuItem * m, int in1 )" +.BI "\fBTQStyleOption\fR ( QMenuItem * m, int in1 )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QMenuItem * m, int in1, int in2 )" +.BI "\fBTQStyleOption\fR ( QMenuItem * m, int in1, int in2 )" .br .ti -1c -.BI "\fBQStyleOption\fR ( const TQColor & c )" +.BI "\fBTQStyleOption\fR ( const TQColor & c )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QTab * t )" +.BI "\fBTQStyleOption\fR ( QTab * t )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QListViewItem * i )" +.BI "\fBTQStyleOption\fR ( QListViewItem * i )" .br .ti -1c -.BI "\fBQStyleOption\fR ( QCheckListItem * i )" +.BI "\fBTQStyleOption\fR ( QCheckListItem * i )" .br .ti -1c -.BI "\fBQStyleOption\fR ( TQt::ArrowType a )" +.BI "\fBTQStyleOption\fR ( TQt::ArrowType a )" .br .ti -1c -.BI "\fBQStyleOption\fR ( const QRect & r )" +.BI "\fBTQStyleOption\fR ( const QRect & r )" .br .ti -1c -.BI "\fBQStyleOption\fR ( TQWidget * w )" +.BI "\fBTQStyleOption\fR ( TQWidget * w )" .br .ti -1c .BI "bool \fBisDefault\fR () const" @@ -111,93 +111,93 @@ QStyleOption \- Optional parameters for QStyle functions .br .in -1c .SH DESCRIPTION -The QStyleOption class specifies optional parameters for QStyle functions. +The TQStyleOption class specifies optional parameters for TQStyle functions. .PP -Some QStyle functions take an optional argument specifying extra information that is required for a paritical primitive or control. So that the QStyle class can be extended, QStyleOption is used to provide a variable-argument for these options. +Some TQStyle functions take an optional argument specifying extra information that is required for a paritical primitive or control. So that the TQStyle class can be extended, TQStyleOption is used to provide a variable-argument for these options. .PP -The QStyleOption class has constructors for each type of optional argument, and this set of constructors may be extended in future TQt releases. There are also corresponding access functions that return the optional arguments: these too may be extended. +The TQStyleOption class has constructors for each type of optional argument, and this set of constructors may be extended in future TQt releases. There are also corresponding access functions that return the optional arguments: these too may be extended. .PP -For each constructor, you should refer to the documentation of the QStyle functions to see the meaning of the arguments. +For each constructor, you should refer to the documentation of the TQStyle functions to see the meaning of the arguments. .PP -When calling QStyle functions from your own widgets, you must only pass the default QStyleOption or the argument that QStyle is documented to accept. For example, if the function expects QStyleOption(QMenuItem *, int), passing QStyleOption(QMenuItem *) leaves the optional integer argument uninitialized. +When calling TQStyle functions from your own widgets, you must only pass the default TQStyleOption or the argument that TQStyle is documented to accept. For example, if the function expects TQStyleOption(QMenuItem *, int), passing TQStyleOption(QMenuItem *) leaves the optional integer argument uninitialized. .PP -When subclassing QStyle, you must similarly only expect the default or documented arguments. The other arguments will have uninitialized values. +When subclassing TQStyle, you must similarly only expect the default or documented arguments. The other arguments will have uninitialized values. .PP -If you make your own QStyle subclasses and your own widgets, you can make a subclass of QStyleOption to pass additional arguments to your QStyle subclass. You will need to cast the "const QStyleOption&" argument to your subclass, so be sure your style has been called from your widget. +If you make your own TQStyle subclasses and your own widgets, you can make a subclass of TQStyleOption to pass additional arguments to your TQStyle subclass. You will need to cast the "const TQStyleOption&" argument to your subclass, so be sure your style has been called from your widget. .PP See also Widget Appearance and Style. .SS "Member Type Documentation" -.SH "QStyleOption::StyleOptionDefault" -This enum value can be passed as the optional argument to any QStyle function. +.SH "TQStyleOption::StyleOptionDefault" +This enum value can be passed as the optional argument to any TQStyle function. .TP -\fCQStyleOption::Default\fR +\fCTQStyleOption::Default\fR .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStyleOption::QStyleOption ( StyleOptionDefault = Default )" -The default option. This can always be passed as the optional argument to QStyle functions. -.SH "QStyleOption::QStyleOption ( int in1 )" +.SH "TQStyleOption::TQStyleOption ( StyleOptionDefault = Default )" +The default option. This can always be passed as the optional argument to TQStyle functions. +.SH "TQStyleOption::TQStyleOption ( int in1 )" Pass one integer, \fIin1\fR. For example, headerSection. -.SH "QStyleOption::QStyleOption ( int in1, int in2 )" +.SH "TQStyleOption::TQStyleOption ( int in1, int in2 )" Pass two integers, \fIin1\fR and \fIin2\fR. For example, linewidth and midlinewidth. -.SH "QStyleOption::QStyleOption ( int in1, int in2, int in3, int in4 )" +.SH "TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 )" Pass four integers, \fIin1\fR, \fIin2\fR, \fIin3\fR and \fIin4\fR. -.SH "QStyleOption::QStyleOption ( QMenuItem * m )" +.SH "TQStyleOption::TQStyleOption ( QMenuItem * m )" Pass a menu item, \fIm\fR. -.SH "QStyleOption::QStyleOption ( QMenuItem * m, int in1 )" +.SH "TQStyleOption::TQStyleOption ( QMenuItem * m, int in1 )" Pass a menu item and an integer, \fIm\fR and \fIin1\fR. -.SH "QStyleOption::QStyleOption ( QMenuItem * m, int in1, int in2 )" +.SH "TQStyleOption::TQStyleOption ( QMenuItem * m, int in1, int in2 )" Pass a menu item and two integers, \fIm\fR, \fIin1\fR and \fIin2\fR. -.SH "QStyleOption::QStyleOption ( const TQColor & c )" +.SH "TQStyleOption::TQStyleOption ( const TQColor & c )" Pass a color, \fIc\fR. -.SH "QStyleOption::QStyleOption ( QTab * t )" +.SH "TQStyleOption::TQStyleOption ( QTab * t )" Pass a QTab, \fIt\fR. -.SH "QStyleOption::QStyleOption ( QListViewItem * i )" +.SH "TQStyleOption::TQStyleOption ( QListViewItem * i )" Pass a QListViewItem, \fIi\fR. -.SH "QStyleOption::QStyleOption ( QCheckListItem * i )" +.SH "TQStyleOption::TQStyleOption ( QCheckListItem * i )" Pass a QCheckListItem, \fIi\fR. -.SH "QStyleOption::QStyleOption ( TQt::ArrowType a )" +.SH "TQStyleOption::TQStyleOption ( TQt::ArrowType a )" Pass an TQt::ArrowType, \fIa\fR. -.SH "QStyleOption::QStyleOption ( const QRect & r )" +.SH "TQStyleOption::TQStyleOption ( const QRect & r )" Pass a QRect, \fIr\fR. -.SH "QStyleOption::QStyleOption ( TQWidget * w )" +.SH "TQStyleOption::TQStyleOption ( TQWidget * w )" Pass a TQWidget, \fIw\fR. -.SH "TQt::ArrowType QStyleOption::arrowType () const" +.SH "TQt::ArrowType TQStyleOption::arrowType () const" Returns an arrow type if the appropriate constructor was called; otherwise the return value is undefined. -.SH "QCheckListItem * QStyleOption::checkListItem () const" +.SH "QCheckListItem * TQStyleOption::checkListItem () const" Returns a check list item if the appropriate constructor was called; otherwise the return value is undefined. -.SH "const TQColor & QStyleOption::color () const" +.SH "const TQColor & TQStyleOption::color () const" Returns a color if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::day () const" +.SH "int TQStyleOption::day () const" Returns the index of the day in the month if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::frameShadow () const" +.SH "int TQStyleOption::frameShadow () const" Returns a QFrame::Shadow value if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::frameShape () const" +.SH "int TQStyleOption::frameShape () const" Returns a QFrame::Shape value if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::headerSection () const" +.SH "int TQStyleOption::headerSection () const" Returns the header section if the appropriate constructor was called; otherwise the return value is undefined. -.SH "bool QStyleOption::isDefault () const" +.SH "bool TQStyleOption::isDefault () const" Returns TRUE if the option was constructed with the default constructor; otherwise returns FALSE. -.SH "int QStyleOption::lineWidth () const" +.SH "int TQStyleOption::lineWidth () const" Returns the line width if the appropriate constructor was called; otherwise the return value is undefined. -.SH "QListViewItem * QStyleOption::listViewItem () const" +.SH "QListViewItem * TQStyleOption::listViewItem () const" Returns a QListView item if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::maxIconWidth () const" +.SH "int TQStyleOption::maxIconWidth () const" Returns the maximum width of the menu item check area if the appropriate constructor was called; otherwise the return value is undefined. -.SH "QMenuItem * QStyleOption::menuItem () const" +.SH "QMenuItem * TQStyleOption::menuItem () const" Returns a menu item if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::midLineWidth () const" +.SH "int TQStyleOption::midLineWidth () const" Returns the mid-line width if the appropriate constructor was called; otherwise the return value is undefined. -.SH "QRect QStyleOption::rect () const" +.SH "QRect TQStyleOption::rect () const" Returns a rectangle if the appropriate constructor was called; otherwise the return value is undefined. -.SH "QTab * QStyleOption::tab () const" +.SH "QTab * TQStyleOption::tab () const" Returns a QTabBar tab if the appropriate constructor was called; otherwise the return value is undefined. -.SH "int QStyleOption::tabWidth () const" +.SH "int TQStyleOption::tabWidth () const" Returns the tab indent width if the appropriate constructor was called; otherwise the return value is undefined. -.SH "TQWidget * QStyleOption::widget () const" +.SH "TQWidget * TQStyleOption::widget () const" Returns a pointer to a widget if the appropriate constructor was called; otherwise the return value is undefined. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qstyleoption.html +.BR http://doc.trolltech.com/tqstyleoption.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqstyleplugin.3qt b/doc/man/man3/tqstyleplugin.3qt index 306bec48..ca3ef648 100644 --- a/doc/man/man3/tqstyleplugin.3qt +++ b/doc/man/man3/tqstyleplugin.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStylePlugin 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStylePlugin 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,45 +7,45 @@ .ad l .nh .SH NAME -QStylePlugin \- Abstract base for custom QStyle plugins +TQStylePlugin \- Abstract base for custom TQStyle plugins .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQStylePlugin\fR ()" +.BI "\fBTQStylePlugin\fR ()" .br .ti -1c -.BI "\fB~QStylePlugin\fR ()" +.BI "\fB~TQStylePlugin\fR ()" .br .ti -1c .BI "virtual TQStringList \fBkeys\fR () const = 0" .br .ti -1c -.BI "virtual QStyle * \fBcreate\fR ( const TQString & key ) = 0" +.BI "virtual TQStyle * \fBcreate\fR ( const TQString & key ) = 0" .br .in -1c .SH DESCRIPTION -The QStylePlugin class provides an abstract base for custom QStyle plugins. +The TQStylePlugin class provides an abstract base for custom TQStyle plugins. .PP -The style plugin is a simple plugin interface that makes it easy to create custom styles that can be loaded dynamically into applications with a QStyleFactory. +The style plugin is a simple plugin interface that makes it easy to create custom styles that can be loaded dynamically into applications with a TQStyleFactory. .PP Writing a style plugin is achieved by subclassing this base class, reimplementing the pure virtual functions keys() and create(), and exporting the class with the \fCQ_EXPORT_PLUGIN\fR macro. See the plugins documentation for an example. .PP See also Plugins. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStylePlugin::QStylePlugin ()" +.SH "TQStylePlugin::TQStylePlugin ()" Constructs a style plugin. This is invoked automatically by the \fCQ_EXPORT_PLUGIN\fR macro. -.SH "QStylePlugin::~QStylePlugin ()" +.SH "TQStylePlugin::~TQStylePlugin ()" Destroys the style plugin. .PP You never have to call this explicitly. TQt destroys a plugin automatically when it is no longer used. -.SH "QStyle * QStylePlugin::create ( const TQString & key )\fC [pure virtual]\fR" -Creates and returns a QStyle object for the style key \fIkey\fR. The style key is usually the class name of the required style. +.SH "TQStyle * TQStylePlugin::create ( const TQString & key )\fC [pure virtual]\fR" +Creates and returns a TQStyle object for the style key \fIkey\fR. The style key is usually the class name of the required style. .PP See also keys(). -.SH "TQStringList QStylePlugin::keys () const\fC [pure virtual]\fR" +.SH "TQStringList TQStylePlugin::keys () const\fC [pure virtual]\fR" Returns the list of style keys this plugin supports. .PP These keys are usually the class names of the custom styles that are implemented in the plugin. @@ -53,7 +53,7 @@ These keys are usually the class names of the custom styles that are implemented See also create(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqstyleplugin.html +.BR http://doc.trolltech.com/tqstyleplugin.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqstylesheet.3qt b/doc/man/man3/tqstylesheet.3qt index 994e8ddd..77c7dc4e 100644 --- a/doc/man/man3/tqstylesheet.3qt +++ b/doc/man/man3/tqstylesheet.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStyleSheet 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStyleSheet 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,25 +7,25 @@ .ad l .nh .SH NAME -QStyleSheet \- Collection of styles for rich text rendering and a generator of tags +TQStyleSheet \- Collection of styles for rich text rendering and a generator of tags .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits TQObject. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQStyleSheet\fR ( TQObject * parent = 0, const char * name = 0 )" +.BI "\fBTQStyleSheet\fR ( TQObject * parent = 0, const char * name = 0 )" .br .ti -1c -.BI "virtual \fB~QStyleSheet\fR ()" +.BI "virtual \fB~TQStyleSheet\fR ()" .br .ti -1c -.BI "QStyleSheetItem * \fBitem\fR ( const TQString & name )" +.BI "TQStyleSheetItem * \fBitem\fR ( const TQString & name )" .br .ti -1c -.BI "const QStyleSheetItem * \fBitem\fR ( const TQString & name ) const" +.BI "const TQStyleSheetItem * \fBitem\fR ( const TQString & name ) const" .br .ti -1c .BI "virtual TQTextCustomItem * \fBtag\fR ( const TQString & name, const TQMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const" @@ -40,27 +40,27 @@ Inherits TQObject. .SS "Static Public Members" .in +1c .ti -1c -.BI "QStyleSheet * \fBdefaultSheet\fR ()" +.BI "TQStyleSheet * \fBdefaultSheet\fR ()" .br .ti -1c -.BI "void \fBsetDefaultSheet\fR ( QStyleSheet * sheet )" +.BI "void \fBsetDefaultSheet\fR ( TQStyleSheet * sheet )" .br .ti -1c .BI "TQString \fBescape\fR ( const TQString & plain )" .br .ti -1c -.BI "TQString \fBconvertFromPlainText\fR ( const TQString & plain, QStyleSheetItem::WhiteSpaceMode mode = QStyleSheetItem::WhiteSpacePre )" +.BI "TQString \fBconvertFromPlainText\fR ( const TQString & plain, TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre )" .br .ti -1c .BI "bool \fBmightBeRichText\fR ( const TQString & text )" .br .in -1c .SH DESCRIPTION -The QStyleSheet class is a collection of styles for rich text rendering and a generator of tags. +The TQStyleSheet class is a collection of styles for rich text rendering and a generator of tags. .PP -By creating QStyleSheetItem objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a TQTextEdit or a TQTextBrowser. However, QLabel, QWhatsThis and QMessageBox also support it, and other classes are likely to follow. With QSimpleRichText it is possible to use the rich text renderer for custom widgets as well. +By creating TQStyleSheetItem objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a TQTextEdit or a TQTextBrowser. However, QLabel, QWhatsThis and QMessageBox also support it, and other classes are likely to follow. With QSimpleRichText it is possible to use the rich text renderer for custom widgets as well. .PP -The default QStyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings (i.e. inline styles), special elements such as horizontal lines or images, and other tags. In addition, rich text supports simple HTML tables. +The default TQStyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings (i.e. inline styles), special elements such as horizontal lines or images, and other tags. In addition, rich text supports simple HTML tables. .PP The structuring tags are
    .nf .TS @@ -136,58 +136,58 @@ A table row. This is only valid within a A table header cell. Similar to A table .PP See also Graphics Classes, Help System, and Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStyleSheet::QStyleSheet ( TQObject * parent = 0, const char * name = 0 )" +.SH "TQStyleSheet::TQStyleSheet ( TQObject * parent = 0, const char * name = 0 )" Creates a style sheet called \fIname\fR, with parent \fIparent\fR. Like any TQObject it will be deleted when its parent is destroyed (if the child still exists). .PP By default the style sheet has the tag definitions defined above. -.SH "QStyleSheet::~QStyleSheet ()\fC [virtual]\fR" +.SH "TQStyleSheet::~TQStyleSheet ()\fC [virtual]\fR" Destroys the style sheet. All styles inserted into the style sheet will be deleted. -.SH "TQString QStyleSheet::convertFromPlainText ( const TQString & plain, QStyleSheetItem::WhiteSpaceMode mode = QStyleSheetItem::WhiteSpacePre )\fC [static]\fR" +.SH "TQString TQStyleSheet::convertFromPlainText ( const TQString & plain, TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre )\fC [static]\fR" Auxiliary function. Converts the plain text string \fIplain\fR to a rich text formatted paragraph while preserving most of its look. .PP -\fImode\fR defines the whitespace mode. Possible values are QStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces preserved) and QStyleSheetItem::WhiteSpaceNormal (wrapping, simplified whitespaces). +\fImode\fR defines the whitespace mode. Possible values are TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces preserved) and TQStyleSheetItem::WhiteSpaceNormal (wrapping, simplified whitespaces). .PP See also escape(). .PP Examples: .)l action/application.cpp, application/application.cpp, and mdi/application.cpp. -.SH "QStyleSheet * QStyleSheet::defaultSheet ()\fC [static]\fR" +.SH "TQStyleSheet * TQStyleSheet::defaultSheet ()\fC [static]\fR" Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as QSimpleRichText, QWhatsThis and QMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, TQTextEdit and TQTextBrowser. .PP See also setDefaultSheet(). -.SH "void QStyleSheet::error ( const TQString & msg ) const\fC [virtual]\fR" +.SH "void TQStyleSheet::error ( const TQString & msg ) const\fC [virtual]\fR" This virtual function is called when an error occurs when processing rich text. Reimplement it if you need to catch error messages. .PP Errors might occur if some rich text strings contain tags that are not understood by the stylesheet, if some tags are nested incorrectly, or if tags are not closed properly. .PP \fImsg\fR is the error message. -.SH "TQString QStyleSheet::escape ( const TQString & plain )\fC [static]\fR" +.SH "TQString TQStyleSheet::escape ( const TQString & plain )\fC [static]\fR" Auxiliary function. Converts the plain text string \fIplain\fR to a rich text formatted string with any HTML meta-characters escaped. .PP See also convertFromPlainText(). -.SH "QStyleSheetItem * QStyleSheet::item ( const TQString & name )" +.SH "TQStyleSheetItem * TQStyleSheet::item ( const TQString & name )" Returns the style called \fIname\fR or 0 if there is no such style. -.SH "const QStyleSheetItem * QStyleSheet::item ( const TQString & name ) const" +.SH "const TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the style called \fIname\fR or 0 if there is no such style (const version) -.SH "bool QStyleSheet::mightBeRichText ( const TQString & text )\fC [static]\fR" +.SH "bool TQStyleSheet::mightBeRichText ( const TQString & text )\fC [static]\fR" Returns TRUE if the string \fItext\fR is likely to be rich text; otherwise returns FALSE. .PP This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee. -.SH "void QStyleSheet::scaleFont ( QFont & font, int logicalSize ) const\fC [virtual]\fR" +.SH "void TQStyleSheet::scaleFont ( QFont & font, int logicalSize ) const\fC [virtual]\fR" Scales the font \fIfont\fR to the appropriate physical point size corresponding to the logical font size \fIlogicalSize\fR. .PP When calling this function, \fIfont\fR has a point size corresponding to the logical font size 3. .PP Logical font sizes range from 1 to 7, with 1 being the smallest. .PP -See also QStyleSheetItem::logicalFontSize(), QStyleSheetItem::logicalFontSizeStep(), and QFont::setPointSize(). -.SH "void QStyleSheet::setDefaultSheet ( QStyleSheet * sheet )\fC [static]\fR" -Sets the application-wide default style sheet to \fIsheet\fR, deleting any style sheet previously set. The ownership is transferred to QStyleSheet. +See also TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), and QFont::setPointSize(). +.SH "void TQStyleSheet::setDefaultSheet ( TQStyleSheet * sheet )\fC [static]\fR" +Sets the application-wide default style sheet to \fIsheet\fR, deleting any style sheet previously set. The ownership is transferred to TQStyleSheet. .PP See also defaultSheet(). -.SH "TQTextCustomItem * QStyleSheet::tag ( const TQString & name, const TQMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const\fC [virtual]\fR" +.SH "TQTextCustomItem * TQStyleSheet::tag ( const TQString & name, const TQMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const\fC [virtual]\fR" \fBThis function is under development and is subject to change.\fR .PP Generates an internal object for the tag called \fIname\fR, given the attributes \fIattr\fR, and using additional information provided by the mime source factory \fIfactory\fR. @@ -199,7 +199,7 @@ Generates an internal object for the tag called \fIname\fR, given the attributes This function should not be used in application code. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqstylesheet.html +.BR http://doc.trolltech.com/tqstylesheet.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqstylesheetitem.3qt b/doc/man/man3/tqstylesheetitem.3qt index 8cd82f49..cc06bf22 100644 --- a/doc/man/man3/tqstylesheetitem.3qt +++ b/doc/man/man3/tqstylesheetitem.3qt @@ -1,5 +1,5 @@ '\" t -.TH QStyleSheetItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQStyleSheetItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,34 +7,34 @@ .ad l .nh .SH NAME -QStyleSheetItem \- Encapsulation of a set of text styles +TQStyleSheetItem \- Encapsulation of a set of text styles .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits Qt. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQStyleSheetItem\fR ( QStyleSheet * parent, const TQString & name )" +.BI "\fBTQStyleSheetItem\fR ( TQStyleSheet * parent, const TQString & name )" .br .ti -1c -.BI "\fBQStyleSheetItem\fR ( const QStyleSheetItem & other )" +.BI "\fBTQStyleSheetItem\fR ( const TQStyleSheetItem & other )" .br .ti -1c -.BI "\fB~QStyleSheetItem\fR ()" +.BI "\fB~TQStyleSheetItem\fR ()" .br .ti -1c -.BI "QStyleSheetItem & \fBoperator=\fR ( const QStyleSheetItem & other )" +.BI "TQStyleSheetItem & \fBoperator=\fR ( const TQStyleSheetItem & other )" .br .ti -1c .BI "TQString \fBname\fR () const" .br .ti -1c -.BI "QStyleSheet * \fBstyleSheet\fR ()" +.BI "TQStyleSheet * \fBstyleSheet\fR ()" .br .ti -1c -.BI "const QStyleSheet * \fBstyleSheet\fR () const" +.BI "const TQStyleSheet * \fBstyleSheet\fR () const" .br .ti -1c .BI "enum \fBDisplayMode\fR { DisplayBlock, DisplayInline, DisplayListItem, DisplayNone }" @@ -169,7 +169,7 @@ Inherits Qt. .BI "void \fBsetContexts\fR ( const TQString & c )" .br .ti -1c -.BI "bool \fBallowedInContext\fR ( const QStyleSheetItem * s ) const" +.BI "bool \fBallowedInContext\fR ( const TQStyleSheetItem * s ) const" .br .ti -1c .BI "bool \fBselfNesting\fR () const" @@ -182,7 +182,7 @@ Inherits Qt. .br .in -1c .SH DESCRIPTION -The QStyleSheetItem class provides an encapsulation of a set of text styles. +The TQStyleSheetItem class provides an encapsulation of a set of text styles. .PP A style sheet item consists of a name and a set of attributes that specifiy its font, color, etc. When used in a style sheet (see styleSheet()), items define the name() of a rich text tag and the display property changes associated with it. .PP @@ -190,276 +190,276 @@ The display mode attribute indicates whether the item is a block, an inline elem .PP See also Text Related Classes. .SS "Member Type Documentation" -.SH "QStyleSheetItem::DisplayMode" +.SH "TQStyleSheetItem::DisplayMode" This enum type defines the way adjacent elements are displayed. .TP -\fCQStyleSheetItem::DisplayBlock\fR - elements are displayed as a rectangular block (e.g. \fC

    ...

    \fR). +\fCTQStyleSheetItem::DisplayBlock\fR - elements are displayed as a rectangular block (e.g. \fC

    ...

    \fR). .TP -\fCQStyleSheetItem::DisplayInline\fR - elements are displayed in a horizontally flowing sequence (e.g. \fC...\fR). +\fCTQStyleSheetItem::DisplayInline\fR - elements are displayed in a horizontally flowing sequence (e.g. \fC...\fR). .TP -\fCQStyleSheetItem::DisplayListItem\fR - elements are displayed in a vertical sequence (e.g. \fC
  • ...
  • \fR). +\fCTQStyleSheetItem::DisplayListItem\fR - elements are displayed in a vertical sequence (e.g. \fC
  • ...
  • \fR). .TP -\fCQStyleSheetItem::DisplayNone\fR - elements are not displayed at all. -.SH "QStyleSheetItem::ListStyle" +\fCTQStyleSheetItem::DisplayNone\fR - elements are not displayed at all. +.SH "TQStyleSheetItem::ListStyle" This enum type defines how the items in a list are prefixed when displayed. .TP -\fCQStyleSheetItem::ListDisc\fR - a filled circle (i.e. a bullet) +\fCTQStyleSheetItem::ListDisc\fR - a filled circle (i.e. a bullet) .TP -\fCQStyleSheetItem::ListCircle\fR - an unfilled circle +\fCTQStyleSheetItem::ListCircle\fR - an unfilled circle .TP -\fCQStyleSheetItem::ListSquare\fR - a filled square +\fCTQStyleSheetItem::ListSquare\fR - a filled square .TP -\fCQStyleSheetItem::ListDecimal\fR - an integer in base 10: \fI1\fR, \fI2\fR, \fI3\fR, ... +\fCTQStyleSheetItem::ListDecimal\fR - an integer in base 10: \fI1\fR, \fI2\fR, \fI3\fR, ... .TP -\fCQStyleSheetItem::ListLowerAlpha\fR - a lowercase letter: \fIa\fR, \fIb\fR, \fIc\fR, ... +\fCTQStyleSheetItem::ListLowerAlpha\fR - a lowercase letter: \fIa\fR, \fIb\fR, \fIc\fR, ... .TP -\fCQStyleSheetItem::ListUpperAlpha\fR - an uppercase letter: \fIA\fR, \fIB\fR, \fIC\fR, ... -.SH "QStyleSheetItem::Margin" +\fCTQStyleSheetItem::ListUpperAlpha\fR - an uppercase letter: \fIA\fR, \fIB\fR, \fIC\fR, ... +.SH "TQStyleSheetItem::Margin" .TP -\fCQStyleSheetItem::MarginLeft\fR - left margin +\fCTQStyleSheetItem::MarginLeft\fR - left margin .TP -\fCQStyleSheetItem::MarginRight\fR - right margin +\fCTQStyleSheetItem::MarginRight\fR - right margin .TP -\fCQStyleSheetItem::MarginTop\fR - top margin +\fCTQStyleSheetItem::MarginTop\fR - top margin .TP -\fCQStyleSheetItem::MarginBottom\fR - bottom margin +\fCTQStyleSheetItem::MarginBottom\fR - bottom margin .TP -\fCQStyleSheetItem::MarginAll\fR - all margins (left, right, top and bottom) +\fCTQStyleSheetItem::MarginAll\fR - all margins (left, right, top and bottom) .TP -\fCQStyleSheetItem::MarginVertical\fR - top and bottom margins +\fCTQStyleSheetItem::MarginVertical\fR - top and bottom margins .TP -\fCQStyleSheetItem::MarginHorizontal\fR - left and right margins +\fCTQStyleSheetItem::MarginHorizontal\fR - left and right margins .TP -\fCQStyleSheetItem::MarginFirstLine\fR - margin (indentation) of the first line of a paragarph (in addition to the MarginLeft of the paragraph) -.SH "QStyleSheetItem::VerticalAlignment" +\fCTQStyleSheetItem::MarginFirstLine\fR - margin (indentation) of the first line of a paragarph (in addition to the MarginLeft of the paragraph) +.SH "TQStyleSheetItem::VerticalAlignment" This enum type defines the way elements are aligned vertically. This is only supported for text elements. .TP -\fCQStyleSheetItem::VAlignBaseline\fR - align the baseline of the element (or the bottom, if the element doesn't have a baseline) with the baseline of the parent +\fCTQStyleSheetItem::VAlignBaseline\fR - align the baseline of the element (or the bottom, if the element doesn't have a baseline) with the baseline of the parent .TP -\fCQStyleSheetItem::VAlignSub\fR - subscript the element +\fCTQStyleSheetItem::VAlignSub\fR - subscript the element .TP -\fCQStyleSheetItem::VAlignSuper\fR - superscript the element -.SH "QStyleSheetItem::WhiteSpaceMode" -This enum defines the ways in which QStyleSheet can treat whitespace. +\fCTQStyleSheetItem::VAlignSuper\fR - superscript the element +.SH "TQStyleSheetItem::WhiteSpaceMode" +This enum defines the ways in which TQStyleSheet can treat whitespace. .TP -\fCQStyleSheetItem::WhiteSpaceNormal\fR - any sequence of whitespace (including line-breaks) is equivalent to a single space. +\fCTQStyleSheetItem::WhiteSpaceNormal\fR - any sequence of whitespace (including line-breaks) is equivalent to a single space. .TP -\fCQStyleSheetItem::WhiteSpacePre\fR - whitespace must be output exactly as given in the input. +\fCTQStyleSheetItem::WhiteSpacePre\fR - whitespace must be output exactly as given in the input. .TP -\fCQStyleSheetItem::WhiteSpaceNoWrap\fR - multiple spaces are collapsed as with WhiteSpaceNormal, but no automatic line-breaks occur. To break lines manually, use the \fC
    \fR tag. +\fCTQStyleSheetItem::WhiteSpaceNoWrap\fR - multiple spaces are collapsed as with WhiteSpaceNormal, but no automatic line-breaks occur. To break lines manually, use the \fC
    \fR tag. .PP .SH MEMBER FUNCTION DOCUMENTATION -.SH "QStyleSheetItem::QStyleSheetItem ( QStyleSheet * parent, const TQString & name )" +.SH "TQStyleSheetItem::TQStyleSheetItem ( TQStyleSheet * parent, const TQString & name )" Constructs a new style called \fIname\fR for the stylesheet \fIparent\fR. .PP -All properties in QStyleSheetItem are initially in the "do not change" state, except display mode, which defaults to DisplayInline. -.SH "QStyleSheetItem::QStyleSheetItem ( const QStyleSheetItem & other )" +All properties in TQStyleSheetItem are initially in the "do not change" state, except display mode, which defaults to DisplayInline. +.SH "TQStyleSheetItem::TQStyleSheetItem ( const TQStyleSheetItem & other )" Copy constructor. Constructs a copy of \fIother\fR that is not bound to any style sheet. -.SH "QStyleSheetItem::~QStyleSheetItem ()" -Destroys the style. Note that QStyleSheetItem objects become owned by QStyleSheet when they are created. -.SH "int QStyleSheetItem::alignment () const" +.SH "TQStyleSheetItem::~TQStyleSheetItem ()" +Destroys the style. Note that TQStyleSheetItem objects become owned by TQStyleSheet when they are created. +.SH "int TQStyleSheetItem::alignment () const" Returns the alignment of this style. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify. .PP See also setAlignment() and TQt::AlignmentFlags. -.SH "bool QStyleSheetItem::allowedInContext ( const QStyleSheetItem * s ) const" +.SH "bool TQStyleSheetItem::allowedInContext ( const TQStyleSheetItem * s ) const" Returns TRUE if this style can be nested into an element of style \fIs\fR; otherwise returns FALSE. .PP See also contexts() and setContexts(). -.SH "TQColor QStyleSheetItem::color () const" +.SH "TQColor TQStyleSheetItem::color () const" Returns the text color of this style or an invalid color if no color has been set. .PP See also setColor() and TQColor::isValid(). -.SH "TQString QStyleSheetItem::contexts () const" +.SH "TQString TQStyleSheetItem::contexts () const" Returns a space-separated list of names of styles that may contain elements of this style. If nothing has been set, contexts() returns an empty string, which indicates that this style can be nested everywhere. .PP See also setContexts(). -.SH "bool QStyleSheetItem::definesFontItalic () const" +.SH "bool TQStyleSheetItem::definesFontItalic () const" Returns TRUE if the style defines a font shape; otherwise returns FALSE. A style does not define any shape until setFontItalic() is called. .PP See also setFontItalic() and fontItalic(). -.SH "bool QStyleSheetItem::definesFontStrikeOut () const" +.SH "bool TQStyleSheetItem::definesFontStrikeOut () const" Returns TRUE if the style defines a setting for the strikeOut property of the font; otherwise returns FALSE. A style does not define this until setFontStrikeOut() is called. .PP See also setFontStrikeOut() and fontStrikeOut(). -.SH "bool QStyleSheetItem::definesFontUnderline () const" +.SH "bool TQStyleSheetItem::definesFontUnderline () const" Returns TRUE if the style defines a setting for the underline property of the font; otherwise returns FALSE. A style does not define this until setFontUnderline() is called. .PP See also setFontUnderline() and fontUnderline(). -.SH "DisplayMode QStyleSheetItem::displayMode () const" +.SH "DisplayMode TQStyleSheetItem::displayMode () const" Returns the display mode of the style. .PP See also setDisplayMode(). -.SH "TQString QStyleSheetItem::fontFamily () const" +.SH "TQString TQStyleSheetItem::fontFamily () const" Returns the font family setting of the style. This is either a valid font family or TQString::null if no family has been set. .PP See also setFontFamily(), QFont::family(), and QFont::setFamily(). -.SH "bool QStyleSheetItem::fontItalic () const" +.SH "bool TQStyleSheetItem::fontItalic () const" Returns TRUE if the style sets an italic font; otherwise returns FALSE. .PP See also setFontItalic() and definesFontItalic(). -.SH "int QStyleSheetItem::fontSize () const" -Returns the font size setting of the style. This is either a valid point size or QStyleSheetItem::Undefined. +.SH "int TQStyleSheetItem::fontSize () const" +Returns the font size setting of the style. This is either a valid point size or TQStyleSheetItem::Undefined. .PP See also setFontSize(), QFont::pointSize(), and QFont::setPointSize(). -.SH "bool QStyleSheetItem::fontStrikeOut () const" +.SH "bool TQStyleSheetItem::fontStrikeOut () const" Returns TRUE if the style sets a strike out font; otherwise returns FALSE. .PP See also setFontStrikeOut() and definesFontStrikeOut(). -.SH "bool QStyleSheetItem::fontUnderline () const" +.SH "bool TQStyleSheetItem::fontUnderline () const" Returns TRUE if the style sets an underlined font; otherwise returns FALSE. .PP See also setFontUnderline() and definesFontUnderline(). -.SH "int QStyleSheetItem::fontWeight () const" -Returns the font weight setting of the style. This is either a valid QFont::Weight or the value QStyleSheetItem::Undefined. +.SH "int TQStyleSheetItem::fontWeight () const" +Returns the font weight setting of the style. This is either a valid QFont::Weight or the value TQStyleSheetItem::Undefined. .PP See also setFontWeight() and QFont. -.SH "bool QStyleSheetItem::isAnchor () const" +.SH "bool TQStyleSheetItem::isAnchor () const" Returns whether this style is an anchor. .PP See also setAnchor(). -.SH "int QStyleSheetItem::lineSpacing () const" +.SH "int TQStyleSheetItem::lineSpacing () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Returns the linespacing -.SH "ListStyle QStyleSheetItem::listStyle () const" +.SH "ListStyle TQStyleSheetItem::listStyle () const" Returns the list style of the style. .PP See also setListStyle() and ListStyle. -.SH "int QStyleSheetItem::logicalFontSize () const" -Returns the logical font size setting of the style. This is either a valid size between 1 and 7 or QStyleSheetItem::Undefined. +.SH "int TQStyleSheetItem::logicalFontSize () const" +Returns the logical font size setting of the style. This is either a valid size between 1 and 7 or TQStyleSheetItem::Undefined. .PP See also setLogicalFontSize(), setLogicalFontSizeStep(), QFont::pointSize(), and QFont::setPointSize(). -.SH "int QStyleSheetItem::logicalFontSizeStep () const" +.SH "int TQStyleSheetItem::logicalFontSizeStep () const" Returns the logical font size step of this style. .PP The default is 0. Tags such as \fCbig\fR define \fC+1\fR; \fCsmall\fR defines \fC-1\fR. .PP See also setLogicalFontSizeStep(). -.SH "int QStyleSheetItem::margin ( Margin m ) const" +.SH "int TQStyleSheetItem::margin ( Margin m ) const" Returns the width of margin \fIm\fR in pixels. .PP The margin, \fIm\fR, can be MarginLeft, MarginRight, MarginTop, MarginBottom, or MarginFirstLine. .PP See also setMargin() and Margin. -.SH "TQString QStyleSheetItem::name () const" +.SH "TQString TQStyleSheetItem::name () const" Returns the name of the style item. -.SH "int QStyleSheetItem::numberOfColumns () const" +.SH "int TQStyleSheetItem::numberOfColumns () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Returns the number of columns for this style. .PP See also setNumberOfColumns(), displayMode(), and setDisplayMode(). -.SH "QStyleSheetItem & QStyleSheetItem::operator= ( const QStyleSheetItem & other )" +.SH "TQStyleSheetItem & TQStyleSheetItem::operator= ( const TQStyleSheetItem & other )" Assignment. Assings a copy of \fIother\fR that is not bound to any style sheet. Unbounds first from previous style sheet. -.SH "bool QStyleSheetItem::selfNesting () const" +.SH "bool TQStyleSheetItem::selfNesting () const" Returns TRUE if this style has self-nesting enabled; otherwise returns FALSE. .PP See also setSelfNesting(). -.SH "void QStyleSheetItem::setAlignment ( int f )" +.SH "void TQStyleSheetItem::setAlignment ( int f )" Sets the alignment to \fIf\fR. This only makes sense for styles with a display mode of DisplayBlock. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify. .PP See also alignment(), displayMode(), and TQt::AlignmentFlags. -.SH "void QStyleSheetItem::setAnchor ( bool anc )" +.SH "void TQStyleSheetItem::setAnchor ( bool anc )" If \fIanc\fR is TRUE, sets this style to be an anchor (hypertext link); otherwise sets it to not be an anchor. Elements in this style link to other documents or anchors. .PP See also isAnchor(). -.SH "void QStyleSheetItem::setColor ( const TQColor & c )" +.SH "void TQStyleSheetItem::setColor ( const TQColor & c )" Sets the text color of this style to \fIc\fR. .PP See also color(). -.SH "void QStyleSheetItem::setContexts ( const TQString & c )" +.SH "void TQStyleSheetItem::setContexts ( const TQString & c )" Sets a space-separated list of names of styles that may contain elements of this style. If \fIc\fR is empty, the style can be nested everywhere. .PP See also contexts(). -.SH "void QStyleSheetItem::setDisplayMode ( DisplayMode m )" +.SH "void TQStyleSheetItem::setDisplayMode ( DisplayMode m )" Sets the display mode of the style to \fIm\fR. .PP See also displayMode(). -.SH "void QStyleSheetItem::setFontFamily ( const TQString & fam )" +.SH "void TQStyleSheetItem::setFontFamily ( const TQString & fam )" Sets the font family setting of the style to \fIfam\fR. .PP See also fontFamily(), QFont::family(), and QFont::setFamily(). -.SH "void QStyleSheetItem::setFontItalic ( bool italic )" +.SH "void TQStyleSheetItem::setFontItalic ( bool italic )" If \fIitalic\fR is TRUE sets italic for the style; otherwise sets upright. .PP See also fontItalic() and definesFontItalic(). -.SH "void QStyleSheetItem::setFontSize ( int s )" +.SH "void TQStyleSheetItem::setFontSize ( int s )" Sets the font size setting of the style to \fIs\fR points. .PP See also fontSize(), QFont::pointSize(), and QFont::setPointSize(). -.SH "void QStyleSheetItem::setFontStrikeOut ( bool strikeOut )" +.SH "void TQStyleSheetItem::setFontStrikeOut ( bool strikeOut )" If \fIstrikeOut\fR is TRUE, sets strike out for the style; otherwise sets no strike out. .PP See also fontStrikeOut() and definesFontStrikeOut(). -.SH "void QStyleSheetItem::setFontUnderline ( bool underline )" +.SH "void TQStyleSheetItem::setFontUnderline ( bool underline )" If \fIunderline\fR is TRUE, sets underline for the style; otherwise sets no underline. .PP See also fontUnderline() and definesFontUnderline(). -.SH "void QStyleSheetItem::setFontWeight ( int w )" +.SH "void TQStyleSheetItem::setFontWeight ( int w )" Sets the font weight setting of the style to \fIw\fR. Valid values are those defined by QFont::Weight. .PP See also QFont and fontWeight(). -.SH "void QStyleSheetItem::setListStyle ( ListStyle s )" +.SH "void TQStyleSheetItem::setListStyle ( ListStyle s )" Sets the list style of the style to \fIs\fR. .PP This is used by nested elements that have a display mode of DisplayListItem. .PP See also listStyle(), DisplayMode, and ListStyle. -.SH "void QStyleSheetItem::setLogicalFontSize ( int s )" +.SH "void TQStyleSheetItem::setLogicalFontSize ( int s )" Sets the logical font size setting of the style to \fIs\fR. Valid logical sizes are 1 to 7. .PP See also logicalFontSize(), QFont::pointSize(), and QFont::setPointSize(). -.SH "void QStyleSheetItem::setLogicalFontSizeStep ( int s )" +.SH "void TQStyleSheetItem::setLogicalFontSizeStep ( int s )" Sets the logical font size step of this style to \fIs\fR. .PP See also logicalFontSizeStep(). -.SH "void QStyleSheetItem::setMargin ( Margin m, int v )" +.SH "void TQStyleSheetItem::setMargin ( Margin m, int v )" Sets the width of margin \fIm\fR to \fIv\fR pixels. .PP The margin, \fIm\fR, can be MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, MarginVertical or MarginHorizontal. The value \fIv\fR must be >= 0. .PP See also margin(). -.SH "void QStyleSheetItem::setNumberOfColumns ( int ncols )" +.SH "void TQStyleSheetItem::setNumberOfColumns ( int ncols )" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Sets the number of columns for this style. Elements in the style are divided into columns. .PP -This makes sense only if the style uses a block display mode (see QStyleSheetItem::DisplayMode). +This makes sense only if the style uses a block display mode (see TQStyleSheetItem::DisplayMode). .PP See also numberOfColumns(). -.SH "void QStyleSheetItem::setSelfNesting ( bool nesting )" +.SH "void TQStyleSheetItem::setSelfNesting ( bool nesting )" Sets the self-nesting property for this style to \fInesting\fR. .PP In order to support "dirty" HTML, paragraphs \fC

    \fR and list items \fC

  • \fR are not self-nesting. This means that starting a new paragraph or list item automatically closes the previous one. .PP See also selfNesting(). -.SH "void QStyleSheetItem::setVerticalAlignment ( VerticalAlignment valign )" +.SH "void TQStyleSheetItem::setVerticalAlignment ( VerticalAlignment valign )" Sets the vertical alignment to \fIvalign\fR. Possible values are VAlignBaseline, VAlignSub or VAlignSuper. .PP The vertical alignment property is not inherited. .PP See also verticalAlignment(). -.SH "void QStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m )" +.SH "void TQStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m )" Sets the whitespace mode to \fIm\fR. .PP See also WhiteSpaceMode. -.SH "QStyleSheet * QStyleSheetItem::styleSheet ()" +.SH "TQStyleSheet * TQStyleSheetItem::styleSheet ()" Returns the style sheet this item is in. -.SH "const QStyleSheet * QStyleSheetItem::styleSheet () const" +.SH "const TQStyleSheet * TQStyleSheetItem::styleSheet () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the style sheet this item is in. -.SH "VerticalAlignment QStyleSheetItem::verticalAlignment () const" +.SH "VerticalAlignment TQStyleSheetItem::verticalAlignment () const" Returns the vertical alignment of the style. Possible values are VAlignBaseline, VAlignSub or VAlignSuper. .PP See also setVerticalAlignment(). -.SH "WhiteSpaceMode QStyleSheetItem::whiteSpaceMode () const" +.SH "WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode () const" Returns the whitespace mode. .PP See also setWhiteSpaceMode() and WhiteSpaceMode. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qstylesheetitem.html +.BR http://doc.trolltech.com/tqstylesheetitem.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqt.3qt b/doc/man/man3/tqt.3qt index 7bfd60fb..f6fc2b3f 100644 --- a/doc/man/man3/tqt.3qt +++ b/doc/man/man3/tqt.3qt @@ -11,7 +11,7 @@ Qt \- Namespace for miscellaneous identifiers that need to be global-like .SH SYNOPSIS \fC#include \fR .PP -Inherited by TQObject, QPixmap, QBrush, TQCanvasItem, QCursor, QPainter, QEvent, TQIconViewItem, QKeySequence, QListViewItem, QCustomMenuItem, QPen, QStyleSheetItem, QSyntaxHighlighter, QTab, QTableItem, QThread, QToolTip, and QWhatsThis. +Inherited by TQObject, QPixmap, QBrush, TQCanvasItem, QCursor, QPainter, QEvent, TQIconViewItem, QKeySequence, QListViewItem, QCustomMenuItem, QPen, TQStyleSheetItem, QSyntaxHighlighter, QTab, QTableItem, QThread, QToolTip, and QWhatsThis. .PP .SS "Public Members" .in +1c @@ -1216,9 +1216,9 @@ This enum is used in widgets that can display both plain text and rich text, e.g .TP \fCQt::PlainText\fR - The text string is interpreted as a plain text string. .TP -\fCQt::RichText\fR - The text string is interpreted as a rich text string using the current QStyleSheet::defaultSheet(). +\fCQt::RichText\fR - The text string is interpreted as a rich text string using the current TQStyleSheet::defaultSheet(). .TP -\fCQt::AutoText\fR - The text string is interpreted as for RichText if QStyleSheet::mightBeRichText() returns TRUE, otherwise as PlainText. +\fCQt::AutoText\fR - The text string is interpreted as for RichText if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as PlainText. .TP \fCQt::LogText\fR - A special, limited text format which is only used by TQTextEdit in an optimized mode. .SH "TQt::TimeSpec" diff --git a/doc/man/man3/tqtextbrowser.3qt b/doc/man/man3/tqtextbrowser.3qt index 2caf9554..f4cc4faf 100644 --- a/doc/man/man3/tqtextbrowser.3qt +++ b/doc/man/man3/tqtextbrowser.3qt @@ -106,7 +106,7 @@ If you intend using the mime factory to read the data directly from the file sys .fi This is to ensure that the factory is able to resolve the document names. .PP -TQTextBrowser interprets the tags it processes in accordance with the default style sheet. Change the style sheet with setStyleSheet(); see QStyleSheet for details. +TQTextBrowser interprets the tags it processes in accordance with the default style sheet. Change the style sheet with setStyleSheet(); see TQStyleSheet for details. .PP If you want to provide your users with editable rich text use TQTextEdit. If you want a text browser without hypertext navigation use TQTextEdit, and use TQTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QSimpleRichText or QLabel. .PP diff --git a/doc/man/man3/tqtextedit.3qt b/doc/man/man3/tqtextedit.3qt index c6ffa2df..a33447d8 100644 --- a/doc/man/man3/tqtextedit.3qt +++ b/doc/man/man3/tqtextedit.3qt @@ -90,7 +90,7 @@ Inherited by QMultiLineEdit, TQTextBrowser, and TQTextView. .BI "int \fBparagraphLength\fR ( int para ) const" .br .ti -1c -.BI "QStyleSheet * \fBstyleSheet\fR () const" +.BI "TQStyleSheet * \fBstyleSheet\fR () const" .br .ti -1c .BI "QMimeSourceFactory * \fBmimeSourceFactory\fR () const" @@ -201,7 +201,7 @@ Inherited by QMultiLineEdit, TQTextBrowser, and TQTextView. .BI "virtual void \fBsetMimeSourceFactory\fR ( QMimeSourceFactory * factory )" .br .ti -1c -.BI "virtual void \fBsetStyleSheet\fR ( QStyleSheet * styleSheet )" +.BI "virtual void \fBsetStyleSheet\fR ( TQStyleSheet * styleSheet )" .br .ti -1c .BI "virtual void \fBscrollToAnchor\fR ( const TQString & name )" @@ -551,11 +551,11 @@ The text edit documentation uses the following concepts: .TP \fIcurrent paragraph\fR -- the paragraph which contains the cursor. .PP -TQTextEdit can display images (using QMimeSourceFactory), lists and tables. If the text is too large to view within the text edit's viewport, scrollbars will appear. The text edit can load both plain text and HTML files (a subset of HTML 3.2 and 4). The rendering style and the set of valid tags are defined by a styleSheet(). Custom tags can be created and placed in a custom style sheet. Change the style sheet with setStyleSheet(); see QStyleSheet for details. The images identified by image tags are displayed if they can be interpreted using the text edit's QMimeSourceFactory; see setMimeSourceFactory(). +TQTextEdit can display images (using QMimeSourceFactory), lists and tables. If the text is too large to view within the text edit's viewport, scrollbars will appear. The text edit can load both plain text and HTML files (a subset of HTML 3.2 and 4). The rendering style and the set of valid tags are defined by a styleSheet(). Custom tags can be created and placed in a custom style sheet. Change the style sheet with setStyleSheet(); see TQStyleSheet for details. The images identified by image tags are displayed if they can be interpreted using the text edit's QMimeSourceFactory; see setMimeSourceFactory(). .PP If you want a text browser with more navigation use TQTextBrowser. If you just need to display a small piece of rich text use QLabel or QSimpleRichText. .PP -If you create a new TQTextEdit, and want to allow the user to edit rich text, call setTextFormat(TQt::RichText) to ensure that the text is treated as rich text. (Rich text uses HTML tags to set text formatting attributes. See QStyleSheet for information on the HTML tags that are supported.). If you don't call setTextFormat() explicitly the text edit will guess from the text itself whether it is rich text or plain text. This means that if the text looks like HTML or XML it will probably be interpreted as rich text, so you should call setTextFormat(TQt::PlainText) to preserve such text. +If you create a new TQTextEdit, and want to allow the user to edit rich text, call setTextFormat(TQt::RichText) to ensure that the text is treated as rich text. (Rich text uses HTML tags to set text formatting attributes. See TQStyleSheet for information on the HTML tags that are supported.). If you don't call setTextFormat() explicitly the text edit will guess from the text itself whether it is rich text or plain text. This means that if the text looks like HTML or XML it will probably be interpreted as rich text, so you should call setTextFormat(TQt::PlainText) to preserve such text. .PP Note that we do not intend to add a full-featured web browser widget to TQt (because that would easily double Qt's size and only a few applications would benefit from it). The rich text support in TQt is designed to provide a fast, portable and efficient way to add reasonable online help facilities to applications, and to provide a basis for rich text editors. .SH "Using TQTextEdit as a Display Widget" @@ -641,7 +641,7 @@ Stylesheets can also be used in LogText mode. To create and use a custom tag, yo .br log->setTextFormat( TQt::LogText ); .br - QStyleSheetItem * item = new QStyleSheetItem( log->styleSheet(), "mytag" ); + TQStyleSheetItem * item = new TQStyleSheetItem( log->styleSheet(), "mytag" ); .br item->setColor( "red" ); .br @@ -652,7 +652,7 @@ Stylesheets can also be used in LogText mode. To create and use a custom tag, yo log->append( "This is a custom tag!" ); .br .fi -Note that only the color, bold, underline and italic attributes of a QStyleSheetItem is used in LogText mode. +Note that only the color, bold, underline and italic attributes of a TQStyleSheetItem is used in LogText mode. .PP Note that you can use setMaxLogLines() to limit the number of lines the widget can hold in LogText mode. .PP @@ -1160,7 +1160,7 @@ See also getSelection() and selectedText. Sets the background color of selection number \fIselNum\fR to \fIback\fR and specifies whether the text of this selection should be inverted with \fIinvertText\fR. .PP This only works for \fIselNum\fR > 0. The default selection (\fIselNum\fR == 0) gets its attributes from the text edit's colorGroup(). -.SH "void TQTextEdit::setStyleSheet ( QStyleSheet * styleSheet )\fC [virtual slot]\fR" +.SH "void TQTextEdit::setStyleSheet ( TQStyleSheet * styleSheet )\fC [virtual slot]\fR" Sets the stylesheet to use with this text edit to \fIstyleSheet\fR. Changes will only take effect for new text added with setText() or append(). .PP See also styleSheet(). @@ -1177,7 +1177,7 @@ Changes the text of the text edit to the string \fItext\fR and the context to \f .PP \fItext\fR may be interpreted either as plain text or as rich text, depending on the textFormat(). The default setting is AutoText, i.e. the text edit auto-detects the format from \fItext\fR. .PP -For rich text the rendering style and available tags are defined by a styleSheet(); see QStyleSheet for details. +For rich text the rendering style and available tags are defined by a styleSheet(); see TQStyleSheet for details. .PP The optional \fIcontext\fR is a path which the text edit's QMimeSourceFactory uses to resolve the locations of files and images. (See TQTextEdit::TQTextEdit().) It is passed to the text edit's QMimeSourceFactory when quering data. .PP @@ -1204,8 +1204,8 @@ Sets the word wrap mode to \fImode\fR. See the "wordWrap" property for details. Sets the position (in pixels or columns depending on the wrap mode) where text will be wrapped. See the "wrapColumnOrWidth" property for details. .SH "void TQTextEdit::setWrapPolicy ( WrapPolicy policy )\fC [virtual slot]\fR" Sets the word wrap policy, at whitespace or anywhere to \fIpolicy\fR. See the "wrapPolicy" property for details. -.SH "QStyleSheet * TQTextEdit::styleSheet () const" -Returns the QStyleSheet which is being used by this text edit. +.SH "TQStyleSheet * TQTextEdit::styleSheet () const" +Returns the TQStyleSheet which is being used by this text edit. .PP See also setStyleSheet(). .PP @@ -1378,11 +1378,11 @@ The text format is one of the following: .TP PlainText - all characters, except newlines, are displayed verbatim, including spaces. Whenever a newline appears in the text the text edit inserts a hard line break and begins a new paragraph. .TP -RichText - rich text rendering. The available styles are defined in the default stylesheet QStyleSheet::defaultSheet(). +RichText - rich text rendering. The available styles are defined in the default stylesheet TQStyleSheet::defaultSheet(). .TP LogText - optimized mode for very large texts. Supports a very limited set of formatting tags (color, bold, underline and italic settings). .TP -AutoText - this is the default. The text edit autodetects which rendering style is best, PlainText or RichText. This is done by using the QStyleSheet::mightBeRichText() function. +AutoText - this is the default. The text edit autodetects which rendering style is best, PlainText or RichText. This is done by using the TQStyleSheet::mightBeRichText() function. .PP Set this property's value with setTextFormat() and get this property's value with textFormat(). .SH "int undoDepth" diff --git a/doc/man/man3/tqwhatsthis.3qt b/doc/man/man3/tqwhatsthis.3qt index a902b44e..fb6d7436 100644 --- a/doc/man/man3/tqwhatsthis.3qt +++ b/doc/man/man3/tqwhatsthis.3qt @@ -70,7 +70,7 @@ QWhatsThis provides a single window with an explanatory text that pops up when t .PP To add "What's this?" text to a widget you simply call QWhatsThis::add() for the widget. For example, to assign text to a menu item, call QMenuData::setWhatsThis(); for a global accelerator key, call QAccel::setWhatsThis() and If you're using actions, use QAction::setWhatsThis(). .PP -The text can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. This makes it possible to embed images. See QStyleSheet::defaultSheet() for details. +The text can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. This makes it possible to embed images. See TQStyleSheet::defaultSheet() for details. .PP .nf .br @@ -114,7 +114,7 @@ When the widget is queried by the user the text() function of this QWhatsThis wi .SH "QWhatsThis::~QWhatsThis ()\fC [virtual]\fR" Destroys the object and frees any allocated resources. .SH "void QWhatsThis::add ( TQWidget * widget, const TQString & text )\fC [static]\fR" -Adds \fItext\fR as "What's this" help for \fIwidget\fR. If the text is rich text formatted (i.e. it contains markup) it will be rendered with the default stylesheet QStyleSheet::defaultSheet(). +Adds \fItext\fR as "What's this" help for \fIwidget\fR. If the text is rich text formatted (i.e. it contains markup) it will be rendered with the default stylesheet TQStyleSheet::defaultSheet(). .PP The text is destroyed if the widget is later destroyed, so it need not be explicitly removed. .PP diff --git a/doc/man/man3/tqwidget.3qt b/doc/man/man3/tqwidget.3qt index 00242f28..f9cc34d4 100644 --- a/doc/man/man3/tqwidget.3qt +++ b/doc/man/man3/tqwidget.3qt @@ -27,13 +27,13 @@ Inherited by QAxWidget, QButton, QFrame, QDialog, QComboBox, TQDataBrowser, TQDa .BI "WId \fBwinId\fR () const" .br .ti -1c -.BI "QStyle & \fBstyle\fR () const" +.BI "TQStyle & \fBstyle\fR () const" .br .ti -1c -.BI "void \fBsetStyle\fR ( QStyle * style )" +.BI "void \fBsetStyle\fR ( TQStyle * style )" .br .ti -1c -.BI "QStyle * \fBsetStyle\fR ( const TQString & style )" +.BI "TQStyle * \fBsetStyle\fR ( const TQString & style )" .br .ti -1c .BI "bool \fBisTopLevel\fR () const" @@ -948,7 +948,7 @@ Inherited by QAxWidget, QButton, QFrame, QDialog, QComboBox, TQDataBrowser, TQDa .BI "virtual void \fBupdateMask\fR ()" .br .ti -1c -.BI "virtual void \fBstyleChange\fR ( QStyle & oldStyle )" +.BI "virtual void \fBstyleChange\fR ( TQStyle & oldStyle )" .br .ti -1c .BI "virtual void \fBenabledChange\fR ( bool oldEnabled )" @@ -2205,7 +2205,7 @@ This is an overloaded member function, provided for convenience. It behaves esse Sets the size policy of the widget to \fIhor\fR, \fIver\fR and \fIhfw\fR (height for width). .PP See also QSizePolicy::QSizePolicy(). -.SH "void TQWidget::setStyle ( QStyle * style )" +.SH "void TQWidget::setStyle ( TQStyle * style )" Sets the widget's GUI style to \fIstyle\fR. Ownership of the style object is not transferred. .PP If no style is set, the widget uses the application's style, QApplication::style() instead. @@ -2214,14 +2214,14 @@ Setting a widget's style has no effect on existing or future child widgets. .PP \fBWarning:\fR This function is particularly useful for demonstration purposes, where you want to show Qt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead. .PP -See also style(), QStyle, QApplication::style(), and QApplication::setStyle(). +See also style(), TQStyle, QApplication::style(), and QApplication::setStyle(). .PP Examples: .)l grapher/grapher.cpp and progressbar/progressbar.cpp. -.SH "QStyle * TQWidget::setStyle ( const TQString & style )" +.SH "TQStyle * TQWidget::setStyle ( const TQString & style )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP -Sets the widget's GUI style to \fIstyle\fR using the QStyleFactory. +Sets the widget's GUI style to \fIstyle\fR using the TQStyleFactory. .SH "void TQWidget::setTabOrder ( TQWidget * first, TQWidget * second )\fC [static]\fR" Moves the \fIsecond\fR widget around the ring of focus widgets so that keyboard focus moves from the \fIfirst\fR widget to the \fIsecond\fR widget when the Tab key is pressed. .PP @@ -2362,11 +2362,11 @@ Places the widget under \fIw\fR in the parent widget's stack. To make this work, the widget itself and \fIw\fR must be siblings. .PP See also raise() and lower(). -.SH "QStyle & TQWidget::style () const" +.SH "TQStyle & TQWidget::style () const" Returns the GUI style for this widget .PP See also TQWidget::setStyle(), QApplication::setStyle(), and QApplication::style(). -.SH "void TQWidget::styleChange ( QStyle & oldStyle )\fC [virtual protected]\fR" +.SH "void TQWidget::styleChange ( TQStyle & oldStyle )\fC [virtual protected]\fR" This virtual function is called when the style of the widgets changes. \fIoldStyle\fR is the previous GUI style; you can get the new style from style(). .PP Reimplement this function if your widget needs to know when its GUI style changes. You will almost certainly need to update the widget using update(). diff --git a/doc/pictures.doc b/doc/pictures.doc index 8fd5f8bb..b9c1510e 100644 --- a/doc/pictures.doc +++ b/doc/pictures.doc @@ -42,7 +42,7 @@ \title Pictures of Most TQt Widgets Most of these widgets are shown in either Motif or Windows style. -All widgets are supported in both styles (and other \link QStyle +All widgets are supported in both styles (and other \link TQStyle styles\endlink), but for clarity we just present a selection. Qt provides more widgets than the selection shown below. And extra Qt diff --git a/doc/plugins-howto.doc b/doc/plugins-howto.doc index b7ab6445..aaada79f 100644 --- a/doc/plugins-howto.doc +++ b/doc/plugins-howto.doc @@ -67,7 +67,7 @@ by default in the standard plugin directory. \i \l TQSqlDriverPlugin \i \c{pluginsbase/sqldrivers} * \row -\i \l QStylePlugin +\i \l TQStylePlugin \i \c{pluginsbase/styles} * \row \i \l TQTextCodecPlugin @@ -92,7 +92,7 @@ set your own path or paths you can use Suppose that you have a new style class called 'MyStyle' that you want to make available as a plugin. The required code is straightforward: \code - class MyStylePlugin : public QStylePlugin + class MyStylePlugin : public TQStylePlugin { public: MyStylePlugin() {} @@ -102,7 +102,7 @@ to make available as a plugin. The required code is straightforward: return TQStringList() << "mystyle"; } - QStyle* create( const TQString& key ) { + TQStyle* create( const TQString& key ) { if ( key == "mystyle" ) return new MyStyle; return 0; @@ -112,7 +112,7 @@ to make available as a plugin. The required code is straightforward: TQ_EXPORT_PLUGIN( MyStylePlugin ) \endcode -(Note that QStyleFactory is case-insensitive, and the lower case +(Note that TQStyleFactory is case-insensitive, and the lower case version of the key is used; other factories, e.g. TQWidgetFactory, are case sensitive.) @@ -122,19 +122,19 @@ The first is keys() which returns a string list of the classes implemented in the plugin. (We've just implemented one class in the example above.) The second is a function that returns an object of the required class (or 0 if the plugin is asked to create an object of a -class that it doesn't implement). For QStylePlugin, this second +class that it doesn't implement). For TQStylePlugin, this second function is called create(). It is possible to implement any number of plugin subclasses in a single plugin, providing they are all derived from the same base -class, e.g. QStylePlugin. +class, e.g. TQStylePlugin. For database drivers, image formats, custom widgets and text codecs, no explicit object creation is required. TQt will find and create them as required. Styles are an exception, since you might want to set a style explicitly in code. To apply a style, use code like this: \code - QApplication::setStyle( QStyleFactory::create( "MyStyle" ) ); + QApplication::setStyle( TQStyleFactory::create( "MyStyle" ) ); \endcode Some plugin classes require additional functions to be implemented. diff --git a/doc/porting3.doc b/doc/porting3.doc index 00437af9..7e7179f0 100644 --- a/doc/porting3.doc +++ b/doc/porting3.doc @@ -116,7 +116,7 @@ Header files that you might need to add #include directives for include: \i \c \i \c \i \c -\i \c +\i \c \i \c \endlist @@ -218,8 +218,8 @@ All these functions have been removed in TQt 3.x: \i QSpinBox::upButton() \i TQString::basicDirection() \i TQString::visual() -\i QStyle::set...() functions -\i QStyle::drawArrow() +\i TQStyle::set...() functions +\i TQStyle::drawArrow() \i QThread::postEvent(TQObject *receiver, TQEvent *event). Use TQApplication::postEvent() instead. \i QToolButton::iconSet(bool on) const \i QToolButton::offIconSet() const @@ -321,9 +321,9 @@ new code. \i TQString::ascii() const \i TQString::data() const \i TQString::setExpand( uint index, TQChar c ) -\i QStyle::defaultFrameWidth() const -\i QStyle::scrollBarExtent() const -\i QStyle::tabbarMetrics( const TQWidget *t, int \& hf, int \& vf, int \& ov ) const +\i TQStyle::defaultFrameWidth() const +\i TQStyle::scrollBarExtent() const +\i TQStyle::tabbarMetrics( const TQWidget *t, int \& hf, int \& vf, int \& ov ) const \i QTabDialog::isTabEnabled( const char *name ) const \i QTabDialog::selected( const TQString \& ) \i QTabDialog::selected( const TQString \& tabLabel ) @@ -452,7 +452,7 @@ might be removed in a future version. The paintBranches() function in TQt 2.x had a GUIStyle parameter; this has been dropped for TQt 3.x since GUI style is handled by the new -style engine (See \l QStyle.) +style engine (See \l TQStyle.) \section1 QMoveEvent diff --git a/doc/qdict.doc b/doc/qdict.doc index 65918b2a..315db410 100644 --- a/doc/qdict.doc +++ b/doc/qdict.doc @@ -139,7 +139,7 @@ Example #2: \code - TQStringList styleList = QStyleFactory::styles(); + TQStringList styleList = TQStyleFactory::styles(); styleList.sort(); QDict letterDict( 17, FALSE ); for ( TQStringList::Iterator it = styleList.begin(); it != styleList.end(); ++it ) { @@ -162,7 +162,7 @@ \endcode In the example we are using the dictionary to provide fast random access to the keys, and we don't care what the values are. The - example is used to generate a menu of QStyles, each with a unique + example is used to generate a menu of TQStyles, each with a unique accelerator key (or no accelerator if there are no unused letters left). diff --git a/examples/README b/examples/README index 10ad6df3..5d2715e0 100644 --- a/examples/README +++ b/examples/README @@ -374,7 +374,7 @@ themes This examples demonstrates how to draw widgets in different styles (themes). Example themes looking like wood and metal are implemented. You can switch between the different styles at - runtime using the menu. Shows how to create a QStyle subclass. Not + runtime using the menu. Shows how to create a TQStyle subclass. Not for the faint-hearted. tictac diff --git a/examples/demo/dnd/styledbutton.cpp b/examples/demo/dnd/styledbutton.cpp index b3d7829a..44d58ee3 100644 --- a/examples/demo/dnd/styledbutton.cpp +++ b/examples/demo/dnd/styledbutton.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include StyledButton::StyledButton(TQWidget* parent, const char* name) : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( FALSE ) diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp index d243e714..c45f3a59 100644 --- a/examples/demo/frame.cpp +++ b/examples/demo/frame.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index a4f6772a..3795d5cb 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp index 98dcd454..aadf0c04 100644 --- a/examples/helpviewer/helpwindow.cpp +++ b/examples/helpviewer/helpwindow.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/listboxcombo/listboxcombo.cpp b/examples/listboxcombo/listboxcombo.cpp index 90ff2e96..041038fe 100644 --- a/examples/listboxcombo/listboxcombo.cpp +++ b/examples/listboxcombo/listboxcombo.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include class MyListBoxItem : public TQListBoxItem diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp index 7eee9c99..984297b2 100644 --- a/examples/themes/themes.cpp +++ b/examples/themes/themes.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp index c4cf0d4c..39c737cd 100644 --- a/examples/themes/wood.cpp +++ b/examples/themes/wood.cpp @@ -25,7 +25,7 @@ #include "ntqrangecontrol.h" #include "ntqscrollbar.h" #include -#include "ntqstylefactory.h" +#include "tqstylefactory.h" /* XPM */ static const char *polish_xpm[] = { diff --git a/examples/widgets/main.cpp b/examples/widgets/main.cpp index 6d7c217d..b09ada41 100644 --- a/examples/widgets/main.cpp +++ b/examples/widgets/main.cpp @@ -8,7 +8,7 @@ *****************************************************************************/ #include -#include +#include #include "widgets.h" class MyWidgetView : public WidgetView diff --git a/include/ntqstyle.h b/include/ntqstyle.h deleted file mode 120000 index 4a543dd7..00000000 --- a/include/ntqstyle.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqstyle.h \ No newline at end of file diff --git a/include/ntqstylefactory.h b/include/ntqstylefactory.h deleted file mode 120000 index 92c01a6c..00000000 --- a/include/ntqstylefactory.h +++ /dev/null @@ -1 +0,0 @@ -../src/styles/ntqstylefactory.h \ No newline at end of file diff --git a/include/ntqstyleplugin.h b/include/ntqstyleplugin.h deleted file mode 120000 index a4310fdc..00000000 --- a/include/ntqstyleplugin.h +++ /dev/null @@ -1 +0,0 @@ -../src/styles/ntqstyleplugin.h \ No newline at end of file diff --git a/include/ntqstylesheet.h b/include/ntqstylesheet.h deleted file mode 120000 index 613f0bd9..00000000 --- a/include/ntqstylesheet.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqstylesheet.h \ No newline at end of file diff --git a/include/private/qstyleinterface_p.h b/include/private/qstyleinterface_p.h deleted file mode 120000 index 8bdd3b1c..00000000 --- a/include/private/qstyleinterface_p.h +++ /dev/null @@ -1 +0,0 @@ -../../src/styles/qstyleinterface_p.h \ No newline at end of file diff --git a/include/private/tqstyleinterface_p.h b/include/private/tqstyleinterface_p.h new file mode 120000 index 00000000..631c37fe --- /dev/null +++ b/include/private/tqstyleinterface_p.h @@ -0,0 +1 @@ +../../src/styles/tqstyleinterface_p.h \ No newline at end of file diff --git a/include/tqstyle.h b/include/tqstyle.h new file mode 120000 index 00000000..8960a096 --- /dev/null +++ b/include/tqstyle.h @@ -0,0 +1 @@ +../src/kernel/tqstyle.h \ No newline at end of file diff --git a/include/tqstylefactory.h b/include/tqstylefactory.h new file mode 120000 index 00000000..377d4a68 --- /dev/null +++ b/include/tqstylefactory.h @@ -0,0 +1 @@ +../src/styles/tqstylefactory.h \ No newline at end of file diff --git a/include/tqstyleplugin.h b/include/tqstyleplugin.h new file mode 120000 index 00000000..c9d4f314 --- /dev/null +++ b/include/tqstyleplugin.h @@ -0,0 +1 @@ +../src/styles/tqstyleplugin.h \ No newline at end of file diff --git a/include/tqstylesheet.h b/include/tqstylesheet.h new file mode 120000 index 00000000..86470bbb --- /dev/null +++ b/include/tqstylesheet.h @@ -0,0 +1 @@ +../src/kernel/tqstylesheet.h \ No newline at end of file diff --git a/plugins/src/accessible/widgets/qaccessiblemenu.cpp b/plugins/src/accessible/widgets/qaccessiblemenu.cpp index 6a61fa55..06cbaa73 100644 --- a/plugins/src/accessible/widgets/qaccessiblemenu.cpp +++ b/plugins/src/accessible/widgets/qaccessiblemenu.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include class MyPopupMenu : public TQPopupMenu { diff --git a/plugins/src/accessible/widgets/qaccessiblewidget.cpp b/plugins/src/accessible/widgets/qaccessiblewidget.cpp index 32e05e03..9263c02a 100644 --- a/plugins/src/accessible/widgets/qaccessiblewidget.cpp +++ b/plugins/src/accessible/widgets/qaccessiblewidget.cpp @@ -1,7 +1,7 @@ #include "qaccessiblewidget.h" #include -#include +#include #include #include #include diff --git a/plugins/src/styles/cde/main.cpp b/plugins/src/styles/cde/main.cpp index 3b6dd2e7..23dbb3a3 100644 --- a/plugins/src/styles/cde/main.cpp +++ b/plugins/src/styles/cde/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class CDEStyle : public TQStylePlugin diff --git a/plugins/src/styles/compact/main.cpp b/plugins/src/styles/compact/main.cpp index 1ffd1bb3..f2b89ddc 100644 --- a/plugins/src/styles/compact/main.cpp +++ b/plugins/src/styles/compact/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class CompactStyle : public TQStylePlugin diff --git a/plugins/src/styles/motif/main.cpp b/plugins/src/styles/motif/main.cpp index f871f21e..84c20d79 100644 --- a/plugins/src/styles/motif/main.cpp +++ b/plugins/src/styles/motif/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class MotifStyle : public TQStylePlugin diff --git a/plugins/src/styles/motifplus/main.cpp b/plugins/src/styles/motifplus/main.cpp index 185d64f2..205a240a 100644 --- a/plugins/src/styles/motifplus/main.cpp +++ b/plugins/src/styles/motifplus/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class MotifPlusStyle : public TQStylePlugin diff --git a/plugins/src/styles/platinum/main.cpp b/plugins/src/styles/platinum/main.cpp index a86f7735..9fc53670 100644 --- a/plugins/src/styles/platinum/main.cpp +++ b/plugins/src/styles/platinum/main.cpp @@ -1,5 +1,5 @@ #include -#include +#include class PlatinumStyle : public TQStylePlugin { diff --git a/plugins/src/styles/sgi/main.cpp b/plugins/src/styles/sgi/main.cpp index f8567597..f88dfa56 100644 --- a/plugins/src/styles/sgi/main.cpp +++ b/plugins/src/styles/sgi/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class SGIStyle : public TQStylePlugin diff --git a/plugins/src/styles/windows/main.cpp b/plugins/src/styles/windows/main.cpp index 93684d49..98d8480d 100644 --- a/plugins/src/styles/windows/main.cpp +++ b/plugins/src/styles/windows/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include class WindowsStyle : public TQStylePlugin diff --git a/src/dialogs/qcolordialog.cpp b/src/dialogs/qcolordialog.cpp index ca38f9c1..4678494d 100644 --- a/src/dialogs/qcolordialog.cpp +++ b/src/dialogs/qcolordialog.cpp @@ -54,7 +54,7 @@ #include "ntqdragobject.h" #include "ntqgridview.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqsettings.h" #include "ntqpopupmenu.h" diff --git a/src/dialogs/qerrormessage.cpp b/src/dialogs/qerrormessage.cpp index e2b302e5..403c44e1 100644 --- a/src/dialogs/qerrormessage.cpp +++ b/src/dialogs/qerrormessage.cpp @@ -50,7 +50,7 @@ #include "ntqmessagebox.h" #include "ntqpushbutton.h" #include "tqstringlist.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "tqtextview.h" #include diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index db7b5cbe..79fe3334 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -87,7 +87,7 @@ #include "ntqregexp.h" #include "ntqsplitter.h" #include "tqstrlist.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqtimer.h" #include "ntqtoolbutton.h" #include "ntqtooltip.h" diff --git a/src/dialogs/qfontdialog.cpp b/src/dialogs/qfontdialog.cpp index d81c0147..dfb9731e 100644 --- a/src/dialogs/qfontdialog.cpp +++ b/src/dialogs/qfontdialog.cpp @@ -55,7 +55,7 @@ #include "ntqlabel.h" #include "ntqapplication.h" #include "ntqfontdatabase.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include #include diff --git a/src/dialogs/qmessagebox.cpp b/src/dialogs/qmessagebox.cpp index 6d991b3b..eba00741 100644 --- a/src/dialogs/qmessagebox.cpp +++ b/src/dialogs/qmessagebox.cpp @@ -47,7 +47,7 @@ #include "ntqpushbutton.h" #include "tqimage.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "tqobjectlist.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" diff --git a/src/dialogs/qprintdialog.cpp b/src/dialogs/qprintdialog.cpp index 2402de7d..92e5d5ec 100644 --- a/src/dialogs/qprintdialog.cpp +++ b/src/dialogs/qprintdialog.cpp @@ -58,7 +58,7 @@ #include "ntqspinbox.h" #include "ntqapplication.h" #include "ntqheader.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "tqstring.h" #include "ntqregexp.h" #if !defined(TQT_NO_CUPS) || !defined(TQT_NO_NIS) diff --git a/src/dialogs/qprogressdialog.cpp b/src/dialogs/qprogressdialog.cpp index e139ad3b..0424a9ec 100644 --- a/src/dialogs/qprogressdialog.cpp +++ b/src/dialogs/qprogressdialog.cpp @@ -47,7 +47,7 @@ #include "ntqdrawutil.h" #include "ntqdatetime.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqpushbutton.h" #include "ntqcursor.h" #include "ntqtimer.h" diff --git a/src/kernel/ntqnamespace.h b/src/kernel/ntqnamespace.h index 03c58309..052fea17 100644 --- a/src/kernel/ntqnamespace.h +++ b/src/kernel/ntqnamespace.h @@ -317,7 +317,7 @@ public: }; #endif - // documented in qstyle.cpp + // documented in tqstyle.cpp #ifdef TQT_NO_COMPAT enum GUIStyle { WindowsStyle = 1, // ### TQt 4.0: either remove the obsolete enums or clean up compat vs. @@ -856,7 +856,7 @@ public: WV_CE_based = 0x0f00 }; - // documented in qstyle.cpp + // documented in tqstyle.cpp enum UIEffect { UI_General, UI_AnimateMenu, diff --git a/src/kernel/ntqstyle.h b/src/kernel/ntqstyle.h deleted file mode 100644 index 6fc61b45..00000000 --- a/src/kernel/ntqstyle.h +++ /dev/null @@ -1,1243 +0,0 @@ -/**************************************************************************** -** -** Definition of TQStyle class -** -** Created : 980616 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ -#ifndef TQSTYLE_H -#define TQSTYLE_H - -#ifndef QT_H -#include "tqobject.h" -#include "ntqpixmap.h" -#include "ntqcolor.h" -#include "tqiconset.h" -#include "ntqtabbar.h" -#include "ntqtoolbutton.h" -#endif // QT_H - - -#ifndef TQT_NO_STYLE - -class TQPopupMenu; -class TQStylePrivate; -class TQMenuItem; -class TQTab; -class TQListViewItem; -class TQCheckListItem; - -class TQ_EXPORT TQStyleOption { -public: - enum StyleOptionDefault { Default }; - - TQStyleOption(StyleOptionDefault=Default); - TQStyleOption(int in1); - TQStyleOption(int in1, int in2); - TQStyleOption(int in1, int in2, int in3, int in4); - TQStyleOption(TQMenuItem* m); - TQStyleOption(TQMenuItem* m, int in1); - TQStyleOption(TQMenuItem* m, int in1, int in2); - TQStyleOption(const TQColor& c); - TQStyleOption(TQTab* t); - TQStyleOption(TQListViewItem* i); - TQStyleOption(TQCheckListItem* i); - TQStyleOption(TQt::ArrowType a); - TQStyleOption(const TQRect& r); - TQStyleOption(TQWidget *w); - - bool isDefault() const { return def; } - - int day() const { return i1; } - - int lineWidth() const { return i1; } - int midLineWidth() const { return i2; } - int frameShape() const { return i3; } - int frameShadow() const { return i4; } - - int headerSection() const { return i1; } - TQMenuItem* menuItem() const { return mi; } - int maxIconWidth() const { return i1; } - int tabWidth() const { return i2; } - - const TQColor& color() const { return *cl; } - - TQTab* tab() const { return tb; } - - TQCheckListItem* checkListItem() const { return cli; } - TQListViewItem* listViewItem() const { return li; } - - TQt::ArrowType arrowType() const { return (TQt::ArrowType)i1; } - TQRect rect() const { return TQRect( i1, i2, i3, i4 ); } - TQWidget* widget() const { return (TQWidget*)p1; } - - TQStyleOption(TQTab* t, TQTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {} - TQTab* hoverTab() const { return tbh; } - -private: - // NOTE: none of these components have constructors. - bool def; - bool b1,b2,b3; // reserved - TQMenuItem* mi; - TQTab* tb; - TQListViewItem* li; - const TQColor* cl; - int i1, i2, i3, i4; - int i5, i6; // reserved - TQCheckListItem* cli; - void *p1, *p2, *p3, *p4; // reserved - TQTab* tbh; - // (padded to 64 bytes on some architectures) -}; - -class TQStyleHintReturn; // not defined yet - -typedef TQMap DialogButtonSizeMap; -typedef TQMap TabIdentifierIndexMap; - -class TQStyleControlElementGenericWidgetData; - -class TQStyleControlElementPopupMenuData { - public: - // -}; - -class TQStyleControlElementCheckListItemData { - public: - bool dataValid; - bool enabled; - bool hasParent; - int height; -}; - -class TQStyleControlElementListViewData { - public: - bool rootDecorated; - int itemMargin; -}; - -class TQStyleControlElementSpinWidgetData { - public: - TQ_UINT32 buttonSymbols; - TQRect upRect; - TQRect downRect; - bool upEnabled; - bool downEnabled; -}; - -class TQStyleControlElementTitleBarData { - public: - bool hasWindow; - bool usesActiveColor; - int windowState; - TQString visibleText; -}; - -class TQStyleControlElementDockWidgetData { - public: - bool hasDockArea; - bool closeEnabled; - TQt::Orientation areaOrientation; -}; - -class TQStyleControlElementToolBarWidgetData { - public: - TQt::Orientation orientation; -}; - -class TQStyleControlElementGenericWidgetData { - public: - TQStringList widgetObjectTypes; - bool allDataPopulated; - TQt::WFlags wflags; - TQt::WindowState windowState; - TQPixmap bgPixmap; - TQBrush bgBrush; - TQColor bgColor; - TQPoint bgOffset; - TQt::BackgroundMode backgroundMode; - TQColor fgColor; - TQColorGroup colorGroup; - TQRect geometry; - TQRect rect; - TQPoint pos; - TQPixmap icon; - TQPalette palette; - TQFont font; - TQColor paletteBgColor; - TQString name; - TQString caption; -}; - -class TQStyleControlElementTabBarData { - public: - int tabCount; - int currentTabIndex; - TQTabBar::Shape shape; - TabIdentifierIndexMap identIndexMap; -#ifdef Q_QDOC -#else - TQStyleControlElementGenericWidgetData cornerWidgets[4]; -#endif - - enum CornerWidgetLocation { - CWL_TopLeft = 0, - CWL_TopRight = 1, - CWL_BottomLeft = 2, - CWL_BottomRight = 3 - }; -}; - -class TQ_EXPORT TQStyleControlElementData { - public: - TQStyleControlElementData(); - ~TQStyleControlElementData(); - - public: - bool isNull; - TQStringList widgetObjectTypes; - bool allDataPopulated; - TQt::WFlags wflags; - TQt::WindowState windowState; - TQPixmap bgPixmap; - TQBrush bgBrush; - TQColor bgColor; - TQPoint bgOffset; - TQt::BackgroundMode backgroundMode; - TQPixmap fgPixmap; - TQColor fgColor; - TQColorGroup colorGroup; - TQRect geometry; - TQRect rect; - TQPoint pos; - TQPixmap icon; - TQIconSet iconSet; - TQString text; - TQt::Orientation orientation; - TQColor activeItemPaletteBgColor; - TQPalette palette; - int totalSteps; - int currentStep; - TQ_UINT32 tickMarkSetting; - int tickInterval; - int minSteps; - int maxSteps; - int startStep; - int pageStep; - int lineStep; - int dlgVisibleButtons; - DialogButtonSizeMap dlgVisibleSizeHints; - TQString progressText; - TQString textLabel; - TQFont font; - int percentageVisible; - TQStyleControlElementDockWidgetData dwData; - TQToolButton::TextPosition toolButtonTextPosition; - int popupDelay; - TQStyleControlElementTitleBarData titleBarData; - TQStyleControlElementSpinWidgetData spinWidgetData; - TQStyleControlElementGenericWidgetData parentWidgetData; - TQStyleControlElementGenericWidgetData viewportData; - TQStyleControlElementListViewData listViewData; - TQStyleControlElementTabBarData tabBarData; - TQStyleControlElementCheckListItemData checkListItemData; - TQ_UINT32 comboBoxLineEditFlags; - TQ_UINT32 frameStyle; - TQRect sliderRect; - TQPainter* activePainter; - TQStyleControlElementToolBarWidgetData toolBarData; - TQ_UINT32 comboBoxListBoxFlags; - TQColor paletteBgColor; - TQ_UINT32 parentWidgetFlags; - TQString name; - TQString caption; - TQStyleControlElementGenericWidgetData topLevelWidgetData; - TQ_UINT32 topLevelWidgetFlags; - TQPixmap paletteBgPixmap; - -#ifdef ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY - public: - TQStyleControlElementData(const TQStyleControlElementData&); -#else - private: - // Disable copy constructor - TQStyleControlElementData(const TQStyleControlElementData&); -#endif - -}; - -class TQ_EXPORT TQStyleWidgetActionRequestData { - public: - TQStyleWidgetActionRequestData(); - TQStyleWidgetActionRequestData(int metric1, int metric2=0); - TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = FALSE, const char* className = 0); - TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = FALSE, const char* className = 0); - TQStyleWidgetActionRequestData(TQRect rect); - TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent); - ~TQStyleWidgetActionRequestData(); - public: - bool bool1; - bool bool2; - int metric1; - int metric2; - TQPalette palette; - TQFont font; - TQRect rect; - const char * cstr; - TQString string; - TQPaintEvent * paintEvent; -}; - -typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData; - -class TQ_EXPORT TQStyle: public TQObject -{ - TQ_OBJECT - -public: - TQStyle(); - virtual ~TQStyle(); - - enum ControlElementFlags { - CEF_None = 0x00000000, - CEF_IsDefault = 0x00000001, - CEF_AutoDefault = 0x00000002, - CEF_IsActive = 0x00000004, - CEF_IsDown = 0x00000008, - CEF_IsOn = 0x00000010, - CEF_IsEnabled = 0x00000020, - CEF_BiState = 0x00000040, - CEF_HasFocus = 0x00000080, - CEF_IsMenuWidget = 0x00000100, - CEF_IsContainerEmpty = 0x00000200, - CEF_CenterIndicator = 0x00000400, - CEF_IndicatorFollowsStyle = 0x00000800, - CEF_UsesTextLabel = 0x00001000, - CEF_UsesBigPixmap = 0x00002000, - CEF_UseGenericParameters = 0x00004000, - CEF_HasParentWidget = 0x00008000, - CEF_HasPopupMenu = 0x00010000, - CEF_IsCheckable = 0x00020000, - CEF_HasFocusProxy = 0x00040000, - CEF_IsEditable = 0x00080000, - CEF_IsFlat = 0x00100000, - CEF_IsActiveWindow = 0x00200000, - CEF_IsTopLevel = 0x00400000, - CEF_IsVisible = 0x00800000, - CEF_IsShown = 0x01000000, - CEF_HasMouse = 0x02000000 - }; - - // New TQStyle API - most of these should probably be pure virtual - - // Old API - // DEPRECATED - virtual void polish( TQWidget * ); - - // New API - virtual void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - - // Old API - // DEPRECATED - virtual void unPolish( TQWidget * ); - - // New API - virtual void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - - // Old API - // DEPRECATED - virtual void polish( TQApplication * ); - - // New API - virtual void applicationPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - - // Old API - // DEPRECATED - virtual void unPolish( TQApplication * ); - - // New API - virtual void applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - - virtual void polish( TQPalette & ); - - // Old API - // DEPRECATED - virtual void polishPopupMenu( TQPopupMenu* ); - - // New API - virtual void polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ) = 0; - - virtual TQRect itemRect( TQPainter *p, const TQRect &r, - int flags, bool enabled, - const TQPixmap *pixmap, - const TQString &text, int len = -1 ) const; - - virtual void drawItem( TQPainter *p, const TQRect &r, - int flags, const TQColorGroup &g, bool enabled, - const TQPixmap *pixmap, const TQString &text, - int len = -1, const TQColor *penColor = 0 ) const; - - enum PrimitiveElement { - PE_ButtonCommand, - PE_ButtonDefault, - PE_ButtonBevel, - PE_ButtonTool, - PE_ButtonDropDown, - - PE_FocusRect, - - PE_ArrowUp, - PE_ArrowDown, - PE_ArrowRight, - PE_ArrowLeft, - - PE_SpinWidgetUp, - PE_SpinWidgetDown, - PE_SpinWidgetPlus, - PE_SpinWidgetMinus, - - PE_Indicator, - PE_IndicatorMask, - PE_ExclusiveIndicator, - PE_ExclusiveIndicatorMask, - - PE_DockWindowHandle, - PE_DockWindowSeparator, - PE_DockWindowResizeHandle, - - PE_Splitter, - - PE_Panel, - PE_PanelPopup, - PE_PanelMenuBar, - PE_PanelDockWindow, - - PE_TabBarBase, - - PE_HeaderSection, - PE_HeaderArrow, - PE_StatusBarSection, - - PE_GroupBoxFrame, - - PE_Separator, - - PE_SizeGrip, - - PE_CheckMark, - - PE_ScrollBarAddLine, - PE_ScrollBarSubLine, - PE_ScrollBarAddPage, - PE_ScrollBarSubPage, - PE_ScrollBarSlider, - PE_ScrollBarFirst, - PE_ScrollBarLast, - - PE_ProgressBarChunk, - - PE_PanelLineEdit, - PE_PanelTabWidget, - - PE_WindowFrame, - - PE_CheckListController, - PE_CheckListIndicator, - PE_CheckListExclusiveIndicator, - - PE_PanelGroupBox, - PE_RubberBand, - - PE_HeaderSectionMenu, - - PE_PanelScrollBar, - PE_MenuItemIndicatorFrame, - PE_MenuItemIndicatorIconFrame, - PE_MenuItemIndicatorCheck, - - PE_ScrollBarTrough, - - // do not add any values below/greater this - PE_CustomBase = 0xf000000 - }; - - enum StyleFlags { - Style_Default = 0x00000000, - Style_Enabled = 0x00000001, - Style_Raised = 0x00000002, - Style_Sunken = 0x00000004, - Style_Off = 0x00000008, - Style_NoChange = 0x00000010, - Style_On = 0x00000020, - Style_Down = 0x00000040, - Style_Horizontal = 0x00000080, - Style_HasFocus = 0x00000100, - Style_Top = 0x00000200, - Style_Bottom = 0x00000400, - Style_FocusAtBorder = 0x00000800, - Style_AutoRaise = 0x00001000, - Style_MouseOver = 0x00002000, - Style_Up = 0x00004000, - Style_Selected = 0x00008000, - Style_Active = 0x00010000, - Style_ButtonDefault = 0x00020000 - }; - typedef uint SFlags; - - // Old API - // DEPRECATED - virtual void drawPrimitive( PrimitiveElement pe, - TQPainter *p, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual void drawPrimitive( PrimitiveElement pe, - TQPainter *p, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const = 0; - - - enum ControlElement { - CE_PushButton, - CE_PushButtonLabel, - - CE_CheckBox, - CE_CheckBoxLabel, - - CE_RadioButton, - CE_RadioButtonLabel, - - CE_TabBarTab, - CE_TabBarLabel, - - CE_ProgressBarGroove, - CE_ProgressBarContents, - CE_ProgressBarLabel, - - CE_PopupMenuItem, - CE_MenuBarItem, - - CE_ToolButtonLabel, - CE_MenuBarEmptyArea, - CE_PopupMenuScroller, - CE_DockWindowEmptyArea, - CE_PopupMenuVerticalExtra, - CE_PopupMenuHorizontalExtra, - - CE_ToolBoxTab, - CE_HeaderLabel, - - // do not add any values below/greater than this - CE_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual void drawControl( ControlElement element, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQColorGroup &cg, - SFlags how = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual void drawControl( ControlElement element, - TQPainter *p, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQRect &r, - const TQColorGroup &cg, - SFlags how = Style_Default, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0; - - // Old API - // DEPRECATED - virtual void drawControlMask( ControlElement element, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual void drawControlMask( ControlElement element, - TQPainter *p, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQRect &r, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0; - - enum SubRect { - SR_PushButtonContents, - SR_PushButtonFocusRect, - - SR_CheckBoxIndicator, - SR_CheckBoxContents, - SR_CheckBoxFocusRect, - - SR_RadioButtonIndicator, - SR_RadioButtonContents, - SR_RadioButtonFocusRect, - - SR_ComboBoxFocusRect, - - SR_SliderFocusRect, - - SR_DockWindowHandleRect, - - SR_ProgressBarGroove, - SR_ProgressBarContents, - SR_ProgressBarLabel, - - SR_ToolButtonContents, - - SR_DialogButtonAccept, - SR_DialogButtonReject, - SR_DialogButtonApply, - SR_DialogButtonHelp, - SR_DialogButtonAll, - SR_DialogButtonAbort, - SR_DialogButtonIgnore, - SR_DialogButtonRetry, - SR_DialogButtonCustom, - - SR_ToolBoxTabContents, - - // do not add any values below/greater than this - SR_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual TQRect subRect( SubRect r, const TQWidget *widget ) const; - - // New API - virtual TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const = 0; - - - enum ComplexControl{ - CC_SpinWidget, - CC_ComboBox, - CC_ScrollBar, - CC_Slider, - CC_ToolButton, - CC_TitleBar, - CC_ListView, - - // do not add any values below/greater than this - CC_CustomBase = 0xf0000000 - }; - - enum SubControl { - SC_None = 0x00000000, - - SC_ScrollBarAddLine = 0x00000001, - SC_ScrollBarSubLine = 0x00000002, - SC_ScrollBarAddPage = 0x00000004, - SC_ScrollBarSubPage = 0x00000008, - SC_ScrollBarFirst = 0x00000010, - SC_ScrollBarLast = 0x00000020, - SC_ScrollBarSlider = 0x00000040, - SC_ScrollBarGroove = 0x00000080, - - SC_SpinWidgetUp = 0x00000001, - SC_SpinWidgetDown = 0x00000002, - SC_SpinWidgetFrame = 0x00000004, - SC_SpinWidgetEditField = 0x00000008, - SC_SpinWidgetButtonField = 0x00000010, - - SC_ComboBoxFrame = 0x00000001, - SC_ComboBoxEditField = 0x00000002, - SC_ComboBoxArrow = 0x00000004, - SC_ComboBoxListBoxPopup = 0x00000008, - - SC_SliderGroove = 0x00000001, - SC_SliderHandle = 0x00000002, - SC_SliderTickmarks = 0x00000004, - - SC_ToolButton = 0x00000001, - SC_ToolButtonMenu = 0x00000002, - - SC_TitleBarLabel = 0x00000001, - SC_TitleBarSysMenu = 0x00000002, - SC_TitleBarMinButton = 0x00000004, - SC_TitleBarMaxButton = 0x00000008, - SC_TitleBarCloseButton = 0x00000010, - SC_TitleBarNormalButton = 0x00000020, - SC_TitleBarShadeButton = 0x00000040, - SC_TitleBarUnshadeButton = 0x00000080, - - SC_ListView = 0x00000001, - SC_ListViewBranch = 0x00000002, - SC_ListViewExpand = 0x00000004, - - SC_All = 0xffffffff - }; - typedef uint SCFlags; - - - // Old API - // DEPRECATED - virtual void drawComplexControl( ComplexControl control, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQColorGroup &cg, - SFlags how = Style_Default, -#ifdef Q_QDOC - SCFlags sub = SC_All, -#else - SCFlags sub = (uint)SC_All, -#endif - SCFlags subActive = SC_None, - const TQStyleOption& = TQStyleOption::Default ) const; - - virtual void drawComplexControl( ComplexControl control, - TQPainter *p, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQRect &r, - const TQColorGroup &cg, - SFlags how = Style_Default, -#ifdef Q_QDOC - SCFlags sub = SC_All, -#else - SCFlags sub = (uint)SC_All, -#endif - SCFlags subActive = SC_None, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - // Old API - // DEPRECATED - virtual void drawComplexControlMask( ComplexControl control, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual void drawComplexControlMask( ComplexControl control, - TQPainter *p, - const TQStyleControlElementData &ceData, - const ControlElementFlags elementFlags, - const TQRect &r, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - // Old API - // DEPRECATED - virtual TQRect querySubControlMetrics( ComplexControl control, - const TQWidget *widget, - SubControl sc, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual TQRect querySubControlMetrics( ComplexControl control, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - SubControl sc, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - // Old API - // DEPRECATED - virtual SubControl querySubControl( ComplexControl control, - const TQWidget *widget, - const TQPoint &pos, - const TQStyleOption& = TQStyleOption::Default ) const; - - // New API - virtual SubControl querySubControl( ComplexControl control, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQPoint &pos, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - - enum PixelMetric { - PM_ButtonMargin, - PM_ButtonDefaultIndicator, - PM_MenuButtonIndicator, - PM_ButtonShiftHorizontal, - PM_ButtonShiftVertical, - - PM_DefaultFrameWidth, - PM_SpinBoxFrameWidth, - - PM_MaximumDragDistance, - - PM_ScrollBarExtent, - PM_ScrollBarSliderMin, - - PM_SliderThickness, // total slider thickness - PM_SliderControlThickness, // thickness of the business part - PM_SliderLength, // total length of slider - PM_SliderTickmarkOffset, // - PM_SliderSpaceAvailable, // available space for slider to move - - PM_DockWindowSeparatorExtent, - PM_DockWindowHandleExtent, - PM_DockWindowFrameWidth, - - PM_MenuBarFrameWidth, - - PM_TabBarTabOverlap, - PM_TabBarTabHSpace, - PM_TabBarTabVSpace, - PM_TabBarBaseHeight, - PM_TabBarBaseOverlap, - - PM_ProgressBarChunkWidth, - - PM_SplitterWidth, - PM_TitleBarHeight, - - PM_IndicatorWidth, - PM_IndicatorHeight, - PM_ExclusiveIndicatorWidth, - PM_ExclusiveIndicatorHeight, - PM_PopupMenuScrollerHeight, - PM_CheckListButtonSize, - PM_CheckListControllerSize, - PM_PopupMenuFrameHorizontalExtra, - PM_PopupMenuFrameVerticalExtra, - - PM_DialogButtonsSeparator, - PM_DialogButtonsButtonWidth, - PM_DialogButtonsButtonHeight, - - PM_MDIFrameWidth, - PM_MDIMinimizedWidth, - PM_HeaderMargin, - PM_HeaderMarkSize, - PM_HeaderGripMargin, - PM_TabBarTabShiftHorizontal, - PM_TabBarTabShiftVertical, - PM_TabBarScrollButtonWidth, - - PM_MenuBarItemSpacing, - PM_ToolBarItemSpacing, - - PM_MenuIndicatorFrameHBorder, - PM_MenuIndicatorFrameVBorder, - PM_MenuIconIndicatorFrameHBorder, - PM_MenuIconIndicatorFrameVBorder, - - PM_ArrowSize, - - // do not add any values below/greater than this - PM_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual int pixelMetric( PixelMetric metric, - const TQWidget *widget = 0 ) const; - - // New API - virtual int pixelMetric( PixelMetric metric, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQWidget *widget = 0 ) const = 0; - - - enum ContentsType { - CT_PushButton, - CT_CheckBox, - CT_RadioButton, - CT_ToolButton, - CT_ComboBox, - CT_Splitter, - CT_DockWindow, - CT_ProgressBar, - CT_PopupMenuItem, - CT_TabBarTab, - CT_Slider, - CT_Header, - CT_LineEdit, - CT_MenuBar, - CT_SpinBox, - CT_SizeGrip, - CT_TabWidget, - CT_DialogButtons, - - // do not add any values below/greater than this - CT_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual TQSize sizeFromContents( ContentsType contents, - const TQWidget *widget, - const TQSize &contentsSize, - const TQStyleOption& = TQStyleOption::Default ) const; - - virtual TQSize sizeFromContents( ContentsType contents, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQSize &contentsSize, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - enum StyleHint { - // ... - // the general hints - // ... - // disabled text should be etched, ala Windows - SH_EtchDisabledText, - - // the GUI style enum, argh! - SH_GUIStyle, - - // ... - // widget specific hints - // ... - SH_ScrollBar_BackgroundMode, - SH_ScrollBar_MiddleClickAbsolutePosition, - SH_ScrollBar_ScrollWhenPointerLeavesControl, - - // TQEvent::Type - which mouse event to select a tab - SH_TabBar_SelectMouseType, - - SH_TabBar_Alignment, - - SH_Header_ArrowAlignment, - - // bool - sliders snap to values while moving, ala Windows - SH_Slider_SnapToValue, - - // bool - key presses handled in a sloppy manner - ie. left on a vertical - // slider subtracts a line - SH_Slider_SloppyKeyEvents, - - // bool - center button on progress dialogs, ala Motif, else right aligned - // perhaps this should be a TQt::Alignment value - SH_ProgressDialog_CenterCancelButton, - - // TQt::AlignmentFlags - text label alignment in progress dialogs - // Center on windows, Auto|VCenter otherwize - SH_ProgressDialog_TextLabelAlignment, - - // bool - right align buttons on print dialog, ala Windows - SH_PrintDialog_RightAlignButtons, - - // bool - 1 or 2 pixel space between the menubar and the dockarea, ala Windows - // this *REALLY* needs a better name - SH_MainWindow_SpaceBelowMenuBar, - - // bool - select the text in the line edit about the listbox when selecting - // an item from the listbox, or when the line edit receives focus, ala Windows - SH_FontDialog_SelectAssociatedText, - - // bool - allows disabled menu items to be active - SH_PopupMenu_AllowActiveAndDisabled, - - // bool - pressing space activates item, ala Motif - SH_PopupMenu_SpaceActivatesItem, - - // int - number of milliseconds to wait before opening a submenu - // 256 on windows, 96 on motif - SH_PopupMenu_SubMenuPopupDelay, - - // bool - should scrollviews draw their frame only around contents (ala Motif), - // or around contents, scrollbars and corner widgets (ala Windows) ? - SH_ScrollView_FrameOnlyAroundContents, - - // bool - menubars items are navigatable by pressing alt, followed by using - // the arrow keys to select the desired item - SH_MenuBar_AltKeyNavigation, - - // bool - mouse tracking in combobox dropdown lists - SH_ComboBox_ListMouseTracking, - - // bool - mouse tracking in popupmenus - SH_PopupMenu_MouseTracking, - - // bool - mouse tracking in menubars - SH_MenuBar_MouseTracking, - - // bool - gray out selected items when loosing focus - SH_ItemView_ChangeHighlightOnFocus, - - // bool - supports shared activation among modeless widgets - SH_Widget_ShareActivation, - - // bool - workspace should just maximize the client area - SH_Workspace_FillSpaceOnMaximize, - - // bool - supports popup menu comboboxes - SH_ComboBox_Popup, - - // bool - titlebar has no border - SH_TitleBar_NoBorder, - - // bool - stop scrollbar at mouse - SH_ScrollBar_StopMouseOverSlider, - - //bool - blink cursort with selected text - SH_BlinkCursorWhenTextSelected, - - //bool - richtext selections extend the full width of the docuemnt - SH_RichText_FullWidthSelection, - - //bool - popupmenu supports scrolling instead of multicolumn mode - SH_PopupMenu_Scrollable, - - // TQt::AlignmentFlags - text label vertical alignment in groupboxes - // Center on windows, Auto|VCenter otherwize - SH_GroupBox_TextLabelVerticalAlignment, - - // TQt::TQRgb - text label color in groupboxes - SH_GroupBox_TextLabelColor, - - // bool - popupmenu supports sloppy submenus - SH_PopupMenu_SloppySubMenus, - - // TQt::TQRgb - table grid color - SH_Table_GridLineColor, - - // TQChar - Unicode character for password char - SH_LineEdit_PasswordCharacter, - - // TQDialogButtons::Button - default button - SH_DialogButtons_DefaultButton, - - // TQToolBox - Boldness of the selected page title - SH_ToolBox_SelectedPageTitleBold, - - //bool - if a tabbar prefers not to have scroller arrows - SH_TabBar_PreferNoArrows, - - //bool - if left button should cause an absolute position - SH_ScrollBar_LeftClickAbsolutePosition, - - // TQEvent::Type - which mouse event to select a list view expansion - SH_ListViewExpand_SelectMouseType, - - //bool - if underline for accelerators - SH_UnderlineAccelerator, - - // bool - TQToolButton - if tool buttons should use a 3D frame - // when the mouse is over the button - SH_ToolButton_Uses3D, - - // bool - hide underlined accelerators uless Alt key is currently down - SH_HideUnderlineAcceleratorWhenAltUp, - - // int - width of menu check column - SH_MenuIndicatorColumnWidth, - - // bool - whether or not the lower two button drawing areas should be combined into one - SH_ScrollBar_CombineAddLineRegionDrawingAreas, - - // bool - whether or not the upper two button drawing areas should be combined into one - SH_ScrollBar_CombineSubLineRegionDrawingAreas, - - // TQt::TQRgb - color of the popup menu arrow (active, menuitem enabled) - SH_PopupMenu_SubMenuArrowColorActiveEnabled, - - // TQt::TQRgb - color of the popup menu arrow (active, menuitem disabled) - SH_PopupMenu_SubMenuArrowColorActiveDisabled, - - // TQt::TQRgb - color of the popup menu arrow (inactive, menuitem enabled) - SH_PopupMenu_SubMenuArrowColorInactiveEnabled, - - // TQt::TQRgb - color of the popup menu arrow (active, menuitem disabled) - SH_PopupMenu_SubMenuArrowColorInactiveDisabled, - - // do not add any values below/greater than this - SH_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual int styleHint( StyleHint stylehint, - const TQWidget *widget = 0, - const TQStyleOption& = TQStyleOption::Default, - TQStyleHintReturn* returnData = 0 - ) const; - - // New API - virtual int styleHint( StyleHint stylehint, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQStyleOption& = TQStyleOption::Default, - TQStyleHintReturn* returnData = 0, - const TQWidget *widget = 0 - ) const = 0; - - - enum StylePixmap { - SP_TitleBarMinButton, - SP_TitleBarMaxButton, - SP_TitleBarCloseButton, - SP_TitleBarNormalButton, - SP_TitleBarShadeButton, - SP_TitleBarUnshadeButton, - SP_DockWindowCloseButton, - SP_MessageBoxInformation, - SP_MessageBoxWarning, - SP_MessageBoxCritical, - SP_MessageBoxQuestion, - - // do not add any values below/greater than this - SP_CustomBase = 0xf0000000 - }; - - // Old API - // DEPRECATED - virtual TQPixmap stylePixmap( StylePixmap stylepixmap, - const TQWidget *widget = 0, - const TQStyleOption& = TQStyleOption::Default ) const; - - virtual TQPixmap stylePixmap( StylePixmap stylepixmap, - const TQStyleControlElementData &ceData, - ControlElementFlags elementFlags, - const TQStyleOption& = TQStyleOption::Default, - const TQWidget *widget = 0 ) const = 0; - - - // Old API - // DEPRECATED - static TQRect visualRect( const TQRect &logical, const TQWidget *w ); - - // New API - static TQRect visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); - - static TQRect visualRect( const TQRect &logical, const TQRect &bounding ); - - - // Object event handling API - typedef TQMap ObjectEventSourceToHandlerMap; - typedef TQMap ObjectEventSourceDataToHandlerMap; - typedef TQMap ObjectEventSourceFlagsToHandlerMap; - typedef bool (*EventHandlerInstallationHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler); - typedef bool (*EventHandlerRemovalHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler); - void installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); - void removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); - void setEventHandlerInstallationHook( EventHandlerInstallationHook ); - void setEventHandlerRemovalHook( EventHandlerRemovalHook hook ); - virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); - - enum WidgetActionRequest { - WAR_Repaint, - WAR_RepaintRect, - WAR_EnableMouseTracking, - WAR_DisableMouseTracking, - WAR_SetAutoMask, - WAR_UnSetAutoMask, - WAR_SetCheckable, - WAR_UnSetCheckable, - WAR_FrameSetStyle, - WAR_FrameSetLineWidth, - WAR_SetLayoutMargin, - WAR_SetPalette, - WAR_SetBackgroundMode, - WAR_SetBackgroundOrigin, - WAR_SetFont, - WAR_RepaintAllAccelerators, - WAR_SetDefault, - WAR_UnSetDefault, - WAR_SendPaintEvent - }; - - typedef bool (*WidgetActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData); - void setWidgetActionRequestHook( WidgetActionRequestHook ); - virtual bool widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData = TQStyleWidgetActionRequestData() ); - - enum ApplicationActionRequest { - AAR_SetPalette, - AAR_SetFont - }; - - typedef bool (*ApplicationActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData); - void setApplicationActionRequestHook( ApplicationActionRequestHook ); - virtual bool applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData = TQStyleApplicationActionRequestData() ); - - // Old 2.x TQStyle API - -#ifndef TQT_NO_COMPAT - int defaultFrameWidth() const; - void tabbarMetrics( const TQWidget* t, int& hf, int& vf, int& ov ) const; - TQSize scrollBarExtent() const; -#endif - -public: - virtual bool eventFilter( TQObject *, TQEvent * ); - bool acceleratorsShown() const; - -protected: - void acceleratorKeypressEventMonitor( TQObject *, TQEvent * ); - -private: - TQStylePrivate * d; - -#if defined(TQ_DISABLE_COPY) - TQStyle( const TQStyle & ); - TQStyle& operator=( const TQStyle & ); -#endif - - EventHandlerInstallationHook m_eventHandlerInstallationHook; - EventHandlerRemovalHook m_eventHandlerRemovalHook; - WidgetActionRequestHook m_widgetActionRequestHook; - ApplicationActionRequestHook m_applicationActionRequestHook; - ObjectEventSourceToHandlerMap m_objectEventSourceToHandlerMap; - ObjectEventSourceDataToHandlerMap m_objectEventSourceDataToHandlerMap; - ObjectEventSourceFlagsToHandlerMap m_objectEventSourceFlagsToHandlerMap; - bool conditionalAcceleratorsEnabled; -}; - -inline TQStyle::ControlElementFlags operator|(const TQStyle::ControlElementFlags a, const TQStyle::ControlElementFlags b) { return static_cast(static_cast(a) | static_cast(b)); } -// inline TQStyle::ControlElementFlags operator|=(TQStyle::ControlElementFlags &a, const TQStyle::ControlElementFlags b) { a = static_cast(static_cast(a) | static_cast(b)); return a; } - -TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWidget* widget, const TQStyleOption& opt, bool populateReliantFields=true); -TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromApplication(const TQApplication* app, const TQStyleOption& opt, bool populateReliantFields=true); -TQ_EXPORT TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* object, const TQStyleOption& opt, bool populateReliantFields=true); -TQ_EXPORT TQStringList getObjectTypeListForObject(const TQObject* object); -TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWidget* widget, const TQStyleOption& opt, bool populateReliantFields, bool populateMinimumNumberOfFields); - -#endif // TQT_NO_STYLE -#endif // TQSTYLE_H diff --git a/src/kernel/ntqstylesheet.h b/src/kernel/ntqstylesheet.h deleted file mode 100644 index 1c12775c..00000000 --- a/src/kernel/ntqstylesheet.h +++ /dev/null @@ -1,253 +0,0 @@ -/**************************************************************************** -** -** Definition of the TQStyleSheet class -** -** Created : 990101 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSTYLESHEET_H -#define TQSTYLESHEET_H - -#ifndef QT_H -#include "tqstring.h" -#include "tqvaluelist.h" -#include "tqptrvector.h" -#include "ntqdict.h" -#include "tqobject.h" -#endif // QT_H - -#ifndef TQT_NO_RICHTEXT - -class TQStyleSheet; -class TQTextDocument; -template class TQMap; -class TQStyleSheetItemData; - -class TQ_EXPORT TQStyleSheetItem : public TQt -{ -public: - TQStyleSheetItem( TQStyleSheet* parent, const TQString& name ); - TQStyleSheetItem( const TQStyleSheetItem & ); - ~TQStyleSheetItem(); - - TQStyleSheetItem& operator=( const TQStyleSheetItem& other ); - - TQString name() const; - - TQStyleSheet* styleSheet(); - const TQStyleSheet* styleSheet() const; - - enum AdditionalStyleValues { Undefined = - 1}; - - enum DisplayMode { - DisplayBlock, - DisplayInline, - DisplayListItem, - DisplayNone -#ifndef Q_QDOC - , DisplayModeUndefined = -1 -#endif - }; - - DisplayMode displayMode() const; - void setDisplayMode(DisplayMode m); - - int alignment() const; - void setAlignment( int f); - - enum VerticalAlignment { - VAlignBaseline, - VAlignSub, - VAlignSuper - }; - - VerticalAlignment verticalAlignment() const; - void setVerticalAlignment( VerticalAlignment valign ); - - int fontWeight() const; - void setFontWeight(int w); - - int logicalFontSize() const; - void setLogicalFontSize(int s); - - int logicalFontSizeStep() const; - void setLogicalFontSizeStep( int s ); - - int fontSize() const; - void setFontSize(int s); - - TQString fontFamily() const; - void setFontFamily( const TQString& ); - - int numberOfColumns() const; - void setNumberOfColumns(int ncols); - - TQColor color() const; - void setColor( const TQColor &); - - bool fontItalic() const; - void setFontItalic( bool ); - bool definesFontItalic() const; - - bool fontUnderline() const; - void setFontUnderline( bool ); - bool definesFontUnderline() const; - - bool fontStrikeOut() const; - void setFontStrikeOut( bool ); - bool definesFontStrikeOut() const; - - bool isAnchor() const; - void setAnchor(bool anc); - - enum WhiteSpaceMode { - WhiteSpaceNormal, - WhiteSpacePre, - WhiteSpaceNoWrap -#ifndef Q_QDOC - , WhiteSpaceModeUndefined = -1 -#endif - }; - WhiteSpaceMode whiteSpaceMode() const; - void setWhiteSpaceMode(WhiteSpaceMode m); - - enum Margin { - MarginLeft, - MarginRight, - MarginTop, - MarginBottom, - MarginFirstLine, - MarginAll, - MarginVertical, - MarginHorizontal -#ifndef Q_QDOC - , MarginUndefined = -1 -#endif - }; - - int margin( Margin m) const; - void setMargin( Margin, int); - - enum ListStyle { - ListDisc, - ListCircle, - ListSquare, - ListDecimal, - ListLowerAlpha, - ListUpperAlpha -#ifndef Q_QDOC - , ListStyleUndefined = -1 -#endif - }; - - ListStyle listStyle() const; - void setListStyle( ListStyle ); - - TQString contexts() const; - void setContexts( const TQString& ); - bool allowedInContext( const TQStyleSheetItem* ) const; - - bool selfNesting() const; - void setSelfNesting( bool ); - - void setLineSpacing( int ls ); - int lineSpacing() const; - -private: - void init(); - TQStyleSheetItemData* d; -}; - - -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector >; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -// MOC_SKIP_END -#endif - -#ifndef TQT_NO_TEXTCUSTOMITEM -class TQTextCustomItem; -#endif - -class TQ_EXPORT TQStyleSheet : public TQObject -{ - TQ_OBJECT -public: - TQStyleSheet( TQObject *parent=0, const char *name=0 ); - virtual ~TQStyleSheet(); - - static TQStyleSheet* defaultSheet(); - static void setDefaultSheet( TQStyleSheet* ); - - - TQStyleSheetItem* item( const TQString& name); - const TQStyleSheetItem* item( const TQString& name) const; - - void insert( TQStyleSheetItem* item); - -#ifndef TQT_NO_TEXTCUSTOMITEM - virtual TQTextCustomItem* tag( const TQString& name, - const TQMap &attr, - const TQString& context, - const TQMimeSourceFactory& factory, - bool emptyTag, TQTextDocument *doc ) const; -#endif - static TQString escape( const TQString& ); - static TQString convertFromPlainText( const TQString&, - TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre ); - static bool mightBeRichText( const TQString& ); - - virtual void scaleFont( TQFont& font, int logicalSize ) const; - - virtual void error( const TQString& ) const; - -private: - void init(); - TQDict styles; - TQStyleSheetItem* nullstyle; -private: // Disabled copy constructor and operator= -#if defined(TQ_DISABLE_COPY) - TQStyleSheet( const TQStyleSheet & ); - TQStyleSheet &operator=( const TQStyleSheet & ); -#endif -}; - -#endif // TQT_NO_RICHTEXT - -#endif // TQSTYLESHEET_H diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index 78ce0ca5..46dd439d 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -71,7 +71,7 @@ #include "tqiconset.h" #include "ntqbutton.h" #include -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqframe.h" #include "ntqfile.h" #include "ntqfileinfo.h" @@ -168,7 +168,7 @@ #include #include #include -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include #include #include @@ -222,8 +222,8 @@ #include "ntqtranslator.h" #include #include -#include -#include +#include +#include #include "tqtextedit.h" #include #include @@ -291,7 +291,7 @@ #include "private/tqsqlmanager_p.h" #include "private/qlock_p.h" #include "private/qcomponentfactory_p.h" -#include "private/qstyleinterface_p.h" +#include "private/tqstyleinterface_p.h" #include "private/qrichtext_p.h" #include "private/qsvgdevice_p.h" #include "private/qfontcodecs_p.h" diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index baf5ba49..5ba5f5b2 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -54,8 +54,8 @@ #include "ntqdragobject.h" #include "ntqclipboard.h" #include "ntqcursor.h" -#include "ntqstyle.h" -#include "ntqstylefactory.h" +#include "tqstyle.h" +#include "tqstylefactory.h" #include "ntqfile.h" #include "ntqmessagebox.h" #include "ntqdir.h" diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 0cfd812c..0a1d62cf 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -85,7 +85,7 @@ #include "ntqclipboard.h" #include "ntqwhatsthis.h" // ######## dependency #include "ntqsettings.h" -#include "ntqstylefactory.h" +#include "tqstylefactory.h" #include "ntqfileinfo.h" // Input method stuff - UNFINISHED diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index cd4c3105..1d962642 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -50,7 +50,7 @@ #include "ntqapplication.h" #include "tqmap.h" #include "ntqfileinfo.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "ntqmime.h" #include "tqimage.h" #include "ntqdragobject.h" @@ -60,7 +60,7 @@ #include "ntqcursor.h" #include "tqptrstack.h" #include "tqptrdict.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqcleanuphandler.h" #include "tqtextengine_p.h" #include diff --git a/src/kernel/qrichtext_p.h b/src/kernel/qrichtext_p.h index 58fed982..f30c2914 100644 --- a/src/kernel/qrichtext_p.h +++ b/src/kernel/qrichtext_p.h @@ -69,7 +69,7 @@ #include "tqobject.h" #include "ntqdict.h" #include "ntqpixmap.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "tqptrvector.h" #include "ntqpainter.h" #include "ntqlayout.h" diff --git a/src/kernel/qsizegrip.cpp b/src/kernel/qsizegrip.cpp index a6629ecf..f4528c3b 100644 --- a/src/kernel/qsizegrip.cpp +++ b/src/kernel/qsizegrip.cpp @@ -44,7 +44,7 @@ #include "ntqpainter.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(TQ_WS_X11) #include "qt_x11_p.h" diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp deleted file mode 100644 index d45540bb..00000000 --- a/src/kernel/qstyle.cpp +++ /dev/null @@ -1,2911 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQStyle class -** -** Created : 981231 -** -** Copyright (C) 1998-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqstyle.h" -#ifndef TQT_NO_STYLE -#include "ntqapplication.h" -#include "ntqpainter.h" -#include "ntqbitmap.h" -#include "ntqpixmapcache.h" -#include "ntqframe.h" -#include "ntqlayout.h" -#include "ntqlistview.h" -#include "ntqpopupmenu.h" -#include "ntqpushbutton.h" -#include "tqobjectlist.h" -#include "tqwidgetlist.h" - -#include - -class TQStylePrivate -{ -public: - TQStylePrivate() - { - } -}; - -TQStyleOption::TQStyleOption(StyleOptionDefault) : - def(TRUE), - tb(NULL), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(int in1) : - def(FALSE), - tb(NULL), - i1(in1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(int in1, int in2) : - def(FALSE), - tb(NULL), - i1(in1), - i2(in2), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) : - def(FALSE), - tb(NULL), - i1(in1), - i2(in2), - i3(in3), - i4(in4), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQMenuItem* m) : - def(FALSE), - mi(m), - tb(NULL), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) : - def(FALSE), - mi(m), - tb(NULL), - i1(in1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) : - def(FALSE), - mi(m), - tb(NULL), - i1(in1), - i2(in2), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(const TQColor& c) : - def(FALSE), - tb(NULL), - cl(&c), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQTab* t) : - def(FALSE), - tb(t), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQListViewItem* i) : - def(FALSE), - tb(NULL), - li(i), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQCheckListItem* i) : - def(FALSE), - tb(NULL), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(i), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQt::ArrowType a) : - def(FALSE), - tb(NULL), - i1((int)a), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(const TQRect& r) : - def(FALSE), - tb(NULL), - i1(r.x()), - i2(r.y()), - i3(r.width()), - i4(r.height()), - i5(-1), - cli(NULL), - tbh(NULL) { - // -} - -TQStyleOption::TQStyleOption(TQWidget *w) : - def(FALSE), - tb(NULL), - i1(-1), - i2(-1), - i3(-1), - i4(-1), - i5(-1), - cli(NULL), - p1((void*)w), - tbh(NULL) { - // -} - -/*! - \class TQStyleOption ntqstyle.h - \brief The TQStyleOption class specifies optional parameters for TQStyle functions. - \ingroup appearance - - Some TQStyle functions take an optional argument specifying extra - information that is required for a paritical primitive or control. - So that the TQStyle class can be extended, TQStyleOption is used to - provide a variable-argument for these options. - - The TQStyleOption class has constructors for each type of optional - argument, and this set of constructors may be extended in future - TQt releases. There are also corresponding access functions that - return the optional arguments: these too may be extended. - - For each constructor, you should refer to the documentation of the - TQStyle functions to see the meaning of the arguments. - - When calling TQStyle functions from your own widgets, you must only - pass the default TQStyleOption or the argument that TQStyle is - documented to accept. For example, if the function expects - TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *) - leaves the optional integer argument uninitialized. - - When subclassing TQStyle, you must similarly only expect the - default or documented arguments. The other arguments will have - uninitialized values. - - If you make your own TQStyle subclasses and your own widgets, you - can make a subclass of TQStyleOption to pass additional arguments - to your TQStyle subclass. You will need to cast the "const - TQStyleOption&" argument to your subclass, so be sure your style - has been called from your widget. -*/ - -/*! - \enum TQStyleOption::StyleOptionDefault - - This enum value can be passed as the optional argument to any - TQStyle function. - - \value Default -*/ - -/*! - \fn TQStyleOption::TQStyleOption(StyleOptionDefault) - - The default option. This can always be passed as the optional - argument to TQStyle functions. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(int) - - Pass one integer, \a in1. For example, headerSection. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(int, int) - - Pass two integers, \a in1 and \a in2. For example, linewidth and - midlinewidth. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(int, int, int, int) - - Pass four integers, \a in1, \a in2, \a in3 and \a in4. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQMenuItem*) - - Pass a menu item, \a m. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQMenuItem*, int) - - Pass a menu item and an integer, \a m and \a in1. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQMenuItem*, int, int) - - Pass a menu item and two integers, \a m, \a in1 and \a in2. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(const TQColor&) - - Pass a color, \a c. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQTab*) - - Pass a TQTab, \a t. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQListViewItem*) - - Pass a TQListViewItem, \a i. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQt::ArrowType) - - Pass an TQt::ArrowType, \a a. -*/ - -/*! - \fn TQStyleOption::TQStyleOption(TQCheckListItem* i) - - Pass a TQCheckListItem, \a i. -*/ - -/*! - \fn TQStyleOption::TQStyleOption( const TQRect &r ) - - Pass a TQRect, \a r. -*/ - -/*! - \fn TQStyleOption::TQStyleOption( TQWidget *w ) - - Pass a TQWidget, \a w. -*/ - -/*! - \fn bool TQStyleOption::isDefault() const - - Returns TRUE if the option was constructed with the default - constructor; otherwise returns FALSE. -*/ - -/*! - \fn int TQStyleOption::day() const - - Returns the index of the day in the month if the appropriate - constructor was called; otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::lineWidth() const - - Returns the line width if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::midLineWidth() const - - Returns the mid-line width if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::frameShape() const - - Returns a TQFrame::Shape value if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::frameShadow() const - - Returns a TQFrame::Shadow value if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn TQMenuItem* TQStyleOption::menuItem() const - - Returns a menu item if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::maxIconWidth() const - - Returns the maximum width of the menu item check area if the - appropriate constructor was called; otherwise the return value is - undefined. -*/ - -/*! - \fn int TQStyleOption::tabWidth() const - - Returns the tab indent width if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn int TQStyleOption::headerSection() const - - Returns the header section if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn const TQColor& TQStyleOption::color() const - - Returns a color if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn TQTab* TQStyleOption::tab() const - - Returns a TQTabBar tab if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn TQListViewItem* TQStyleOption::listViewItem() const - - Returns a TQListView item if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn TQt::ArrowType TQStyleOption::arrowType() const - - Returns an arrow type if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn TQCheckListItem* TQStyleOption::checkListItem() const - - Returns a check list item if the appropriate constructor was - called; otherwise the return value is undefined. -*/ - -/*! - \fn TQRect TQStyleOption::rect() const - - Returns a rectangle if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \fn TQWidget* TQStyleOption::widget() const - - Returns a pointer to a widget if the appropriate constructor was called; - otherwise the return value is undefined. -*/ - -/*! - \class TQStyle ntqstyle.h - \brief The TQStyle class specifies the look and feel of a GUI. - \ingroup appearance - - A large number of GUI elements are common to many widgets. The - TQStyle class allows the look of these elements to be modified - across all widgets that use the TQStyle functions. It also - provides two feel options: Motif and Windows. - - Although it is not possible to fully enumerate the look of - graphical elements and the feel of widgets in a GUI, TQStyle - provides a considerable amount of control and customisability. - - In TQt 1.x the look and feel option for widgets was specified by a - single value: the GUIStyle. Starting with TQt 2.0, this notion was - expanded to allow the look to be specified by virtual drawing - functions. - - Derived classes may reimplement some or all of the drawing - functions to modify the look of all widgets that use those - functions. - - Languages written from right to left (such as Arabic and Hebrew) - usually also mirror the whole layout of widgets. If you design a - style, you should take special care when drawing asymmetric - elements to make sure that they also look correct in a mirrored - layout. You can start your application with \c -reverse to check - the mirrored layout. Also notice, that for a reversed layout, the - light usually comes from top right instead of top left. - - The actual reverse layout is performed automatically when - possible. However, for the sake of flexibility, the translation - cannot be performed everywhere. The documentation for each - function in the TQStyle API states whether the function - expects/returns logical or screen coordinates. Using logical - coordinates (in ComplexControls, for example) provides great - flexibility in controlling the look of a widget. Use visualRect() - when necessary to translate logical coordinates into screen - coordinates for drawing. - - In TQt versions prior to 3.0, if you wanted a low level route into - changing the appearance of a widget, you would reimplement - polish(). With the new 3.0 style engine the recommended approach - is to reimplement the draw functions, for example drawItem(), - drawPrimitive(), drawControl(), drawControlMask(), - drawComplexControl() and drawComplexControlMask(). Each of these - functions is called with a range of parameters that provide - information that you can use to determine how to draw them, e.g. - style flags, rectangle, color group, etc. - - For information on changing elements of an existing style or - creating your own style see the \link customstyles.html Style - overview\endlink. - - Styles can also be created as \link plugins-howto.html - plugins\endlink. -*/ - -/*! - \enum TQt::GUIStyle - - \obsolete - - \value WindowsStyle - \value MotifStyle - \value MacStyle - \value Win3Style - \value PMStyle -*/ - -/*! - \enum TQt::UIEffect - - \value UI_General - \value UI_AnimateMenu - \value UI_FadeMenu - \value UI_AnimateCombo - \value UI_AnimateTooltip - \value UI_FadeTooltip - \value UI_AnimateToolBox Reserved -*/ - -/*! - Constructs a TQStyle. -*/ -TQStyle::TQStyle() -{ - m_eventHandlerInstallationHook = NULL; - m_eventHandlerRemovalHook = NULL; - m_widgetActionRequestHook = NULL; - m_applicationActionRequestHook = NULL; - conditionalAcceleratorsEnabled = false; - d = new TQStylePrivate; -} - -/*! - Destroys the style and frees all allocated resources. -*/ -TQStyle::~TQStyle() -{ - delete d; - d = 0; -} - -/* - \fn GUIStyle TQStyle::guiStyle() const - \obsolete - - Returns an indicator to the additional "feel" component of a - style. Current supported values are TQt::WindowsStyle and TQt::MotifStyle. -*/ - -/*! - Initializes the appearance of a widget. - - This function is called for every widget at some point after it - has been fully created but just \e before it is shown the very - first time. - - Reasonable actions in this function might be to call - TQWidget::setBackgroundMode() for the widget. An example of highly - unreasonable use would be setting the geometry! Reimplementing - this function gives you a back-door through which you can change - the appearance of a widget. With TQt 3.0's style engine you will - rarely need to write your own polish(); instead reimplement - drawItem(), drawPrimitive(), etc. - - The TQWidget::inherits() function may provide enough information to - allow class-specific customizations. But be careful not to - hard-code things too much because new TQStyle subclasses are - expected to work reasonably with all current and \e future - widgets. - - \sa unPolish() -*/ -void TQStyle::polish( TQWidget *widget ) { - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - polish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); -} - -/*! - Undoes the initialization of a widget's appearance. - - This function is the counterpart to polish. It is called for every - polished widget when the style is dynamically changed. The former - style has to unpolish its settings before the new style can polish - them again. - - \sa polish() -*/ -void TQStyle::unPolish( TQWidget *widget ) { - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - unPolish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); -} - -/*! - Initializes the appearance of a widget. - - This function is called for every widget at some point after it - has been fully created but just \e before it is shown the very - first time. - - Reasonable actions in this function might be to install a widget - event handler for the style. An example of highly unreasonable - use would be setting the geometry! With TQt 3.0's style engine - you will rarely need to write your own polish(); instead reimplement - drawItem(), drawPrimitive(), etc. - - The \a objectTypes object may provide enough information to - allow class-specific customizations. But be careful not to - hard-code things too much because new TQStyle subclasses are - expected to work reasonably with all current and \e future - widgets. - - You may specify either a TQWidget pointer or a custom pointer. - If a custom pointer is specified, you must be careful to intercept any event - handler installation/removal calls via setEventHandlerInstallationHook and - setEventHandlerRemovalHook. - - \sa unPolish() -*/ -void TQStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { - if (ceData.widgetObjectTypes.contains("TQWidget")) { - // Enable dynamic hide/show of accelerator shortcuts - TQWidget* widget = reinterpret_cast(ptr); - widget->installEventFilter(this); - } -} - -/*! - Undoes the initialization of a widget's appearance. - - This function is the counterpart to polish. It is called for every - polished widget when the style is dynamically changed. The former - style has to unpolish its settings before the new style can polish - them again. - - \sa polish() -*/ -void TQStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { - if (ceData.widgetObjectTypes.contains("TQWidget")) { - // Disable dynamic hide/show of accelerator shortcuts - TQWidget* widget = reinterpret_cast(ptr); - widget->installEventFilter(this); - } -} - -/*! - \overload - Late initialization of the TQApplication object. - - \sa unPolish() -*/ -void TQStyle::polish( TQApplication *app ) { - const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); - applicationPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); -} - -/*! - \overload - - Undoes the application polish. - - \sa polish() -*/ -void TQStyle::unPolish( TQApplication *app ) { - const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); - applicationUnPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); -} - -/*! - \overload - Late initialization of the TQApplication object or other global application object. - - You may specify either a TQApplication pointer or a custom pointer. - If a custom pointer is specified, you must be careful to intercept any event - handler installation/removal calls via setEventHandlerInstallationHook and - setEventHandlerRemovalHook. - - \sa unPolish() -*/ -void TQStyle::applicationPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { - // -} - -/*! - \overload - - Undoes the application polish. - - You may specify either a TQApplication pointer or a custom pointer. - If a custom pointer is specified, you must be careful to intercept any event - handler installation/removal calls via setEventHandlerInstallationHook and - setEventHandlerRemovalHook. - - \sa polish() -*/ -void TQStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { - // -} - -/*! - \overload - - The style may have certain requirements for color palettes. In - this function it has the chance to change the palette according to - these requirements. - - \sa TQPalette, TQApplication::setPalette() -*/ -void TQStyle::polish( TQPalette&) -{ -} - -/*! - Polishes the popup menu according to the GUI style. This usually - means setting the mouse tracking - (\l{TQPopupMenu::setMouseTracking()}) and whether the menu is - checkable by default (\l{TQPopupMenu::setCheckable()}). -*/ -void TQStyle::polishPopupMenu( TQPopupMenu *pm ) { - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(pm, TQStyleOption()); - polish(ceData, getControlElementFlagsForObject(pm, TQStyleOption()), pm); -} - -/*! - Polishes the popup menu according to the GUI style. This usually - means setting the mouse tracking - (\l{TQPopupMenu::setMouseTracking()}) and whether the menu is - checkable by default (\l{TQPopupMenu::setCheckable()}). -*/ -void TQStyle::polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * ) -{ -} - -/*! - Returns the appropriate area (see below) within rectangle \a r in - which to draw the \a text or \a pixmap using painter \a p. If \a - len is -1 (the default) all the \a text is drawn; otherwise only - the first \a len characters of \a text are drawn. The text is - aligned in accordance with the alignment \a flags (see - \l{TQt::AlignmentFlags}). The \a enabled bool indicates whether or - not the item is enabled. - - If \a r is larger than the area needed to render the \a text the - rectangle that is returned will be offset within \a r in - accordance with the alignment \a flags. For example if \a flags is - \c AlignCenter the returned rectangle will be centered within \a - r. If \a r is smaller than the area needed the rectangle that is - returned will be \e larger than \a r (the smallest rectangle large - enough to render the \a text or \a pixmap). - - By default, if both the text and the pixmap are not null, the - pixmap is drawn and the text is ignored. -*/ -TQRect TQStyle::itemRect( TQPainter *p, const TQRect &r, - int flags, bool enabled, const TQPixmap *pixmap, - const TQString& text, int len ) const -{ - TQRect result; - int x = r.x(); - int y = r.y(); - int w = r.width(); - int h = r.height(); - GUIStyle gs = (GUIStyle)styleHint( SH_GUIStyle ); - - if ( pixmap ) { - if ( (flags & TQt::AlignVCenter) == TQt::AlignVCenter ) - y += h/2 - pixmap->height()/2; - else if ( (flags & TQt::AlignBottom) == TQt::AlignBottom) - y += h - pixmap->height(); - if ( (flags & TQt::AlignRight) == TQt::AlignRight ) - x += w - pixmap->width(); - else if ( (flags & TQt::AlignHCenter) == TQt::AlignHCenter ) - x += w/2 - pixmap->width()/2; - else if ( (flags & TQt::AlignLeft) != TQt::AlignLeft && TQApplication::reverseLayout() ) - x += w - pixmap->width(); - result = TQRect(x, y, pixmap->width(), pixmap->height()); - } else if ( !text.isNull() && p ) { - result = p->boundingRect( x, y, w, h, flags, text, len ); - if ( gs == TQt::WindowsStyle && !enabled ) { - result.setWidth(result.width()+1); - result.setHeight(result.height()+1); - } - } else { - result = TQRect(x, y, w, h); - } - - return result; -} - - -/*! - Draws the \a text or \a pixmap in rectangle \a r using painter \a - p and color group \a g. The pen color is specified with \a - penColor. The \a enabled bool indicates whether or not the item is - enabled; when reimplementing this bool should influence how the - item is drawn. If \a len is -1 (the default) all the \a text is - drawn; otherwise only the first \a len characters of \a text are - drawn. The text is aligned and wrapped according to the alignment - \a flags (see \l{TQt::AlignmentFlags}). - - By default, if both the text and the pixmap are not null, the - pixmap is drawn and the text is ignored. -*/ -void TQStyle::drawItem( TQPainter *p, const TQRect &r, - int flags, const TQColorGroup &g, bool enabled, - const TQPixmap *pixmap, const TQString& text, int len, - const TQColor* penColor ) const -{ - int x = r.x(); - int y = r.y(); - int w = r.width(); - int h = r.height(); - GUIStyle gs = (GUIStyle)styleHint( SH_GUIStyle ); - - p->setPen( penColor?*penColor:g.foreground() ); - if ( pixmap ) { - TQPixmap pm( *pixmap ); - bool clip = (flags & TQt::DontClip) == 0; - if ( clip ) { - if ( pm.width() < w && pm.height() < h ) { - clip = FALSE; - } else { - p->save(); - TQRegion cr = TQRect(x, y, w, h); - if (p->hasClipping()) - cr &= p->clipRegion(TQPainter::CoordPainter); - p->setClipRegion(cr); - } - } - if ( (flags & TQt::AlignVCenter) == TQt::AlignVCenter ) - y += h/2 - pm.height()/2; - else if ( (flags & TQt::AlignBottom) == TQt::AlignBottom) - y += h - pm.height(); - if ( (flags & TQt::AlignRight) == TQt::AlignRight ) - x += w - pm.width(); - else if ( (flags & TQt::AlignHCenter) == TQt::AlignHCenter ) - x += w/2 - pm.width()/2; - else if ( ((flags & TQt::AlignLeft) != TQt::AlignLeft) && TQApplication::reverseLayout() ) // AlignAuto && rightToLeft - x += w - pm.width(); - - if ( !enabled ) { - if ( pm.mask() ) { // pixmap with a mask - if ( !pm.selfMask() ) { // mask is not pixmap itself - TQPixmap pmm( *pm.mask() ); - pmm.setMask( *((TQBitmap *)&pmm) ); - pm = pmm; - } - } else if ( pm.depth() == 1 ) { // monochrome pixmap, no mask - pm.setMask( *((TQBitmap *)&pm) ); -#ifndef TQT_NO_IMAGE_HEURISTIC_MASK - } else { // color pixmap, no mask - TQString k; - k.sprintf( "$qt-drawitem-%x", pm.serialNumber() ); - TQPixmap *mask = TQPixmapCache::find(k); - bool del=FALSE; - if ( !mask ) { - mask = new TQPixmap( pm.createHeuristicMask() ); - mask->setMask( *((TQBitmap*)mask) ); - del = !TQPixmapCache::insert( k, mask ); - } - pm = *mask; - if (del) delete mask; -#endif - } - if ( gs == TQt::WindowsStyle ) { - p->setPen( g.light() ); - p->drawPixmap( x+1, y+1, pm ); - p->setPen( g.text() ); - } - } - p->drawPixmap( x, y, pm ); - if ( clip ) - p->restore(); - } else if ( !text.isNull() ) { - if ( gs == TQt::WindowsStyle && !enabled ) { - p->setPen( g.light() ); - p->drawText( x+1, y+1, w, h, flags, text, len ); - p->setPen( g.text() ); - } - p->drawText( x, y, w, h, flags, text, len ); - } -} - -/*! - \enum TQStyle::PrimitiveElement - - This enum represents the PrimitiveElements of a style. A - PrimitiveElement is a common GUI element, such as a checkbox - indicator or pushbutton bevel. - - \value PE_ButtonCommand button used to initiate an action, for - example, a TQPushButton. - \value PE_ButtonDefault this button is the default button, e.g. - in a dialog. - \value PE_ButtonBevel generic button bevel. - \value PE_ButtonTool tool button, for example, a TQToolButton. - \value PE_ButtonDropDown drop down button, for example, a tool - button that displays a popup menu, for example, TQPopupMenu. - - - \value PE_FocusRect generic focus indicator. - - - \value PE_ArrowUp up arrow. - \value PE_ArrowDown down arrow. - \value PE_ArrowRight right arrow. - \value PE_ArrowLeft left arrow. - - - \value PE_SpinWidgetUp up symbol for a spin widget, for example a - TQSpinBox. - \value PE_SpinWidgetDown down symbol for a spin widget. - \value PE_SpinWidgetPlus increase symbol for a spin widget. - \value PE_SpinWidgetMinus decrease symbol for a spin widget. - - - \value PE_Indicator on/off indicator, for example, a TQCheckBox. - \value PE_IndicatorMask bitmap mask for an indicator. - \value PE_ExclusiveIndicator exclusive on/off indicator, for - example, a TQRadioButton. - \value PE_ExclusiveIndicatorMask bitmap mask for an exclusive indicator. - - - \value PE_DockWindowHandle tear off handle for dock windows and - toolbars, for example \l{TQDockWindow}s and \l{TQToolBar}s. - \value PE_DockWindowSeparator item separator for dock window and - toolbar contents. - \value PE_DockWindowResizeHandle resize handle for dock windows. - - \value PE_Splitter splitter handle; see also TQSplitter. - - - \value PE_Panel generic panel frame; see also TQFrame. - \value PE_PanelPopup panel frame for popup windows/menus; see also - TQPopupMenu. - \value PE_PanelMenuBar panel frame for menu bars. - \value PE_PanelDockWindow panel frame for dock windows and toolbars. - \value PE_PanelTabWidget panel frame for tab widgets. - \value PE_PanelLineEdit panel frame for line edits. - \value PE_PanelGroupBox panel frame for group boxes. - - \value PE_TabBarBase area below tabs in a tab widget, for example, - TQTab. - - - \value PE_HeaderSection section of a list or table header; see also - TQHeader. - \value PE_HeaderArrow arrow used to indicate sorting on a list or table - header - \value PE_StatusBarSection section of a status bar; see also - TQStatusBar. - - - \value PE_GroupBoxFrame frame around a group box; see also - TQGroupBox. - \value PE_WindowFrame frame around a MDI window or a docking window - - - \value PE_Separator generic separator. - - - \value PE_SizeGrip window resize handle; see also TQSizeGrip. - - - \value PE_CheckMark generic check mark; see also TQCheckBox. - - - \value PE_ScrollBarAddLine scrollbar line increase indicator - (i.e. scroll down); see also TQScrollBar. - \value PE_ScrollBarSubLine scrollbar line decrease indicator (i.e. scroll up). - \value PE_ScrollBarAddPage scolllbar page increase indicator (i.e. page down). - \value PE_ScrollBarSubPage scrollbar page decrease indicator (i.e. page up). - \value PE_ScrollBarSlider scrollbar slider - \value PE_ScrollBarFirst scrollbar first line indicator (i.e. home). - \value PE_ScrollBarLast scrollbar last line indicator (i.e. end). - - - \value PE_ProgressBarChunk section of a progress bar indicator; see - also TQProgressBar. - - \value PE_CheckListController controller part of a listview item - \value PE_CheckListIndicator checkbox part of a listview item - \value PE_CheckListExclusiveIndicator radiobutton part of a listview item - \value PE_RubberBand rubber band used in such things as iconview - - \value PE_CustomBase base value for custom PrimitiveElements. - All values above this are reserved for custom use. Custom - values must be greater than this value. - - \sa drawPrimitive() -*/ -/*! \enum TQStyle::SFlags - \internal -*/ -/*! \enum TQStyle::SCFlags - \internal -*/ - -/*! - \enum TQStyle::StyleFlags - - This enum represents flags for drawing PrimitiveElements. Not all - primitives use all of these flags. Note that these flags may mean - different things to different primitives. For an explanation of - the relationship between primitives and their flags, as well as - the different meanings of the flags, see the \link - customstyles.html Style overview\endlink. - - \value Style_Default - \value Style_Enabled - \value Style_Raised - \value Style_Sunken - \value Style_Off - \value Style_NoChange - \value Style_On - \value Style_Down - \value Style_Horizontal - \value Style_HasFocus - \value Style_Top - \value Style_Bottom - \value Style_FocusAtBorder - \value Style_AutoRaise - \value Style_MouseOver - \value Style_Up - \value Style_Selected - \value Style_HasFocus - \value Style_Active - \value Style_ButtonDefault - - \sa drawPrimitive() -*/ - -/*! - \fn void TQStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption& opt) const - - Draws the style PrimitiveElement \a pe using the painter \a p in - the area \a r. Colors are used from the color group \a cg. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The rect \a r should be in screen coordinates. - - The \a flags argument is used to control how the PrimitiveElement - is drawn. Multiple flags can be OR'ed together. - - For example, a pressed button would be drawn with the flags \c - Style_Enabled and \c Style_Down. - - The \a opt argument can be used to control how various - PrimitiveElements are drawn. Note that \a opt may be the default - value even for PrimitiveElements that make use of extra options. - When \a opt is non-default, it is used as follows: - - \table - \header \i PrimitiveElement \i Options \i Notes - \row \i \l PE_FocusRect - \i \l TQStyleOption ( const \l TQColor & bg ) - \list - \i opt.\link TQStyleOption::color() color\endlink() - \endlist - \i \e bg is the background color on which the focus rect is being drawn. - \row \i12 \l PE_Panel - \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) - \list - \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() - \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() - \endlist - \i \e linewidth is the line width for drawing the panel. - \row \i \e midlinewidth is the mid-line width for drawing the panel. - \row \i12 \l PE_PanelPopup - \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) - \list - \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() - \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() - \endlist - \i \e linewidth is the line width for drawing the panel. - \row \i \e midlinewidth is the mid-line width for drawing the panel. - \row \i12 \l PE_PanelMenuBar - \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) - \list - \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() - \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() - \endlist - \i \e linewidth is the line width for drawing the panel. - \row \i \e midlinewidth is the mid-line width for drawing the panel. - \row \i12 \l PE_PanelDockWindow - \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) - \list - \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() - \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() - \endlist - \i \e linewidth is the line width for drawing the panel. - \row \i \e midlinewidth is the mid-line width for drawing the panel. - \row \i14 \l PE_GroupBoxFrame - \i14 \l TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) - \list - \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() - \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() - \i opt.\link TQStyleOption::frameShape() frameShape\endlink() - \i opt.\link TQStyleOption::frameShadow() frameShadow\endlink() - \endlist - \i \e linewidth is the line width for the group box. - \row \i \e midlinewidth is the mid-line width for the group box. - \row \i \e shape is the \link TQFrame::frameShape frame shape \endlink - for the group box. - \row \i \e shadow is the \link TQFrame::frameShadow frame shadow \endlink - for the group box. - \endtable - - - For all other \link TQStyle::PrimitiveElement - PrimitiveElements\endlink, \a opt is unused. - - \sa StyleFlags -*/ - -/*! - \enum TQStyle::ControlElement - - This enum represents a ControlElement. A ControlElement is part of - a widget that performs some action or displays information to the - user. - - \value CE_PushButton the bevel and default indicator of a TQPushButton. - \value CE_PushButtonLabel the label (iconset with text or pixmap) - of a TQPushButton. - - \value CE_CheckBox the indicator of a TQCheckBox. - \value CE_CheckBoxLabel the label (text or pixmap) of a TQCheckBox. - - \value CE_RadioButton the indicator of a TQRadioButton. - \value CE_RadioButtonLabel the label (text or pixmap) of a TQRadioButton. - - \value CE_TabBarTab the tab within a TQTabBar (a TQTab). - \value CE_TabBarLabel the label within a TQTab. - - \value CE_ProgressBarGroove the groove where the progress - indicator is drawn in a TQProgressBar. - \value CE_ProgressBarContents the progress indicator of a TQProgressBar. - \value CE_ProgressBarLabel the text label of a TQProgressBar. - - \value CE_PopupMenuItem a menu item in a TQPopupMenu. - \value CE_PopupMenuScroller scrolling areas in a popumenu when the - style supports scrolling. - \value CE_PopupMenuHorizontalExtra extra frame area set aside with PM_PopupMenuFrameHorizontalExtra - \value CE_PopupMenuVerticalExtra extra frame area set aside with PM_PopupMenuFrameVerticalExtra - - \value CE_MenuBarItem a menu item in a TQMenuBar. - - \value CE_ToolButtonLabel a tool button's label. - - \value CE_MenuBarEmptyArea the empty area of a TQMenuBar. - \value CE_DockWindowEmptyArea the empty area of a TQDockWindow. - - \value CE_ToolBoxTab the toolbox's tab area - \value CE_HeaderLabel the header's label - - \value CE_CustomBase base value for custom ControlElements. All values above - this are reserved for custom use. Therefore, custom values must be - greater than this value. - - \sa drawControl() -*/ - -/*! - \fn void TQStyle::drawControl( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, const TQStyleOption& opt, const TQWidget *widget) const - - Draws the ControlElement \a element using the painter \a p in the - area \a r. Colors are used from the color group \a cg. - - The rect \a r should be in screen coordinates. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a how argument is used to control how the ControlElement is - drawn. Multiple flags can be OR'ed together. See the table below - for an explanation of which flags are used with the various - ControlElements. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. Note that usage of the widget argument is deprecated - in favor of specifying widget parameters via \a ceData and \a elementFlags. - The widget can be cast to the appropriate type based - on the value of \a element. The \a opt argument can be used to - pass extra information required when drawing the ControlElement. - Note that \a opt may be the default value even for ControlElements - that can make use of the extra options. See the table below for - the appropriate \a widget and \a opt usage: - - \table - \header \i ControlElement
    \& Widget Cast - \i Style Flags - \i Notes - \i Options - \i Notes - - \row \i16 \l{CE_PushButton}(const \l TQPushButton *) - - and - - \l{CE_PushButtonLabel}(const \l TQPushButton *) - \i \l Style_Enabled \i Set if the button is enabled. - \i16 Unused. - \i16   - \row \i \l Style_HasFocus \i Set if the button has input focus. - \row \i \l Style_Raised \i Set if the button is not down, not on and not flat. - \row \i \l Style_On \i Set if the button is a toggle button and toggled on. - \row \i \l Style_Down \i Set if the button is down (i.e., the mouse button or - space bar is pressed on the button). - \row \i \l Style_ButtonDefault \i Set if the button is a default button. - - \row \i16 \l{CE_CheckBox}(const \l TQCheckBox *) - - and - - \l{CE_CheckBoxLabel}(const \l TQCheckBox *) - - \i \l Style_Enabled \i Set if the checkbox is enabled. - \i16 Unused. - \i16   - \row \i \l Style_HasFocus \i Set if the checkbox has input focus. - \row \i \l Style_On \i Set if the checkbox is checked. - \row \i \l Style_Off \i Set if the checkbox is not checked. - \row \i \l Style_NoChange \i Set if the checkbox is in the NoChange state. - \row \i \l Style_Down \i Set if the checkbox is down (i.e., the mouse button or - space bar is pressed on the button). - - \row \i15 \l{CE_RadioButton}(const TQRadioButton *) - - and - - \l{CE_RadioButtonLabel}(const TQRadioButton *) - \i \l Style_Enabled \i Set if the radiobutton is enabled. - \i15 Unused. - \i15   - \row \i \l Style_HasFocus \i Set if the radiobutton has input focus. - \row \i \l Style_On \i Set if the radiobutton is checked. - \row \i \l Style_Off \i Set if the radiobutton is not checked. - \row \i \l Style_Down \i Set if the radiobutton is down (i.e., the mouse - button or space bar is pressed on the radiobutton). - - \row \i12 \l{CE_TabBarTab}(const \l TQTabBar *) - - and - - \l{CE_TabBarLabel}(const \l TQTabBar *) - - \i \l Style_Enabled \i Set if the tabbar and tab is enabled. - \i12 \l TQStyleOption ( \l TQTab *t ) - \list - \i opt.\link TQStyleOption::tab() tab\endlink() - \endlist - \i12 \e t is the TQTab being drawn. - \row \i \l Style_Selected \i Set if the tab is the current tab. - - \row \i12 \l{CE_ProgressBarGroove}(const TQProgressBar *) - - and - - \l{CE_ProgressBarContents}(const TQProgressBar *) - - and - - \l{CE_ProgressBarLabel}(const TQProgressBar *) - - \i \l Style_Enabled \i Set if the progressbar is enabled. - \i12 Unused. - \i12   - \row \i \l Style_HasFocus \i Set if the progressbar has input focus. - - \row \i13 \l{CE_PopupMenuItem}(const \l TQPopupMenu *) - \i \l Style_Enabled \i Set if the menuitem is enabled. - \i13 \l TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) - \list - \i opt.\link TQStyleOption::menuItem() menuItem\endlink() - \i opt.\link TQStyleOption::tabWidth() tabWidth\endlink() - \i opt.\link TQStyleOption::maxIconWidth() maxIconWidth\endlink() - \endlist - \i \e mi is the menu item being drawn. TQMenuItem is currently an - internal class. - \row \i \l Style_Active \i Set if the menuitem is the current item. - \i \e tabwidth is the width of the tab column where key accelerators - are drawn. - \row \i \l Style_Down \i Set if the menuitem is down (i.e., the mouse button - or space bar is pressed). - \i \e maxpmwidth is the maximum width of the check column where - checkmarks and iconsets are drawn. - - \row \i14 \l{CE_MenuBarItem}(const \l TQMenuBar *) - \i \l Style_Enabled \i Set if the menuitem is enabled - \i14 \l TQStyleOption ( TQMenuItem *mi ) - \list - \i opt.\link TQStyleOption::menuItem() menuItem\endlink() - \endlist - \i14 \e mi is the menu item being drawn. - \row \i \l Style_Active \i Set if the menuitem is the current item. - \row \i \l Style_Down \i Set if the menuitem is down (i.e., a mouse button or - the space bar is pressed). - \row \i \l Style_HasFocus \i Set if the menubar has input focus. - - \row \i17 \l{CE_ToolButtonLabel}(const \l TQToolButton *) - \i \l Style_Enabled \i Set if the toolbutton is enabled. - \i17 \l TQStyleOption ( \l ArrowType t ) - \list - \i opt.\link TQStyleOption::arrowType() arrowType\endlink() - \endlist - \i17 When the tool button only contains an arrow, \e t is the - arrow's type. - \row \i \l Style_HasFocus \i Set if the toolbutton has input focus. - \row \i \l Style_Down \i Set if the toolbutton is down (i.e., a - mouse button or the space is pressed). - \row \i \l Style_On \i Set if the toolbutton is a toggle button - and is toggled on. - \row \i \l Style_AutoRaise \i Set if the toolbutton has auto-raise enabled. - \row \i \l Style_MouseOver \i Set if the mouse pointer is over the toolbutton. - \row \i \l Style_Raised \i Set if the button is not down, not on and doesn't - contain the mouse when auto-raise is enabled. - \endtable - - \sa ControlElement, StyleFlags -*/ - -/*! - \fn void TQStyle::drawControlMask( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const - - Draw a bitmask for the ControlElement \a element using the painter - \a p in the area \a r. See drawControl() for an explanation of the - use of the \a widget and \a opt arguments. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The rect \a r should be in screen coordinates. - - \a widget is deprecated and should not be used. - - \sa drawControl(), ControlElement -*/ - -/*! - \enum TQStyle::SubRect - - This enum represents a sub-area of a widget. Style implementations - would use these areas to draw the different parts of a widget. - - \value SR_PushButtonContents area containing the label (iconset - with text or pixmap). - \value SR_PushButtonFocusRect area for the focus rect (usually - larger than the contents rect). - - \value SR_CheckBoxIndicator area for the state indicator (e.g. check mark). - \value SR_CheckBoxContents area for the label (text or pixmap). - \value SR_CheckBoxFocusRect area for the focus indicator. - - - \value SR_RadioButtonIndicator area for the state indicator. - \value SR_RadioButtonContents area for the label. - \value SR_RadioButtonFocusRect area for the focus indicator. - - - \value SR_ComboBoxFocusRect area for the focus indicator. - - - \value SR_SliderFocusRect area for the focus indicator. - - - \value SR_DockWindowHandleRect area for the tear-off handle. - - - \value SR_ProgressBarGroove area for the groove. - \value SR_ProgressBarContents area for the progress indicator. - \value SR_ProgressBarLabel area for the text label. - - - \value SR_ToolButtonContents area for the tool button's label. - - \value SR_DialogButtonAccept area for a dialog's accept button. - \value SR_DialogButtonReject area for a dialog's reject button. - \value SR_DialogButtonApply area for a dialog's apply button. - \value SR_DialogButtonHelp area for a dialog's help button. - \value SR_DialogButtonAll area for a dialog's all button. - \value SR_DialogButtonRetry area for a dialog's retry button. - \value SR_DialogButtonAbort area for a dialog's abort button. - \value SR_DialogButtonIgnore area for a dialog's ignore button. - \value SR_DialogButtonCustom area for a dialog's custom widget area (in button row). - - \value SR_ToolBoxTabContents area for a toolbox tab's icon and label - - \value SR_CustomBase base value for custom ControlElements. All values above - this are reserved for custom use. Therefore, custom values must be - greater than this value. - - \sa subRect() -*/ - -/*! - \fn TQRect TQStyle::subRect( SubRect subrect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const; - - Returns the sub-area \a subrect for the \a widget in logical - coordinates. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. Note that usage of \a widget is deprecated in favor - of \a ceData and \a elementFlags. The widget can be cast to the - appropriate type based on the value of \a subrect. See the table - below for the appropriate \a widget casts: - - \table - \header \i SubRect \i Widget Cast - \row \i \l SR_PushButtonContents \i (const \l TQPushButton *) - \row \i \l SR_PushButtonFocusRect \i (const \l TQPushButton *) - \row \i \l SR_CheckBoxIndicator \i (const \l TQCheckBox *) - \row \i \l SR_CheckBoxContents \i (const \l TQCheckBox *) - \row \i \l SR_CheckBoxFocusRect \i (const \l TQCheckBox *) - \row \i \l SR_RadioButtonIndicator \i (const \l TQRadioButton *) - \row \i \l SR_RadioButtonContents \i (const \l TQRadioButton *) - \row \i \l SR_RadioButtonFocusRect \i (const \l TQRadioButton *) - \row \i \l SR_ComboBoxFocusRect \i (const \l TQComboBox *) - \row \i \l SR_DockWindowHandleRect \i (const \l TQWidget *) - \row \i \l SR_ProgressBarGroove \i (const \l TQProgressBar *) - \row \i \l SR_ProgressBarContents \i (const \l TQProgressBar *) - \row \i \l SR_ProgressBarLabel \i (const \l TQProgressBar *) - \endtable - - The tear-off handle (SR_DockWindowHandleRect) for TQDockWindow - is a private class. Use TQWidget::parentWidget() to access the - TQDockWindow: - - \code - if ( !widget->parentWidget() ) - return; - const TQDockWindow *dw = (const TQDockWindow *) widget->parentWidget(); - \endcode - - \sa SubRect -*/ - -/*! - \enum TQStyle::ComplexControl - - This enum represents a ComplexControl. ComplexControls have - different behaviour depending upon where the user clicks on them - or which keys are pressed. - - \value CC_SpinWidget - \value CC_ComboBox - \value CC_ScrollBar - \value CC_Slider - \value CC_ToolButton - \value CC_TitleBar - \value CC_ListView - - - \value CC_CustomBase base value for custom ControlElements. All - values above this are reserved for custom use. Therefore, - custom values must be greater than this value. - - \sa SubControl drawComplexControl() -*/ - -/*! - \enum TQStyle::SubControl - - This enum represents a SubControl within a ComplexControl. - - \value SC_None special value that matches no other SubControl. - - - \value SC_ScrollBarAddLine scrollbar add line (i.e. down/right - arrow); see also TQScrollbar. - \value SC_ScrollBarSubLine scrollbar sub line (i.e. up/left arrow). - \value SC_ScrollBarAddPage scrollbar add page (i.e. page down). - \value SC_ScrollBarSubPage scrollbar sub page (i.e. page up). - \value SC_ScrollBarFirst scrollbar first line (i.e. home). - \value SC_ScrollBarLast scrollbar last line (i.e. end). - \value SC_ScrollBarSlider scrollbar slider handle. - \value SC_ScrollBarGroove special subcontrol which contains the - area in which the slider handle may move. - - - \value SC_SpinWidgetUp spinwidget up/increase; see also TQSpinBox. - \value SC_SpinWidgetDown spinwidget down/decrease. - \value SC_SpinWidgetFrame spinwidget frame. - \value SC_SpinWidgetEditField spinwidget edit field. - \value SC_SpinWidgetButtonField spinwidget button field. - - - \value SC_ComboBoxEditField combobox edit field; see also TQComboBox. - \value SC_ComboBoxArrow combobox arrow - \value SC_ComboBoxFrame combobox frame - \value SC_ComboBoxListBoxPopup combobox list box - - \value SC_SliderGroove special subcontrol which contains the area - in which the slider handle may move. - \value SC_SliderHandle slider handle. - \value SC_SliderTickmarks slider tickmarks. - - - \value SC_ToolButton tool button; see also TQToolbutton. - \value SC_ToolButtonMenu subcontrol for opening a popup menu in a - tool button; see also TQPopupMenu. - - - \value SC_TitleBarSysMenu system menu button (i.e. restore, close, etc.). - \value SC_TitleBarMinButton minimize button. - \value SC_TitleBarMaxButton maximize button. - \value SC_TitleBarCloseButton close button. - \value SC_TitleBarLabel window title label. - \value SC_TitleBarNormalButton normal (restore) button. - \value SC_TitleBarShadeButton shade button. - \value SC_TitleBarUnshadeButton unshade button. - - - \value SC_ListView the list view area. - \value SC_ListViewBranch (internal) - \value SC_ListViewExpand expand item (i.e. show/hide child items). - - - \value SC_All special value that matches all SubControls. - - - \sa ComplexControl -*/ - -/*! - \fn void TQStyle::drawComplexControl( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, SCFlags sub, SCFlags subActive, const TQStyleOption& opt, const TQWidget *widget ) const - - Draws the ComplexControl \a control using the painter \a p in the - area \a r. Colors are used from the color group \a cg. The \a sub - argument specifies which SubControls to draw. Multiple SubControls - can be OR'ed together. The \a subActive argument specifies which - SubControl is active. - - The rect \a r should be in logical coordinates. Reimplementations - of this function should use visualRect() to change the logical - coordinates into screen coordinates when using drawPrimitive() and - drawControl(). - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a how argument is used to control how the ComplexControl is - drawn. Multiple flags can OR'ed together. See the table below for - an explanation of which flags are used with the various - ComplexControls. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a control. Note that usage of \a widget is - deprecated in favor of \a ceData and \a elementFlags. The \a opt - argument can be used to pass extra information required when - drawing the ComplexControl. Note that \a opt may be the default - value even for ComplexControls that can make use of the extra - options. See the table below for the appropriate \a widget and - \a opt usage: - - \table - \header \i ComplexControl
    \& Widget Cast - \i Style Flags - \i Notes - \i Options - \i Notes - - \row \i12 \l{CC_SpinWidget}(const TQSpinWidget *) - \i \l Style_Enabled \i Set if the spinwidget is enabled. - \i12 Unused. - \i12   - \row \i \l Style_HasFocus \i Set if the spinwidget has input focus. - - \row \i12 \l{CC_ComboBox}(const \l TQComboBox *) - \i \l Style_Enabled \i Set if the combobox is enabled. - \i12 Unused. - \i12   - \row \i \l Style_HasFocus \i Set if the combobox has input focus. - - \row \i12 \l{CC_ScrollBar}(const \l TQScrollBar *) - \i \l Style_Enabled \i Set if the scrollbar is enabled. - \i12 Unused. - \i12   - \row \i \l Style_HasFocus \i Set if the scrollbar has input focus. - - \row \i12 \l{CC_Slider}(const \l TQSlider *) - \i \l Style_Enabled \i Set if the slider is enabled. - \i12 Unused. - \i12   - - \row \i \l Style_HasFocus \i Set if the slider has input focus. - - \row \i16 \l{CC_ToolButton}(const \l TQToolButton *) - \i \l Style_Enabled \i Set if the toolbutton is enabled. - \i16 \l TQStyleOption ( \l ArrowType t ) - \list - \i opt.\link TQStyleOption::arrowType() arrowType\endlink() - \endlist - \i16 When the tool button only contains an arrow, \e t is the - arrow's type. - \row \i \l Style_HasFocus \i Set if the toolbutton has input focus. - \row \i \l Style_Down \i Set if the toolbutton is down (ie. mouse - button or space pressed). - \row \i \l Style_On \i Set if the toolbutton is a toggle button - and is toggled on. - \row \i \l Style_AutoRaise \i Set if the toolbutton has auto-raise enabled. - \row \i \l Style_Raised \i Set if the button is not down, not on and doesn't - contain the mouse when auto-raise is enabled. - - \row \i \l{CC_TitleBar}(const \l TQWidget *) - \i \l Style_Enabled \i Set if the titlebar is enabled. - \i Unused. - \i   - - \row \i \l{CC_ListView}(const \l TQListView *) - \i \l Style_Enabled \i Set if the titlebar is enabled. - \i \l TQStyleOption ( \l TQListViewItem *item ) - \list - \i opt.\link TQStyleOption::listViewItem() listViewItem\endlink() - \endlist - \i \e item is the item that needs branches drawn - \endtable - - \sa ComplexControl, SubControl -*/ - -/*! - \fn void TQStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const - - Draw a bitmask for the ComplexControl \a control using the painter - \a p in the area \a r. See drawComplexControl() for an explanation - of the use of the \a widget and \a opt arguments. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The rect \a r should be in logical coordinates. Reimplementations - of this function should use visualRect() to change the logical - corrdinates into screen coordinates when using drawPrimitive() and - drawControl(). - - Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. - - \sa drawComplexControl() ComplexControl -*/ - -/*! - \fn TQRect TQStyle::querySubControlMetrics( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl subcontrol, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; - - Returns the rect for the SubControl \a subcontrol for \a widget in - logical coordinates. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a control. The \a opt argument can be used to - pass extra information required when drawing the ComplexControl. - Note that \a opt may be the default value even for ComplexControls - that can make use of the extra options. See drawComplexControl() - for an explanation of the \a widget and \a opt arguments. - - Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. - - \sa drawComplexControl(), ComplexControl, SubControl -*/ - -/*! - \fn SubControl TQStyle::querySubControl( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; - - Returns the SubControl for \a widget at the point \a pos. The \a - widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a control. The \a opt argument can be used to - pass extra information required when drawing the ComplexControl. - Note that \a opt may be the default value even for ComplexControls - that can make use of the extra options. See drawComplexControl() - for an explanation of the \a widget and \a opt arguments. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - Note that \a pos is passed in screen coordinates. When using - querySubControlMetrics() to check for hits and misses, use - visualRect() to change the logical coordinates into screen - coordinates. - - Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. - - \sa drawComplexControl(), ComplexControl, SubControl, querySubControlMetrics() -*/ - -/*! - \enum TQStyle::PixelMetric - - This enum represents a PixelMetric. A PixelMetric is a style - dependent size represented as a single pixel value. - - \value PM_ButtonMargin amount of whitespace between pushbutton - labels and the frame. - \value PM_ButtonDefaultIndicator width of the default-button indicator frame. - \value PM_MenuButtonIndicator width of the menu button indicator - proportional to the widget height. - \value PM_ButtonShiftHorizontal horizontal contents shift of a - button when the button is down. - \value PM_ButtonShiftVertical vertical contents shift of a button when the - button is down. - - \value PM_DefaultFrameWidth default frame width, usually 2. - \value PM_SpinBoxFrameWidth frame width of a spin box. - \value PM_MDIFrameWidth frame width of an MDI window. - \value PM_MDIMinimizedWidth width of a minimized MSI window. - - \value PM_MaximumDragDistance Some feels require the scrollbar or - other sliders to jump back to the original position when the - mouse pointer is too far away while dragging. A value of -1 - disables this behavior. - - \value PM_ScrollBarExtent width of a vertical scrollbar and the - height of a horizontal scrollbar. - \value PM_ScrollBarSliderMin the minimum height of a vertical - scrollbar's slider and the minimum width of a horiztonal - scrollbar slider. - - \value PM_SliderThickness total slider thickness. - \value PM_SliderControlThickness thickness of the slider handle. - \value PM_SliderLength length of the slider. - \value PM_SliderTickmarkOffset the offset between the tickmarks - and the slider. - \value PM_SliderSpaceAvailable the available space for the slider to move. - - \value PM_DockWindowSeparatorExtent width of a separator in a - horiztonal dock window and the height of a separator in a - vertical dock window. - \value PM_DockWindowHandleExtent width of the handle in a - horizontal dock window and the height of the handle in a - vertical dock window. - \value PM_DockWindowFrameWidth frame width of a dock window. - - \value PM_MenuBarFrameWidth frame width of a menubar. - - \value PM_MenuBarItemSpacing spacing between menubar items. - \value PM_ToolBarItemSpacing spacing between toolbar items. - - \value PM_TabBarTabOverlap number of pixels the tabs should overlap. - \value PM_TabBarTabHSpace extra space added to the tab width. - \value PM_TabBarTabVSpace extra space added to the tab height. - \value PM_TabBarBaseHeight height of the area between the tab bar - and the tab pages. - \value PM_TabBarBaseOverlap number of pixels the tab bar overlaps - the tab bar base. - \value PM_TabBarScrollButtonWidth - \value PM_TabBarTabShiftHorizontal horizontal pixel shift when a - tab is selected. - \value PM_TabBarTabShiftVertical vertical pixel shift when a - tab is selected. - - \value PM_ProgressBarChunkWidth width of a chunk in a progress bar indicator. - - \value PM_SplitterWidth width of a splitter. - - \value PM_TitleBarHeight height of the title bar. - \value PM_PopupMenuFrameHorizontalExtra additional border, e.g. for panels - \value PM_PopupMenuFrameVerticalExtra additional border, e.g. for panels - - \value PM_IndicatorWidth width of a check box indicator. - \value PM_IndicatorHeight height of a checkbox indicator. - \value PM_ExclusiveIndicatorWidth width of a radio button indicator. - \value PM_ExclusiveIndicatorHeight height of a radio button indicator. - - \value PM_PopupMenuScrollerHeight height of the scroller area in a popupmenu. - \value PM_PopupMenuScrollerHeight height of the scroller area in a popupmenu. - \value PM_CheckListButtonSize area (width/height) of the - checkbox/radiobutton in a TQCheckListItem - \value PM_CheckListControllerSize area (width/height) of the - controller in a TQCheckListItem - - \value PM_DialogButtonsSeparator distance between buttons in a dialog buttons widget. - \value PM_DialogButtonsButtonWidth minimum width of a button in a dialog buttons widget. - \value PM_DialogButtonsButtonHeight minimum height of a button in a dialog buttons widget. - - \value PM_HeaderMarkSize - \value PM_HeaderGripMargin - \value PM_HeaderMargin - - \value PM_CustomBase base value for custom ControlElements. All - values above this are reserved for custom use. Therefore, - custom values must be greater than this value. - - - \sa pixelMetric() -*/ - -/*! - \fn int TQStyle::pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; - - Returns the pixel metric for \a metric. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a metric. Note that \a widget may be zero even - for PixelMetrics that can make use of \a widget. Note also that - usage of \a widget is deprecated in favor of \a ceData and - \a elementFlags. See the table below for the appropriate - \a widget casts: - - \table - \header \i PixelMetric \i Widget Cast - \row \i \l PM_SliderControlThickness \i (const \l TQSlider *) - \row \i \l PM_SliderLength \i (const \l TQSlider *) - \row \i \l PM_SliderTickmarkOffset \i (const \l TQSlider *) - \row \i \l PM_SliderSpaceAvailable \i (const \l TQSlider *) - \row \i \l PM_TabBarTabOverlap \i (const \l TQTabBar *) - \row \i \l PM_TabBarTabHSpace \i (const \l TQTabBar *) - \row \i \l PM_TabBarTabVSpace \i (const \l TQTabBar *) - \row \i \l PM_TabBarBaseHeight \i (const \l TQTabBar *) - \row \i \l PM_TabBarBaseOverlap \i (const \l TQTabBar *) - \endtable -*/ - -/*! - \enum TQStyle::ContentsType - - This enum represents a ContentsType. It is used to calculate sizes - for the contents of various widgets. - - \value CT_PushButton - \value CT_CheckBox - \value CT_RadioButton - \value CT_ToolButton - \value CT_ComboBox - \value CT_Splitter - \value CT_DockWindow - \value CT_ProgressBar - \value CT_PopupMenuItem - \value CT_TabBarTab - \value CT_Slider - \value CT_Header - \value CT_LineEdit - \value CT_MenuBar - \value CT_SpinBox - \value CT_SizeGrip - \value CT_TabWidget - \value CT_DialogButtons - - \value CT_CustomBase base value for custom ControlElements. All - values above this are reserved for custom use. Custom values - must be greater than this value. - - \sa sizeFromContents() -*/ - -/*! - \fn TQSize TQStyle::sizeFromContents( ContentsType contents, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &contentsSize, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; - - Returns the size of \a widget based on the contents size \a - contentsSize. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a contents. The \a opt argument can be used to - pass extra information required when calculating the size. Note - that \a opt may be the default value even for ContentsTypes that - can make use of the extra options. Note that usage of \a widget - is deprecated in favor of \a ceData and \a elementFlags. See the - table below for the appropriate \a widget and \a opt usage: - - \table - \header \i ContentsType \i Widget Cast \i Options \i Notes - \row \i \l CT_PushButton \i (const \l TQPushButton *) \i Unused. \i   - \row \i \l CT_CheckBox \i (const \l TQCheckBox *) \i Unused. \i   - \row \i \l CT_RadioButton \i (const \l TQRadioButton *) \i Unused. \i   - \row \i \l CT_ToolButton \i (const \l TQToolButton *) \i Unused. \i   - \row \i \l CT_ComboBox \i (const \l TQComboBox *) \i Unused. \i   - \row \i \l CT_Splitter \i (const \l TQSplitter *) \i Unused. \i   - \row \i \l CT_DockWindow \i (const \l TQDockWindow *) \i Unused. \i   - \row \i \l CT_ProgressBar \i (const \l TQProgressBar *) \i Unused. \i   - \row \i \l CT_PopupMenuItem \i (const TQPopupMenu *) - \i \l TQStyleOption ( TQMenuItem *mi ) - \list - \i opt.\link TQStyleOption::menuItem() menuItem\endlink() - \endlist - \i \e mi is the menu item to use when calculating the size. - TQMenuItem is currently an internal class. - \endtable -*/ - -/*! - \enum TQStyle::StyleHint - - This enum represents a StyleHint. A StyleHint is a general look - and/or feel hint. - - \value SH_EtchDisabledText disabled text is "etched" like Windows. - - \value SH_GUIStyle the GUI style to use. - - \value SH_ScrollBar_BackgroundMode the background mode for a - TQScrollBar. Possible values are any of those in the \link - TQt::BackgroundMode BackgroundMode\endlink enum. - - \value SH_ScrollBar_MiddleClickAbsolutePosition a boolean value. - If TRUE, middle clicking on a scrollbar causes the slider to - jump to that position. If FALSE, the middle clicking is - ignored. - - \value SH_ScrollBar_LeftClickAbsolutePosition a boolean value. - If TRUE, left clicking on a scrollbar causes the slider to - jump to that position. If FALSE, the left clicking will - behave as appropriate for each control. - - \value SH_ScrollBar_ScrollWhenPointerLeavesControl a boolean - value. If TRUE, when clicking a scrollbar SubControl, holding - the mouse button down and moving the pointer outside the - SubControl, the scrollbar continues to scroll. If FALSE, the - scollbar stops scrolling when the pointer leaves the - SubControl. - - \value SH_TabBar_Alignment the alignment for tabs in a - TQTabWidget. Possible values are \c TQt::AlignLeft, \c - TQt::AlignCenter and \c TQt::AlignRight. - - \value SH_Header_ArrowAlignment the placement of the sorting - indicator may appear in list or table headers. Possible values - are \c TQt::Left or \c TQt::Right. - - \value SH_Slider_SnapToValue sliders snap to values while moving, - like Windows - - \value SH_Slider_SloppyKeyEvents key presses handled in a sloppy - manner, i.e. left on a vertical slider subtracts a line. - - \value SH_ProgressDialog_CenterCancelButton center button on - progress dialogs, like Motif, otherwise right aligned. - - \value SH_ProgressDialog_TextLabelAlignment TQt::AlignmentFlags -- - text label alignment in progress dialogs; Center on windows, - Auto|VCenter otherwise. - - \value SH_PrintDialog_RightAlignButtons right align buttons in - the print dialog, like Windows. - - \value SH_MainWindow_SpaceBelowMenuBar 1 or 2 pixel space between - the menubar and the dockarea, like Windows. - - \value SH_FontDialog_SelectAssociatedText select the text in the - line edit, or when selecting an item from the listbox, or when - the line edit receives focus, like Windows. - - \value SH_PopupMenu_AllowActiveAndDisabled allows disabled menu - items to be active. - - \value SH_PopupMenu_SpaceActivatesItem pressing Space activates - the item, like Motif. - - \value SH_PopupMenu_SubMenuPopupDelay the number of milliseconds - to wait before opening a submenu; 256 on windows, 96 on Motif. - - \value SH_PopupMenu_Scrollable whether popupmenu's must support - scrolling. - - \value SH_PopupMenu_SloppySubMenus whether popupmenu's must support - sloppy submenu; as implemented on Mac OS. - - \value SH_ScrollView_FrameOnlyAroundContents whether scrollviews - draw their frame only around contents (like Motif), or around - contents, scrollbars and corner widgets (like Windows). - - \value SH_MenuBar_AltKeyNavigation menubars items are navigable - by pressing Alt, followed by using the arrow keys to select - the desired item. - - \value SH_ComboBox_ListMouseTracking mouse tracking in combobox - dropdown lists. - - \value SH_PopupMenu_MouseTracking mouse tracking in popup menus. - - \value SH_MenuBar_MouseTracking mouse tracking in menubars. - - \value SH_ItemView_ChangeHighlightOnFocus gray out selected items - when losing focus. - - \value SH_Widget_ShareActivation turn on sharing activation with - floating modeless dialogs. - - \value SH_TabBar_SelectMouseType which type of mouse event should - cause a tab to be selected. - - \value SH_ListViewExpand_SelectMouseType which type of mouse event should - cause a listview expansion to be selected. - - \value SH_TabBar_PreferNoArrows whether a tabbar should suggest a size - to prevent scoll arrows. - - \value SH_ComboBox_Popup allows popups as a combobox dropdown - menu. - - \value SH_Workspace_FillSpaceOnMaximize the workspace should - maximize the client area. - - \value SH_TitleBar_NoBorder the titlebar has no border - - \value SH_ScrollBar_StopMouseOverSlider stops autorepeat when - slider reaches mouse - - \value SH_BlinkCursorWhenTextSelected whether cursor should blink - when text is selected - - \value SH_RichText_FullWidthSelection whether richtext selections - should extend the full width of the document. - - \value SH_GroupBox_TextLabelVerticalAlignment how to vertically align a - groupbox's text label. - - \value SH_GroupBox_TextLabelColor how to paint a groupbox's text label. - - \value SH_DialogButtons_DefaultButton which buttons gets the - default status in a dialog's button widget. - - \value SH_CustomBase base value for custom ControlElements. All - values above this are reserved for custom use. Therefore, - custom values must be greater than this value. - - \value SH_ToolButton_Uses3D indicates whether TQToolButtons should - use a 3D frame when the mouse is over them - - \value SH_ToolBox_SelectedPageTitleBold Boldness of the selected - page title in a TQToolBox. - - \value SH_LineEdit_PasswordCharacter The TQChar Unicode character - to be used for passwords. - - \value SH_Table_GridLineColor - - \value SH_UnderlineAccelerator whether accelerators are underlined - - \sa styleHint() -*/ - -/*! - \fn int TQStyle::styleHint( StyleHint stylehint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn *returnData = 0, const TQWidget *widget = 0 ) const; - - Returns the style hint \a stylehint for \a widget. Currently, \a - widget, \a opt, and \a returnData are unused; they're included to - allow for future enhancements. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - Note that usage of \a widget is deprecated in favor of \a ceData - and \a elementFlags. - - For an explanation of the return value see \l StyleHint. -*/ - -/*! - \enum TQStyle::StylePixmap - - This enum represents a StylePixmap. A StylePixmap is a pixmap that - can follow some existing GUI style or guideline. - - - \value SP_TitleBarMinButton minimize button on titlebars. For - example, in a TQWorkspace. - \value SP_TitleBarMaxButton maximize button on titlebars. - \value SP_TitleBarCloseButton close button on titlebars. - \value SP_TitleBarNormalButton normal (restore) button on titlebars. - \value SP_TitleBarShadeButton shade button on titlebars. - \value SP_TitleBarUnshadeButton unshade button on titlebars. - \value SP_MessageBoxInformation the 'information' icon. - \value SP_MessageBoxWarning the 'warning' icon. - \value SP_MessageBoxCritical the 'critical' icon. - \value SP_MessageBoxQuestion the 'question' icon. - - - \value SP_DockWindowCloseButton close button on dock windows; - see also TQDockWindow. - - - \value SP_CustomBase base value for custom ControlElements. All - values above this are reserved for custom use. Therefore, - custom values must be greater than this value. - - \sa stylePixmap() -*/ - -/*! - \fn TQPixmap TQStyle::stylePixmap( StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; - - Returns a pixmap for \a stylepixmap. - - \a ceData and \a elementFlags provide additional information about - the widget for which the PrimitiveElement is being drawn. - - The \a opt argument can be used to pass extra information required - when drawing the ControlElement. Note that \a opt may be the - default value even for StylePixmaps that can make use of the extra - options. Currently, the \a opt argument is unused. - - The \a widget argument is a pointer to a TQWidget or one of its - subclasses. The widget can be cast to the appropriate type based - on the value of \a stylepixmap. Note that usage of \a widget is - deprecated in favor of \a ceData and \a elementFlags.See the table - below for the appropriate \a widget casts: - - \table - \header \i StylePixmap \i Widget Cast - \row \i \l SP_TitleBarMinButton \i (const \l TQWidget *) - \row \i \l SP_TitleBarMaxButton \i (const \l TQWidget *) - \row \i \l SP_TitleBarCloseButton \i (const \l TQWidget *) - \row \i \l SP_TitleBarNormalButton \i (const \l TQWidget *) - \row \i \l SP_TitleBarShadeButton \i (const \l TQWidget *) - \row \i \l SP_TitleBarUnshadeButton \i (const \l TQWidget *) - \row \i \l SP_DockWindowCloseButton \i (const \l TQDockWindow *) - \endtable - - \sa StylePixmap -*/ - -/*! - \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ); - - Returns the rect \a logical in screen coordinates. The bounding - rect for widget \a w is used to perform the translation. This - function is provided to aid style implementors in supporting - right-to-left mode. - - Note that this function is deprecated in favor of visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); - - \sa TQApplication::reverseLayout() -*/ -TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ) -{ - TQStyleControlElementData ceData; - ceData.rect = w->rect(); - return visualRect(logical, ceData, CEF_None); -} - -/*! - \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); - - Returns the rect \a logical in screen coordinates. The bounding - rect for the widget described by \a ceData and \a elementFlags - is used to perform the translation. This function is provided to - aid style implementors in supporting - right-to-left mode. - - \sa TQApplication::reverseLayout() -*/ -TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ) -{ - Q_UNUSED(elementFlags) - - TQRect boundingRect = ceData.rect; - TQRect r = logical; - if ( TQApplication::reverseLayout() ) - r.moveBy( 2*(boundingRect.right() - logical.right()) + - logical.width() - boundingRect.width(), 0 ); - return r; -} - -/*! - \overload TQRect TQStyle::visualRect( const TQRect &logical, const TQRect &bounding ); - - Returns the rect \a logical in screen coordinates. The rect \a - bounding is used to perform the translation. This function is - provided to aid style implementors in supporting right-to-left - mode. - - \sa TQApplication::reverseLayout() -*/ -TQRect TQStyle::visualRect( const TQRect &logical, const TQRect &boundingRect ) -{ - TQRect r = logical; - if ( TQApplication::reverseLayout() ) - r.moveBy( 2*(boundingRect.right() - logical.right()) + - logical.width() - boundingRect.width(), 0 ); - return r; -} - -/*! - \fn void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); - - Intercepts events generated by \a source and sends them to \a handler via - the bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) virtual method. - - \sa void TQStyle::removeObjectEventHandler( TQObject* source, TQStyle* handler ) - \sa bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) -*/ -void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { - bool cbret = false; - if (m_eventHandlerInstallationHook) { - cbret = (*m_eventHandlerInstallationHook)(ceData, elementFlags, source, handler); - } - if (!cbret) { - if (ceData.widgetObjectTypes.contains("TQObject")) { - TQObject* o = reinterpret_cast(source); - o->installEventFilter(this); - m_objectEventSourceToHandlerMap[source] = handler; - m_objectEventSourceDataToHandlerMap[source] = ceData; - m_objectEventSourceFlagsToHandlerMap[source] = elementFlags; - } - } -} - -/*! - \fn void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); - - Stops intercepting events generated by \a source. - - \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { - bool cbret = false; - if (m_eventHandlerRemovalHook) { - cbret = (*m_eventHandlerRemovalHook)(ceData, elementFlags, source, handler); - } - if (!cbret) { - if (ceData.widgetObjectTypes.contains("TQObject")) { - TQObject* o = reinterpret_cast(source); - m_objectEventSourceToHandlerMap.remove(source); - m_objectEventSourceDataToHandlerMap.remove(source); - m_objectEventSourceFlagsToHandlerMap.remove(source); - o->removeEventFilter(this); - } - } -} - -/*! - \fn void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook ); - - Sets a callback function \a hook which will be called whenever a new intercept request - is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - - \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook ) { - m_eventHandlerInstallationHook = hook; -} - -/*! - \fn void TQStyle::setEventHandlerRemovalHook( EventHandlerRemovalHook hook ); - - Sets a callback function \a hook which will be called whenever a new intercept deactivation request - is made via the TQStyle::removeObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - - \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -void TQStyle::setEventHandlerRemovalHook( EventHandlerRemovalHook hook ) { - m_eventHandlerRemovalHook = hook; -} - -/*! - \fn bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); - - Override this virtual function to intercept events requested by a previous call to - TQStyle::installObjectEventHandler. - - \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) - \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) { - Q_UNUSED(ceData); - Q_UNUSED(elementFlags); - Q_UNUSED(source); - Q_UNUSED(e); - return false; -} - -/*! - \fn bool TQStyle::eventFilter(TQObject *o, TQEvent *e); - \internal -*/ -bool TQStyle::eventFilter(TQObject *o, TQEvent *e) { - acceleratorKeypressEventMonitor(o, e); - - if (m_objectEventSourceToHandlerMap.contains(o)) { - TQStyle* handler = m_objectEventSourceToHandlerMap[o]; - const TQStyleControlElementData &ceData = m_objectEventSourceDataToHandlerMap[o]; - ControlElementFlags elementFlags = m_objectEventSourceFlagsToHandlerMap[o]; - bool ret; - TQWidget* w = dynamic_cast(o); - if (w) { - // Update ceData as widget parameters may have changed - // If not done glitches may appear such as those present in Bug 1816 - populateControlElementDataFromWidget(w, TQStyleOption()); - const TQStyleControlElementData &widgetCEData = *(w->controlElementDataObject()); - if (e->type() == TQEvent::Paint) { - TQPainter p(w); - TQPainter* activePainterOrig = widgetCEData.activePainter; - const_cast(widgetCEData).activePainter = &p; - ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e); - const_cast(widgetCEData).activePainter = activePainterOrig; - } - else { - ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e); - } - } - else { - ret = handler->objectEventHandler(ceData, elementFlags, o, e); - } - if (ret) { - return ret; - } - else { - return TQObject::eventFilter(o, e); - } - } - else { - return TQObject::eventFilter(o, e); - } -} - -/*! - \fn void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ); - - Sets a callback function \a hook which will be called whenever a new widget action request - is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - - \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ) { - m_widgetActionRequestHook = hook; -} - -/*! - \fn bool widgetActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request ); - - Handles widget action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. -*/ -bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) { - bool cbret = false; - if (m_widgetActionRequestHook) { - cbret = (*m_widgetActionRequestHook)(ceData, elementFlags, source, request, requestData); - } - if (!cbret) { - if (ceData.widgetObjectTypes.contains("TQWidget")) { - TQWidget* widget = reinterpret_cast(source); - if (request == WAR_Repaint) { - widget->repaint(FALSE); - } - else if (request == WAR_RepaintRect) { - widget->repaint(requestData.rect, FALSE); - } - else if (request == WAR_EnableMouseTracking) { - widget->setMouseTracking(TRUE); - } - else if (request == WAR_DisableMouseTracking) { - widget->setMouseTracking(FALSE); - } - else if (request == WAR_SetAutoMask) { - widget->setAutoMask(TRUE); - } - else if (request == WAR_UnSetAutoMask) { - widget->setAutoMask(FALSE); - } - else if (request == WAR_SetCheckable) { - TQPopupMenu *pm = dynamic_cast(widget); - if (pm) { - pm->setCheckable(TRUE); - } - } - else if (request == WAR_UnSetCheckable) { - TQPopupMenu *pm = dynamic_cast(widget); - if (pm) { - pm->setCheckable(FALSE); - } - } - else if (request == WAR_FrameSetStyle) { - TQFrame* frame = dynamic_cast(widget); - if (frame) { - frame->setFrameStyle(requestData.metric1); - } - } - else if (request == WAR_FrameSetLineWidth) { - TQFrame* frame = dynamic_cast(widget); - if (frame) { - frame->setLineWidth(requestData.metric1); - } - } - else if (request == WAR_SetLayoutMargin) { - TQLayout* layout = widget->layout(); - if (layout) { - layout->setMargin(requestData.metric1); - } - } - else if (request == WAR_SetPalette) { - widget->setPalette(requestData.palette); - } - else if (request == WAR_SetBackgroundMode) { - widget->setBackgroundMode((TQt::BackgroundMode)requestData.metric1); - } - else if (request == WAR_SetBackgroundOrigin) { - widget->setBackgroundOrigin((TQWidget::BackgroundOrigin)requestData.metric1); - } - else if (request == WAR_SetFont) { - widget->setFont(requestData.font); - } - else if (request == WAR_RepaintAllAccelerators) { - TQWidgetList *list = TQApplication::topLevelWidgets(); - TQWidgetListIt it( *list ); - TQWidget * widget; - while ((widget=it.current()) != 0) { - ++it; - - TQObjectList *l = widget->queryList("TQWidget"); - TQObjectListIt it2( *l ); - TQWidget *w; - while ( (w = (TQWidget*)it2.current()) != 0 ) { - ++it2; - if (w->isTopLevel() || !w->isVisible() || w->style().styleHint(SH_UnderlineAccelerator, TQStyleControlElementData(), CEF_None, w)) { - l->removeRef(w); - } - } - - // Repaint all relevant widgets - it2.toFirst(); - while ( (w = (TQWidget*)it2.current()) != 0 ) { - ++it2; - w->repaint(FALSE); - } - delete l; - } - delete list; - } - else if (request == WAR_SetDefault) { - TQPushButton *button = dynamic_cast(widget); - if (button) { - button->setDefault(TRUE); - } - } - else if (request == WAR_UnSetDefault) { - TQPushButton *button = dynamic_cast(widget); - if (button) { - button->setDefault(FALSE); - } - } - else if (request == WAR_SendPaintEvent) { - static_cast(widget)->event(requestData.paintEvent); - } - return true; - } - } - return true; -} - -/*! - \fn void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook ); - - Sets a callback function \a hook which will be called whenever a new application action request - is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - - \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) -*/ -void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook ) { - m_applicationActionRequestHook = hook; -} - -/*! - \fn bool applicationActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request ); - - Handles application action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. -*/ -bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) { - bool cbret = false; - if (m_applicationActionRequestHook) { - cbret = (*m_applicationActionRequestHook)(ceData, elementFlags, source, request, requestData); - } - if (!cbret) { - if (ceData.widgetObjectTypes.contains("TQApplication")) { - TQApplication* application = reinterpret_cast(source); - if (request == AAR_SetPalette) { - application->setPalette(requestData.palette, requestData.bool1, requestData.cstr); - } - else if (request == AAR_SetFont) { - application->setFont(requestData.font, requestData.bool1, requestData.cstr); - } - return true; - } - } - return true; -} - -void TQStyle::acceleratorKeypressEventMonitor( TQObject *o, TQEvent *e ) { - if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) { - TQWidget *widget = dynamic_cast(o); - if (widget) { - switch(e->type()) { - case TQEvent::KeyPress: - if (((TQKeyEvent*)e)->key() == Key_Alt) { - conditionalAcceleratorsEnabled = true; - widgetActionRequest(TQStyleControlElementData(), CEF_None, o, WAR_RepaintAllAccelerators); - } - break; - case TQEvent::KeyRelease: - if (((TQKeyEvent*)e)->key() == Key_Alt) { - conditionalAcceleratorsEnabled = false; - widgetActionRequest(TQStyleControlElementData(), CEF_None, o, WAR_RepaintAllAccelerators); - } - break; - default: - break; - } - } - } - else { - conditionalAcceleratorsEnabled = false; - } -} - -bool TQStyle::acceleratorsShown() const { - if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) { - return conditionalAcceleratorsEnabled; - } - else { - return true; - } -} - -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData() { - // -} -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(int param1, int param2) { - metric1 = param1; - metric2 = param2; -} - -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQPalette param, bool informWidgets, const char* className) { - palette = param; - bool1 = informWidgets; - cstr = className; -} - -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQFont param, bool informWidgets, const char* className) { - font = param; - bool1 = informWidgets; - cstr = className; -} - -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQRect param) { - rect = param; -} - -TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQPaintEvent* param) { - paintEvent = param; -} - -TQStyleWidgetActionRequestData::~TQStyleWidgetActionRequestData() { - // -} - -// ============================================================================================ -// Interface methods -// ============================================================================================ - -void TQStyle::drawPrimitive( PrimitiveElement pe, - TQPainter *p, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags, - const TQStyleOption& opt ) const -{ - const TQWidget* widget = 0; - - // Determine if the request needs widget information and set widget appropriately - // FIXME - if ((pe == PE_CheckListController) || (pe == PE_CheckListExclusiveIndicator) || (pe == PE_CheckListIndicator)) { - TQCheckListItem *item = opt.checkListItem(); - if (item) { - TQListView *lv = item->listView(); - widget = dynamic_cast(lv); - } - } - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - drawPrimitive(pe, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, opt); -} - -void TQStyle::drawControl( ControlElement element, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags, - const TQStyleOption& opt ) const -{ -#if defined(QT_CHECK_STATE) - if (!widget) { - tqWarning("TQStyle::drawControl: widget parameter cannot be zero!"); - return; - } -#endif - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - drawControl(element, p, ceData, getControlElementFlagsForObject(widget, opt), r, cg, flags, opt, widget); -} - -void TQStyle::drawControlMask( ControlElement control, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQStyleOption& opt ) const -{ - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - drawControlMask(control, p, ceData, getControlElementFlagsForObject(widget, opt), r, opt, widget); -} - -TQRect TQStyle::subRect(SubRect r, const TQWidget *widget) const -{ -#if defined(QT_CHECK_STATE) - if (! widget) { - tqWarning("TQStyle::subRect: widget parameter cannot be zero!"); - return TQRect(); - } -#endif - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - return subRect(r, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); -} - -void TQStyle::drawComplexControl( ComplexControl control, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags, - SCFlags controls, - SCFlags active, - const TQStyleOption& opt ) const -{ -#if defined(QT_CHECK_STATE) - if (! widget) { - tqWarning("TQStyle::drawComplexControl: widget parameter cannot be zero!"); - return; - } -#endif - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - drawComplexControl(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, controls, active, opt, widget); -} - -void TQStyle::drawComplexControlMask( ComplexControl control, - TQPainter *p, - const TQWidget *widget, - const TQRect &r, - const TQStyleOption& opt ) const -{ - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - drawComplexControlMask(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, opt, widget); -} - -TQRect TQStyle::querySubControlMetrics( ComplexControl control, - const TQWidget *widget, - SubControl sc, - const TQStyleOption &opt ) const -{ -#if defined(QT_CHECK_STATE) - if (! widget) { - tqWarning("TQStyle::querySubControlMetrics: widget parameter cannot be zero!"); - return TQRect(); - } -#endif - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt, false); - return querySubControlMetrics(control, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), sc, opt, widget); -} - -TQStyle::SubControl TQStyle::querySubControl(ComplexControl control, - const TQWidget *widget, - const TQPoint &pos, - const TQStyleOption& opt ) const -{ - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - return querySubControl(control, ceData, getControlElementFlagsForObject(widget, opt), pos, opt, widget); -} - -int TQStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const -{ - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption(), false); - return pixelMetric(m, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); -} - -TQSize TQStyle::sizeFromContents(ContentsType contents, - const TQWidget *widget, - const TQSize &contentsSize, - const TQStyleOption& opt ) const -{ - TQSize sz(contentsSize); - -#if defined(QT_CHECK_STATE) - if (! widget) { - tqWarning("TQStyle::sizeFromContents: widget parameter cannot be zero!"); - return sz; - } -#endif - - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); - return sizeFromContents(contents, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), contentsSize, opt, widget); -} - -int TQStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption &so, TQStyleHintReturn *shr) const -{ - bool ceDataNotNeeded = false; - if (sh == SH_Widget_ShareActivation) { - ceDataNotNeeded = true; - } - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so, false, ceDataNotNeeded); - return styleHint(sh, ceData, getControlElementFlagsForObject(w, TQStyleOption(), false), so, shr, w); -} - -TQPixmap TQStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOption &so) const -{ - const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so); - return stylePixmap(sp, ceData, getControlElementFlagsForObject(w, TQStyleOption()), so, w); -} - -/*! - \fn int TQStyle::defaultFrameWidth() const - \obsolete -*/ - -/*! - \fn void TQStyle::tabbarMetrics( const TQWidget *, int &, int &, int & ) const - \obsolete -*/ - -/*! - \fn TQSize TQStyle::scrollBarExtent() const - \obsolete -*/ - -#ifndef TQT_NO_COMPAT -int TQStyle::defaultFrameWidth() const -{ - TQStyleControlElementData ceData; - return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None ); -} - -void TQStyle::tabbarMetrics( const TQWidget* t, int& hf, int& vf, int& ov ) const -{ - TQStyleControlElementData ceData; - hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t ); - vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t ); - ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t ); -} - -TQSize TQStyle::scrollBarExtent() const -{ - TQStyleControlElementData ceData; - ceData.orientation = TQt::Horizontal; - return TQSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None), - pixelMetric(PM_ScrollBarExtent, ceData, CEF_None)); -} -#endif - -TQStyleControlElementData::TQStyleControlElementData() { - isNull = true; - activePainter = 0; - tickMarkSetting = 0; - comboBoxLineEditFlags = 0; - frameStyle = 0; - comboBoxListBoxFlags = 0; - parentWidgetFlags = 0; - topLevelWidgetFlags = 0; -} - -TQStyleControlElementData::~TQStyleControlElementData() { - // -} - -TQStyleControlElementData::TQStyleControlElementData(const TQStyleControlElementData& orig) { - isNull = orig.isNull; - widgetObjectTypes = orig.widgetObjectTypes; - allDataPopulated = orig.allDataPopulated; - wflags = orig.wflags; - windowState = orig.windowState; - bgPixmap = orig.bgPixmap; - bgBrush = orig.bgBrush; - bgColor = orig.bgColor; - bgOffset = orig.bgOffset; - backgroundMode = orig.backgroundMode; - fgPixmap = orig.fgPixmap; - fgColor = orig.fgColor; - colorGroup = orig.colorGroup; - geometry = orig.geometry; - rect = orig.rect; - pos = orig.pos; - icon = orig.icon; - iconSet = orig.iconSet; - text = orig.text; - orientation = orig.orientation; - activeItemPaletteBgColor = orig.activeItemPaletteBgColor; - palette = orig.palette; - totalSteps = orig.totalSteps; - currentStep = orig.currentStep; - tickMarkSetting = orig.tickMarkSetting; - tickInterval = orig.tickInterval; - minSteps = orig.minSteps; - maxSteps = orig.maxSteps; - startStep = orig.startStep; - pageStep = orig.pageStep; - lineStep = orig.lineStep; - dlgVisibleButtons = orig.dlgVisibleButtons; - dlgVisibleSizeHints = orig.dlgVisibleSizeHints; - progressText = orig.progressText; - textLabel = orig.textLabel; - font = orig.font; - percentageVisible = orig.percentageVisible; - dwData = orig.dwData; - toolButtonTextPosition = orig.toolButtonTextPosition; - popupDelay = orig.popupDelay; - titleBarData = orig.titleBarData; - spinWidgetData = orig.spinWidgetData; - parentWidgetData = orig.parentWidgetData; - viewportData = orig.viewportData; - listViewData = orig.listViewData; - tabBarData = orig.tabBarData; - checkListItemData = orig.checkListItemData; - comboBoxLineEditFlags = orig.comboBoxLineEditFlags; - frameStyle = orig.frameStyle; - sliderRect = orig.sliderRect; - activePainter = orig.activePainter; - toolBarData = orig.toolBarData; - comboBoxListBoxFlags = orig.comboBoxListBoxFlags; - paletteBgColor = orig.paletteBgColor; - parentWidgetFlags = orig.parentWidgetFlags; - name = orig.name; - caption = orig.caption; - topLevelWidgetData = orig.topLevelWidgetData; - topLevelWidgetFlags = orig.topLevelWidgetFlags; - paletteBgPixmap = orig.paletteBgPixmap; -} - -#endif // TQT_NO_STYLE diff --git a/src/kernel/qstylesheet.cpp b/src/kernel/qstylesheet.cpp deleted file mode 100644 index b1e9ac79..00000000 --- a/src/kernel/qstylesheet.cpp +++ /dev/null @@ -1,1623 +0,0 @@ -/**************************************************************************** -** -** Implementation of the TQStyleSheet class -** -** Created : 990101 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqstylesheet.h" - -#ifndef TQT_NO_RICHTEXT - -#include "private/qrichtext_p.h" -#include "ntqlayout.h" -#include "ntqpainter.h" -#include "ntqcleanuphandler.h" - -#include - -class TQStyleSheetItemData -{ -public: - TQStyleSheetItem::DisplayMode disp; - int fontitalic; - int fontunderline; - int fontstrikeout; - int fontweight; - int fontsize; - int fontsizelog; - int fontsizestep; - int lineSpacing; - TQString fontfamily; - TQStyleSheetItem *parentstyle; - TQString stylename; - int ncolumns; - TQColor col; - bool anchor; - int align; - TQStyleSheetItem::VerticalAlignment valign; - int margin[5]; - TQStyleSheetItem::ListStyle list; - TQStyleSheetItem::WhiteSpaceMode whitespacemode; - TQString contxt; - bool selfnest; - TQStyleSheet* sheet; -}; - -/*! - \class TQStyleSheetItem ntqstylesheet.h - \brief The TQStyleSheetItem class provides an encapsulation of a set of text styles. - - \ingroup text - - A style sheet item consists of a name and a set of attributes that - specifiy its font, color, etc. When used in a \link TQStyleSheet - style sheet\endlink (see styleSheet()), items define the name() of - a rich text tag and the display property changes associated with - it. - - The \link TQStyleSheetItem::DisplayMode display mode\endlink - attribute indicates whether the item is a block, an inline element - or a list element; see setDisplayMode(). The treatment of - whitespace is controlled by the \link - TQStyleSheetItem::WhiteSpaceMode white space mode\endlink; see - setWhiteSpaceMode(). An item's margins are set with setMargin(), - In the case of list items, the list style is set with - setListStyle(). An item may be a hypertext link anchor; see - setAnchor(). Other attributes are set with setAlignment(), - setVerticalAlignment(), setFontFamily(), setFontSize(), - setFontWeight(), setFontItalic(), setFontUnderline(), - setFontStrikeOut and setColor(). -*/ - -/*! \enum TQStyleSheetItem::AdditionalStyleValues - \internal -*/ - -/*! - \enum TQStyleSheetItem::WhiteSpaceMode - - This enum defines the ways in which TQStyleSheet can treat - whitespace. - - \value WhiteSpaceNormal any sequence of whitespace (including - line-breaks) is equivalent to a single space. - - \value WhiteSpacePre whitespace must be output exactly as given - in the input. - - \value WhiteSpaceNoWrap multiple spaces are collapsed as with - WhiteSpaceNormal, but no automatic line-breaks occur. To break - lines manually, use the \c{
    } tag. - -*/ - -/*! - \enum TQStyleSheetItem::Margin - - \value MarginLeft left margin - \value MarginRight right margin - \value MarginTop top margin - \value MarginBottom bottom margin - \value MarginAll all margins (left, right, top and bottom) - \value MarginVertical top and bottom margins - \value MarginHorizontal left and right margins - \value MarginFirstLine margin (indentation) of the first line of - a paragarph (in addition to the MarginLeft of the paragraph) -*/ - -/*! - Constructs a new style called \a name for the stylesheet \a - parent. - - All properties in TQStyleSheetItem are initially in the "do not - change" state, except \link TQStyleSheetItem::DisplayMode display - mode\endlink, which defaults to \c DisplayInline. -*/ -TQStyleSheetItem::TQStyleSheetItem( TQStyleSheet* parent, const TQString& name ) -{ - d = new TQStyleSheetItemData; - d->stylename = name.lower(); - d->sheet = parent; - init(); - if (parent) - parent->insert( this ); -} - -/*! - Copy constructor. Constructs a copy of \a other that is not bound - to any style sheet. -*/ -TQStyleSheetItem::TQStyleSheetItem( const TQStyleSheetItem & other ) -{ - d = new TQStyleSheetItemData; - *d = *other.d; -} - - -/*! - Destroys the style. Note that TQStyleSheetItem objects become - owned by TQStyleSheet when they are created. -*/ -TQStyleSheetItem::~TQStyleSheetItem() -{ - delete d; -} - -/*! - Assignment. Assings a copy of \a other that is not bound to any style sheet. - Unbounds first from previous style sheet. - */ -TQStyleSheetItem& TQStyleSheetItem::operator=( const TQStyleSheetItem& other ) -{ - if ( &other == this ) - return *this; - delete d; - d = new TQStyleSheetItemData; - *d = *other.d; - return *this; -} - -/*! - Returns the style sheet this item is in. -*/ -TQStyleSheet* TQStyleSheetItem::styleSheet() -{ - return d->sheet; -} - -/*! - \overload - - Returns the style sheet this item is in. -*/ -const TQStyleSheet* TQStyleSheetItem::styleSheet() const -{ - return d->sheet; -} - -/*! - \internal - Internal initialization - */ -void TQStyleSheetItem::init() -{ - d->disp = DisplayInline; - - d->fontitalic = Undefined; - d->fontunderline = Undefined; - d->fontstrikeout = Undefined; - d->fontweight = Undefined; - d->fontsize = Undefined; - d->fontsizelog = Undefined; - d->fontsizestep = 0; - d->ncolumns = Undefined; - d->col = TQColor(); // !isValid() - d->anchor = FALSE; - d->align = Undefined; - d->valign = VAlignBaseline; - d->margin[0] = Undefined; - d->margin[1] = Undefined; - d->margin[2] = Undefined; - d->margin[3] = Undefined; - d->margin[4] = Undefined; - d->list = ListStyleUndefined; - d->whitespacemode = WhiteSpaceModeUndefined; - d->selfnest = TRUE; - d->lineSpacing = Undefined; -} - -/*! - Returns the name of the style item. -*/ -TQString TQStyleSheetItem::name() const -{ - return d->stylename; -} - -/*! - Returns the \link TQStyleSheetItem::DisplayMode display - mode\endlink of the style. - - \sa setDisplayMode() -*/ -TQStyleSheetItem::DisplayMode TQStyleSheetItem::displayMode() const -{ - return d->disp; -} - -/*! - \enum TQStyleSheetItem::DisplayMode - - This enum type defines the way adjacent elements are displayed. - - \value DisplayBlock elements are displayed as a rectangular block - (e.g. \c{

    ...

    }). - - \value DisplayInline elements are displayed in a horizontally - flowing sequence (e.g. \c{...}). - - \value DisplayListItem elements are displayed in a vertical - sequence (e.g. \c{
  • ...
  • }). - - \value DisplayNone elements are not displayed at all. -*/ - -/*! - Sets the display mode of the style to \a m. - - \sa displayMode() - */ -void TQStyleSheetItem::setDisplayMode(DisplayMode m) -{ - d->disp=m; -} - - -/*! - Returns the alignment of this style. Possible values are \c - AlignAuto, \c AlignLeft, \c AlignRight, \c AlignCenter or \c - AlignJustify. - - \sa setAlignment(), TQt::AlignmentFlags -*/ -int TQStyleSheetItem::alignment() const -{ - return d->align; -} - -/*! - Sets the alignment to \a f. This only makes sense for styles with - a \link TQStyleSheetItem::DisplayMode display mode\endlink of - DisplayBlock. Possible values are \c AlignAuto, \c AlignLeft, - \c AlignRight, \c AlignCenter or \c AlignJustify. - - \sa alignment(), displayMode(), TQt::AlignmentFlags -*/ -void TQStyleSheetItem::setAlignment( int f ) -{ - d->align = f; -} - - -/*! - Returns the vertical alignment of the style. Possible values are - \c VAlignBaseline, \c VAlignSub or \c VAlignSuper. - - \sa setVerticalAlignment() -*/ -TQStyleSheetItem::VerticalAlignment TQStyleSheetItem::verticalAlignment() const -{ - return d->valign; -} - -/*! - \enum TQStyleSheetItem::VerticalAlignment - - This enum type defines the way elements are aligned vertically. - This is only supported for text elements. - - \value VAlignBaseline align the baseline of the element (or the - bottom, if the element doesn't have a baseline) with the - baseline of the parent - - \value VAlignSub subscript the element - - \value VAlignSuper superscript the element - -*/ - - -/*! - Sets the vertical alignment to \a valign. Possible values are - \c VAlignBaseline, \c VAlignSub or \c VAlignSuper. - - The vertical alignment property is not inherited. - - \sa verticalAlignment() -*/ -void TQStyleSheetItem::setVerticalAlignment( VerticalAlignment valign ) -{ - d->valign = valign; -} - - -/*! - Returns TRUE if the style sets an italic font; otherwise returns - FALSE. - - \sa setFontItalic(), definesFontItalic() -*/ -bool TQStyleSheetItem::fontItalic() const -{ - return d->fontitalic > 0; -} - -/*! - If \a italic is TRUE sets italic for the style; otherwise sets - upright. - - \sa fontItalic(), definesFontItalic() -*/ -void TQStyleSheetItem::setFontItalic(bool italic) -{ - d->fontitalic = italic?1:0; -} - -/*! - Returns TRUE if the style defines a font shape; otherwise returns - FALSE. A style does not define any shape until setFontItalic() is - called. - - \sa setFontItalic(), fontItalic() -*/ -bool TQStyleSheetItem::definesFontItalic() const -{ - return d->fontitalic != Undefined; -} - -/*! - Returns TRUE if the style sets an underlined font; otherwise - returns FALSE. - - \sa setFontUnderline(), definesFontUnderline() -*/ -bool TQStyleSheetItem::fontUnderline() const -{ - return d->fontunderline > 0; -} - -/*! - If \a underline is TRUE, sets underline for the style; otherwise - sets no underline. - - \sa fontUnderline(), definesFontUnderline() -*/ -void TQStyleSheetItem::setFontUnderline(bool underline) -{ - d->fontunderline = underline?1:0; -} - -/*! - Returns TRUE if the style defines a setting for the underline - property of the font; otherwise returns FALSE. A style does not - define this until setFontUnderline() is called. - - \sa setFontUnderline(), fontUnderline() -*/ -bool TQStyleSheetItem::definesFontUnderline() const -{ - return d->fontunderline != Undefined; -} - - -/*! - Returns TRUE if the style sets a strike out font; otherwise - returns FALSE. - - \sa setFontStrikeOut(), definesFontStrikeOut() -*/ -bool TQStyleSheetItem::fontStrikeOut() const -{ - return d->fontstrikeout > 0; -} - -/*! - If \a strikeOut is TRUE, sets strike out for the style; otherwise - sets no strike out. - - \sa fontStrikeOut(), definesFontStrikeOut() -*/ -void TQStyleSheetItem::setFontStrikeOut(bool strikeOut) -{ - d->fontstrikeout = strikeOut?1:0; -} - -/*! - Returns TRUE if the style defines a setting for the strikeOut - property of the font; otherwise returns FALSE. A style does not - define this until setFontStrikeOut() is called. - - \sa setFontStrikeOut(), fontStrikeOut() -*/ -bool TQStyleSheetItem::definesFontStrikeOut() const -{ - return d->fontstrikeout != Undefined; -} - - -/*! - Returns the font weight setting of the style. This is either a - valid \c TQFont::Weight or the value \c TQStyleSheetItem::Undefined. - - \sa setFontWeight(), TQFont -*/ -int TQStyleSheetItem::fontWeight() const -{ - return d->fontweight; -} - -/*! - Sets the font weight setting of the style to \a w. Valid values - are those defined by \c TQFont::Weight. - - \sa TQFont, fontWeight() -*/ -void TQStyleSheetItem::setFontWeight(int w) -{ - d->fontweight = w; -} - -/*! - Returns the logical font size setting of the style. This is either - a valid size between 1 and 7 or \c TQStyleSheetItem::Undefined. - - \sa setLogicalFontSize(), setLogicalFontSizeStep(), TQFont::pointSize(), TQFont::setPointSize() -*/ -int TQStyleSheetItem::logicalFontSize() const -{ - return d->fontsizelog; -} - - -/*! - Sets the logical font size setting of the style to \a s. Valid - logical sizes are 1 to 7. - - \sa logicalFontSize(), TQFont::pointSize(), TQFont::setPointSize() -*/ -void TQStyleSheetItem::setLogicalFontSize(int s) -{ - d->fontsizelog = s; -} - -/*! - Returns the logical font size step of this style. - - The default is 0. Tags such as \c big define \c +1; \c small - defines \c -1. - - \sa setLogicalFontSizeStep() -*/ -int TQStyleSheetItem::logicalFontSizeStep() const -{ - return d->fontsizestep; -} - -/*! - Sets the logical font size step of this style to \a s. - - \sa logicalFontSizeStep() -*/ -void TQStyleSheetItem::setLogicalFontSizeStep( int s ) -{ - d->fontsizestep = s; -} - - - -/*! - Sets the font size setting of the style to \a s points. - - \sa fontSize(), TQFont::pointSize(), TQFont::setPointSize() -*/ -void TQStyleSheetItem::setFontSize(int s) -{ - d->fontsize = s; -} - -/*! - Returns the font size setting of the style. This is either a valid - point size or \c TQStyleSheetItem::Undefined. - - \sa setFontSize(), TQFont::pointSize(), TQFont::setPointSize() -*/ -int TQStyleSheetItem::fontSize() const -{ - return d->fontsize; -} - - -/*! - Returns the font family setting of the style. This is either a - valid font family or TQString::null if no family has been set. - - \sa setFontFamily(), TQFont::family(), TQFont::setFamily() -*/ -TQString TQStyleSheetItem::fontFamily() const -{ - return d->fontfamily; -} - -/*! - Sets the font family setting of the style to \a fam. - - \sa fontFamily(), TQFont::family(), TQFont::setFamily() -*/ -void TQStyleSheetItem::setFontFamily( const TQString& fam) -{ - d->fontfamily = fam; -} - - -/*!\obsolete - Returns the number of columns for this style. - - \sa setNumberOfColumns(), displayMode(), setDisplayMode() - - */ -int TQStyleSheetItem::numberOfColumns() const -{ - return d->ncolumns; -} - - -/*!\obsolete - Sets the number of columns for this style. Elements in the style - are divided into columns. - - This makes sense only if the style uses a block display mode - (see TQStyleSheetItem::DisplayMode). - - \sa numberOfColumns() - */ -void TQStyleSheetItem::setNumberOfColumns(int ncols) -{ - if (ncols > 0) - d->ncolumns = ncols; -} - - -/*! - Returns the text color of this style or an invalid color if no - color has been set. - - \sa setColor() TQColor::isValid() -*/ -TQColor TQStyleSheetItem::color() const -{ - return d->col; -} - -/*! - Sets the text color of this style to \a c. - - \sa color() -*/ -void TQStyleSheetItem::setColor( const TQColor &c) -{ - d->col = c; -} - -/*! - Returns whether this style is an anchor. - - \sa setAnchor() -*/ -bool TQStyleSheetItem::isAnchor() const -{ - return d->anchor; -} - -/*! - If \a anc is TRUE, sets this style to be an anchor (hypertext - link); otherwise sets it to not be an anchor. Elements in this - style link to other documents or anchors. - - \sa isAnchor() -*/ -void TQStyleSheetItem::setAnchor(bool anc) -{ - d->anchor = anc; -} - - -/*! - Returns the whitespace mode. - - \sa setWhiteSpaceMode() WhiteSpaceMode -*/ -TQStyleSheetItem::WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode() const -{ - return d->whitespacemode; -} - -/*! - Sets the whitespace mode to \a m. - - \sa WhiteSpaceMode -*/ -void TQStyleSheetItem::setWhiteSpaceMode(WhiteSpaceMode m) -{ - d->whitespacemode = m; -} - - -/*! - Returns the width of margin \a m in pixels. - - The margin, \a m, can be \c MarginLeft, \c MarginRight, \c - MarginTop, \c MarginBottom, or \c MarginFirstLine. - - \sa setMargin() Margin -*/ -int TQStyleSheetItem::margin(Margin m) const -{ - if (m == MarginAll ) { - return d->margin[MarginLeft]; - } else if (m == MarginVertical) { - return d->margin[MarginTop]; - } else if (m == MarginHorizontal) { - return d->margin[MarginLeft]; - } else { - return d->margin[m]; - } -} - - -/*! - Sets the width of margin \a m to \a v pixels. - - The margin, \a m, can be \c MarginLeft, \c MarginRight, \c - MarginTop, \c MarginBottom, \c MarginFirstLine, \c MarginAll, - \c MarginVertical or \c MarginHorizontal. The value \a v must - be >= 0. - - \sa margin() -*/ -void TQStyleSheetItem::setMargin(Margin m, int v) -{ - if (m == MarginAll) { - d->margin[MarginLeft] = v; - d->margin[MarginRight] = v; - d->margin[MarginTop] = v; - d->margin[MarginBottom] = v; - } else if (m == MarginVertical ) { - d->margin[MarginTop] = v; - d->margin[MarginBottom] = v; - } else if (m == MarginHorizontal ) { - d->margin[MarginLeft] = v; - d->margin[MarginRight] = v; - } else { - d->margin[m] = v; - } -} - - -/*! - Returns the list style of the style. - - \sa setListStyle() ListStyle - */ -TQStyleSheetItem::ListStyle TQStyleSheetItem::listStyle() const -{ - return d->list; -} - -/*! - \enum TQStyleSheetItem::ListStyle - - This enum type defines how the items in a list are prefixed when - displayed. - - \value ListDisc a filled circle (i.e. a bullet) - \value ListCircle an unfilled circle - \value ListSquare a filled square - \value ListDecimal an integer in base 10: \e 1, \e 2, \e 3, ... - \value ListLowerAlpha a lowercase letter: \e a, \e b, \e c, ... - \value ListUpperAlpha an uppercase letter: \e A, \e B, \e C, ... -*/ - -/*! - Sets the list style of the style to \a s. - - This is used by nested elements that have a display mode of \c - DisplayListItem. - - \sa listStyle() DisplayMode ListStyle -*/ -void TQStyleSheetItem::setListStyle(ListStyle s) -{ - d->list=s; -} - - -/*! - Returns a space-separated list of names of styles that may contain - elements of this style. If nothing has been set, contexts() - returns an empty string, which indicates that this style can be - nested everywhere. - - \sa setContexts() -*/ -TQString TQStyleSheetItem::contexts() const -{ - return d->contxt; -} - -/*! - Sets a space-separated list of names of styles that may contain - elements of this style. If \a c is empty, the style can be nested - everywhere. - - \sa contexts() -*/ -void TQStyleSheetItem::setContexts( const TQString& c) -{ - d->contxt = TQChar(' ') + c + TQChar(' '); -} - -/*! - Returns TRUE if this style can be nested into an element of style - \a s; otherwise returns FALSE. - - \sa contexts(), setContexts() -*/ -bool TQStyleSheetItem::allowedInContext( const TQStyleSheetItem* s) const -{ - if ( d->contxt.isEmpty() ) - return TRUE; - return d->contxt.find( TQChar(' ')+s->name()+TQChar(' ')) != -1; -} - - -/*! - Returns TRUE if this style has self-nesting enabled; otherwise - returns FALSE. - - \sa setSelfNesting() -*/ -bool TQStyleSheetItem::selfNesting() const -{ - return d->selfnest; -} - -/*! - Sets the self-nesting property for this style to \a nesting. - - In order to support "dirty" HTML, paragraphs \c{

    } and list - items \c{

  • } are not self-nesting. This means that starting a - new paragraph or list item automatically closes the previous one. - - \sa selfNesting() -*/ -void TQStyleSheetItem::setSelfNesting( bool nesting ) -{ - d->selfnest = nesting; -} - -/*! - \internal - Sets the linespacing to be at least \a ls pixels. - - For compatibility with previous TQt releases, small values get - treated differently: If \a ls is smaller than the default font - line spacing in pixels at parse time, the resulting line spacing - is the sum of the default line spacing plus \a ls. We recommend - not relying on this behavior. -*/ - -void TQStyleSheetItem::setLineSpacing( int ls ) -{ - d->lineSpacing = ls; -} - -/*! - \obsolete - - Returns the linespacing -*/ - -int TQStyleSheetItem::lineSpacing() const -{ - return d->lineSpacing; -} - -//************************************************************************ - - - - -//************************************************************************ - - -/*! - \class TQStyleSheet ntqstylesheet.h - \ingroup text - \brief The TQStyleSheet class is a collection of styles for rich text - rendering and a generator of tags. - - \ingroup graphics - \ingroup helpsystem - - By creating TQStyleSheetItem objects for a style sheet you build a - definition of a set of tags. This definition will be used by the - internal rich text rendering system to parse and display text - documents to which the style sheet applies. Rich text is normally - visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, - TQWhatsThis and TQMessageBox also support it, and other classes are - likely to follow. With TQSimpleRichText it is possible to use the - rich text renderer for custom widgets as well. - - The default TQStyleSheet object has the following style bindings, - sorted by structuring bindings, anchors, character style bindings - (i.e. inline styles), special elements such as horizontal lines or - images, and other tags. In addition, rich text supports simple - HTML tables. - - The structuring tags are - \table - \header \i Structuring tags \i Notes - \row \i \c{}...\c{} - \i A TQt rich text document. It understands the following - attributes: - \list - \i \c title -- The caption of the document. This attribute is - easily accessible with TQTextEdit::documentTitle(). - \i \c type -- The type of the document. The default type is \c - page. It indicates that the document is displayed in a - page of its own. Another style is \c detail, which can be - used to explain certain expressions in more detail in a - few sentences. For \c detail, TQTextBrowser will then keep - the current page and display the new document in a small - popup similar to TQWhatsThis. Note that links will not work - in documents with \c{...}. - \i \c bgcolor -- The background color, for example \c - bgcolor="yellow" or \c bgcolor="#0000FF". - \i \c background -- The background pixmap, for example \c - background="granite.xpm". The pixmap name will be resolved - by a TQMimeSourceFactory(). - \i \c text -- The default text color, for example \c text="red". - \i \c link -- The link color, for example \c link="green". - \endlist - \row \i \c{

    ...

    } - \i A top-level heading. - \row \i \c{

    ...

    } - \i A sublevel heading. - \row \i \c{

    ...

    } - \i A sub-sublevel heading. - \row \i \c{

    ...

    } \c{
    ...
    } - \i Headings of lesser importance. - \row \i \c{

    ...

    } - \i A left-aligned paragraph. Adjust the alignment with the \c - align attribute. Possible values are \c left, \c right and - \c center. - \row \i \c{
    ...}
    \c{
    } - \i A centered paragraph. - \row \i \c{
    ...}
    \c{
    } - \i An indented paragraph that is useful for quotes. - \row \i \c{
      ...
    } - \i An unordered list. You can also pass a type argument to - define the bullet style. The default is \c type=disc; - other types are \c circle and \c square. - \row \i \c{
      ...
    } - \i An ordered list. You can also pass a type argument to - define the enumeration label style. The default is \c - type="1"; other types are \c "a" and \c "A". - \row \i \c{
  • ...
  • } - \i A list item. This tag can be used only within the context - of \c{
      } or \c{
        }. - \row \i \c{
        ...
        } - \i A list of definitions, consisting of terms and descriptions. - \row \i \c{
        ...
        } - \i A term in a list of definitions. This tag can be used only - in the context of \c{
        ...
        }. - \row \i \c{
        ...
        } - \i A description in a list of definitions. This tag can be - used only in the context of \c{
        ...
        }. - \row \i \c{
        ...
        } - \i For larger chunks of code. Whitespaces in the contents are - preserved. For small bits of code use the inline-style \c - code. - \row \i \c{
        ...
        } and \c{...} - \i Block grouping elements. These are used to structure the - document, and are often used to provide hints about the - intended presentation of the document. - \endtable - - Anchors and links are done with a single tag: - \table - \header \i Anchor tags \i Notes - \row \i \c{...} - \i An anchor or link. - \list - \i A link is created by using an \c href - attribute, for example -
        \c{Link Text}. Links to - targets within a document are achieved in the same way - as for HTML, e.g. -
        \c{Link Text}. - \i A target is created by using a \c name - attribute, for example -
        \c{

        Sub Title

        }. - \endlist - \endtable - - The default character style bindings are - \table - \header \i Style tags \i Notes - \row \i \c{...} - \i Emphasized. By default this is the same as \c{...} - (italic). - \row \i \c{...} - \i Strong. By default this is the same as \c{...} - (bold). - \row \i \c{...} - \i Italic font style. - \row \i \c{...} - \i Bold font style. - \row \i \c{...} - \i Underlined font style. - \row \i \c{...} - \i Strike out font style. - \row \i \c{...} - \i A larger font size. - \row \i \c{...} - \i A smaller font size. - \row \i \c{...} - \i Subscripted text - \row \i \c{...} - \i Superscripted text - \row \i \c{...} - \i Indicates code. By default this is the same as - \c{...} (typewriter). For larger chunks of code - use the block-tag \c{<}\c{pre>}. - \row \i \c{...} - \i Typewriter font style. - \row \i \c{...} - \i Customizes the font size, family and text color. The tag - understands the following attributes: - \list - \i \c color -- The text color, for example \c color="red" or - \c color="#FF0000". - \i \c size -- The logical size of the font. Logical sizes 1 - to 7 are supported. The value may either be absolute - (for example, \c size=3) or relative (\c size=-2). In - the latter case the sizes are simply added. - \i \c face -- The family of the font, for example \c face=times. - \endlist - \endtable - - Special elements are: - \table - \header \i Special tags \i Notes - \row \i \c{} - \i An image. The image name for the mime source factory is - given in the source attribute, for example - \c{} The image tag also understands the - attributes \c width and \c height that determine the size - of the image. If the pixmap does not fit the specified - size it will be scaled automatically (by using - TQImage::smoothScale()). -
        - The \c align attribute determines where the image is - placed. By default, an image is placed inline just like a - normal character. Specify \c left or \c right to place the - image at the respective side. - \row \i \c{
        } - \i A horizontal line. - \row \i \c{
        } - \i A line break. - \row \i \c{...} - \i No break. Prevents word wrap. - \endtable - - In addition, rich text supports simple HTML tables. A table - consists of one or more rows each of which contains one or more - cells. Cells are either data cells or header cells, depending on - their content. Cells which span rows and columns are supported. - - \table - \header \i Table tags \i Notes - \row \i \c{...
        } - \i A table. Tables support the following attributes: - \list - \i \c bgcolor -- The background color. - \i \c width -- The table width. This is either an absolute - pixel width or a relative percentage of the table's - width, for example \c width=80%. - \i \c border -- The width of the table border. The default is - 0 (= no border). - \i \c cellspacing -- Additional space around the table cells. - The default is 2. - \i \c cellpadding -- Additional space around the contents of - table cells. The default is 1. - \endlist - \row \i \c{...} - \i A table row. This is only valid within a \c table. Rows - support the following attribute: - \list - \i \c bgcolor -- The background color. - \endlist - \row \i \c{...} - \i A table header cell. Similar to \c td, but defaults to - center alignment and a bold font. - \row \i \c{...} - \i A table data cell. This is only valid within a \c tr. - Cells support the following attributes: - \list - \i \c bgcolor -- The background color. - \i \c width -- The cell width. This is either an absolute - pixel width or a relative percentage of table's width, - for example \c width=50%. - \i \c colspan -- Specifies how many columns this cell spans. - The default is 1. - \i \c rowspan -- Specifies how many rows this cell spans. The - default is 1. - \i \c align -- Alignment; possible values are \c left, \c - right, and \c center. The default is \c left. - \i \c valign -- Vertical alignment; possible values are \c - top, \c middle, and \c bottom. The default is \c middle. - \endlist - \endtable -*/ - -/*! - Creates a style sheet called \a name, with parent \a parent. Like - any TQObject it will be deleted when its parent is destroyed (if - the child still exists). - - By default the style sheet has the tag definitions defined above. -*/ -TQStyleSheet::TQStyleSheet( TQObject *parent, const char *name ) - : TQObject( parent, name ) -{ - init(); -} - -/*! - Destroys the style sheet. All styles inserted into the style sheet - will be deleted. -*/ -TQStyleSheet::~TQStyleSheet() -{ -} - -/*! - \internal - Initialized the style sheet to the basic TQt style. -*/ -void TQStyleSheet::init() -{ - styles.setAutoDelete( TRUE ); - - nullstyle = new TQStyleSheetItem( this, - TQString::fromLatin1("") ); - - TQStyleSheetItem* style; - - style = new TQStyleSheetItem( this, "qml" ); // compatibility - style->setDisplayMode( TQStyleSheetItem::DisplayBlock ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("qt") ); - style->setDisplayMode( TQStyleSheetItem::DisplayBlock ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("a") ); - style->setAnchor( TRUE ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("em") ); - style->setFontItalic( TRUE ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("i") ); - style->setFontItalic( TRUE ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("big") ); - style->setLogicalFontSizeStep( 1 ); - style = new TQStyleSheetItem( this, TQString::fromLatin1("large") ); // compatibility - style->setLogicalFontSizeStep( 1 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("small") ); - style->setLogicalFontSizeStep( -1 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("strong") ); - style->setFontWeight( TQFont::Bold); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("b") ); - style->setFontWeight( TQFont::Bold); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("h1") ); - style->setFontWeight( TQFont::Bold); - style->setLogicalFontSize(6); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginTop, 18); - style-> setMargin(TQStyleSheetItem::MarginBottom, 12); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("h2") ); - style->setFontWeight( TQFont::Bold); - style->setLogicalFontSize(5); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginTop, 16); - style-> setMargin(TQStyleSheetItem::MarginBottom, 12); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("h3") ); - style->setFontWeight( TQFont::Bold); - style->setLogicalFontSize(4); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginTop, 14); - style-> setMargin(TQStyleSheetItem::MarginBottom, 12); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("h4") ); - style->setFontWeight( TQFont::Bold); - style->setLogicalFontSize(3); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginVertical, 12); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("h5") ); - style->setFontWeight( TQFont::Bold); - style->setLogicalFontSize(2); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginTop, 12); - style-> setMargin(TQStyleSheetItem::MarginBottom, 4); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("p") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style-> setMargin(TQStyleSheetItem::MarginVertical, 12); - style->setSelfNesting( FALSE ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("center") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setAlignment( AlignCenter ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("twocolumn") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setNumberOfColumns( 2 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("multicol") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - (void) new TQStyleSheetItem( this, TQString::fromLatin1("font") ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("ul") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setListStyle( TQStyleSheetItem::ListDisc ); - style-> setMargin(TQStyleSheetItem::MarginVertical, 12); - style->setMargin( TQStyleSheetItem::MarginLeft, 40 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("ol") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setListStyle( TQStyleSheetItem::ListDecimal ); - style-> setMargin(TQStyleSheetItem::MarginVertical, 12); - style->setMargin( TQStyleSheetItem::MarginLeft, 40 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("li") ); - style->setDisplayMode(TQStyleSheetItem::DisplayListItem); - style->setSelfNesting( FALSE ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("code") ); - style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("tt") ); - style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); - - new TQStyleSheetItem(this, TQString::fromLatin1("img")); - new TQStyleSheetItem(this, TQString::fromLatin1("br")); - new TQStyleSheetItem(this, TQString::fromLatin1("hr")); - - style = new TQStyleSheetItem(this, TQString::fromLatin1("sub")); - style->setVerticalAlignment( TQStyleSheetItem::VAlignSub ); - style = new TQStyleSheetItem(this, TQString::fromLatin1("sup")); - style->setVerticalAlignment( TQStyleSheetItem::VAlignSuper ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("pre") ); - style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setWhiteSpaceMode(TQStyleSheetItem::WhiteSpacePre); - style-> setMargin(TQStyleSheetItem::MarginVertical, 12); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("blockquote") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setMargin(TQStyleSheetItem::MarginHorizontal, 40 ); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("head") ); - style->setDisplayMode(TQStyleSheetItem::DisplayNone); - style = new TQStyleSheetItem( this, TQString::fromLatin1("body") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style = new TQStyleSheetItem( this, TQString::fromLatin1("div") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock) ; - style = new TQStyleSheetItem( this, TQString::fromLatin1("span") ); - style = new TQStyleSheetItem( this, TQString::fromLatin1("dl") ); - style-> setMargin(TQStyleSheetItem::MarginVertical, 8); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style = new TQStyleSheetItem( this, TQString::fromLatin1("dt") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setContexts(TQString::fromLatin1("dl") ); - style = new TQStyleSheetItem( this, TQString::fromLatin1("dd") ); - style->setDisplayMode(TQStyleSheetItem::DisplayBlock); - style->setMargin(TQStyleSheetItem::MarginLeft, 30); - style->setContexts(TQString::fromLatin1("dt dl") ); - style = new TQStyleSheetItem( this, TQString::fromLatin1("u") ); - style->setFontUnderline( TRUE); - style = new TQStyleSheetItem( this, TQString::fromLatin1("s") ); - style->setFontStrikeOut( TRUE); - style = new TQStyleSheetItem( this, TQString::fromLatin1("nobr") ); - style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpaceNoWrap ); - - // compatibily with some minor 3.0.x TQt versions that had an - // undocumented tag. ### Remove 3.1 - style = new TQStyleSheetItem( this, TQString::fromLatin1("wsp") ); - style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre ); - - // tables - style = new TQStyleSheetItem( this, TQString::fromLatin1("table") ); - style = new TQStyleSheetItem( this, TQString::fromLatin1("tr") ); - style->setContexts(TQString::fromLatin1("table")); - style = new TQStyleSheetItem( this, TQString::fromLatin1("td") ); - style->setContexts(TQString::fromLatin1("tr")); - style = new TQStyleSheetItem( this, TQString::fromLatin1("th") ); - style->setFontWeight( TQFont::Bold ); - style->setAlignment( TQt::AlignCenter ); - style->setContexts(TQString::fromLatin1("tr")); - - style = new TQStyleSheetItem( this, TQString::fromLatin1("html") ); -} - - - -static TQStyleSheet* defaultsheet = 0; -static TQSingleCleanupHandler tqt_cleanup_stylesheet; - -/*! - Returns the application-wide default style sheet. This style sheet - is used by rich text rendering classes such as TQSimpleRichText, - TQWhatsThis and TQMessageBox to define the rendering style and - available tags within rich text documents. It also serves as the - initial style sheet for the more complex render widgets, TQTextEdit - and TQTextBrowser. - - \sa setDefaultSheet() -*/ -TQStyleSheet* TQStyleSheet::defaultSheet() -{ - if (!defaultsheet) { - defaultsheet = new TQStyleSheet(); - tqt_cleanup_stylesheet.set( &defaultsheet ); - } - return defaultsheet; -} - -/*! - Sets the application-wide default style sheet to \a sheet, - deleting any style sheet previously set. The ownership is - transferred to TQStyleSheet. - - \sa defaultSheet() -*/ -void TQStyleSheet::setDefaultSheet( TQStyleSheet* sheet) -{ - if ( defaultsheet != sheet ) { - if ( defaultsheet ) - tqt_cleanup_stylesheet.reset(); - delete defaultsheet; - } - defaultsheet = sheet; - if ( defaultsheet ) - tqt_cleanup_stylesheet.set( &defaultsheet ); -} - -/*!\internal - Inserts \a style. Any tags generated after this time will be - bound to this style. Note that \a style becomes owned by the - style sheet and will be deleted when the style sheet is destroyed. -*/ -void TQStyleSheet::insert( TQStyleSheetItem* style ) -{ - styles.insert(style->name(), style); -} - - -/*! - Returns the style called \a name or 0 if there is no such style. -*/ -TQStyleSheetItem* TQStyleSheet::item( const TQString& name) -{ - if ( name.isNull() ) - return 0; - return styles[name]; -} - -/*! - \overload - - Returns the style called \a name or 0 if there is no such style - (const version) -*/ -const TQStyleSheetItem* TQStyleSheet::item( const TQString& name) const -{ - if ( name.isNull() ) - return 0; - return styles[name]; -} - - -/*! - \preliminary - - Generates an internal object for the tag called \a name, given the - attributes \a attr, and using additional information provided by - the mime source factory \a factory. - - \a context is the optional context of the document, i.e. the path - to look for relative links. This becomes important if the text - contains relative references, for example within image tags. - TQSimpleRichText always uses the default mime source factory (see - \l{TQMimeSourceFactory::defaultFactory()}) to resolve these - references. The context will then be used to calculate the - absolute path. See TQMimeSourceFactory::makeAbsolute() for details. - - \a emptyTag and \a doc are for internal use only. - - This function should not be used in application code. -*/ -#ifndef TQT_NO_TEXTCUSTOMITEM -TQTextCustomItem* TQStyleSheet::tag( const TQString& name, - const TQMap &attr, - const TQString& context, - const TQMimeSourceFactory& factory, - bool /*emptyTag */, TQTextDocument *doc ) const -{ - const TQStyleSheetItem* style = item( name ); - // first some known tags - if ( !style ) - return 0; - if ( style->name() == "img" ) - return new TQTextImage( doc, attr, context, (TQMimeSourceFactory&)factory ); - if ( style->name() == "hr" ) - return new TQTextHorizontalLine( doc, attr, context, (TQMimeSourceFactory&)factory ); - return 0; -} -#endif - - -/*! Auxiliary function. Converts the plain text string \a plain to a - rich text formatted paragraph while preserving most of its look. - - \a mode defines the whitespace mode. Possible values are \c - TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces - preserved) and \c TQStyleSheetItem::WhiteSpaceNormal (wrapping, - simplified whitespaces). - - \sa escape() -*/ -TQString TQStyleSheet::convertFromPlainText( const TQString& plain, TQStyleSheetItem::WhiteSpaceMode mode ) -{ - int col = 0; - TQString rich; - rich += "

        "; - for ( int i = 0; i < int(plain.length()); ++i ) { - if ( plain[i] == '\n' ){ - int c = 1; - while ( i+1 < int(plain.length()) && plain[i+1] == '\n' ) { - i++; - c++; - } - if ( c == 1) - rich += "
        \n"; - else { - rich += "

        \n"; - while ( --c > 1 ) - rich += "
        \n"; - rich += "

        "; - } - col = 0; - } else { - if ( mode == TQStyleSheetItem::WhiteSpacePre && plain[i] == '\t' ){ - rich += 0x00a0U; - ++col; - while ( col % 8 ) { - rich += 0x00a0U; - ++col; - } - } - else if ( mode == TQStyleSheetItem::WhiteSpacePre && plain[i].isSpace() ) - rich += 0x00a0U; - else if ( plain[i] == '<' ) - rich +="<"; - else if ( plain[i] == '>' ) - rich +=">"; - else if ( plain[i] == '&' ) - rich +="&"; - else - rich += plain[i]; - ++col; - } - } - if ( col != 0 ) - rich += "

        "; - return rich; -} - -/*! - Auxiliary function. Converts the plain text string \a plain to a - rich text formatted string with any HTML meta-characters escaped. - - \sa convertFromPlainText() -*/ -TQString TQStyleSheet::escape( const TQString& plain) -{ - TQString rich; - for ( int i = 0; i < int(plain.length()); ++i ) { - if ( plain[i] == '<' ) - rich +="<"; - else if ( plain[i] == '>' ) - rich +=">"; - else if ( plain[i] == '&' ) - rich +="&"; - else - rich += plain[i]; - } - return rich; -} - -// Must doc this enum somewhere, and it is logically related to TQStyleSheet - -/*! - \enum TQt::TextFormat - - This enum is used in widgets that can display both plain text and - rich text, e.g. TQLabel. It is used for deciding whether a text - string should be interpreted as one or the other. This is normally - done by passing one of the enum values to a setTextFormat() - function. - - \value PlainText The text string is interpreted as a plain text - string. - - \value RichText The text string is interpreted as a rich text - string using the current TQStyleSheet::defaultSheet(). - - \value AutoText The text string is interpreted as for \c RichText - if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as - \c PlainText. - - \value LogText A special, limited text format which is only used - by TQTextEdit in an optimized mode. -*/ - -/*! - Returns TRUE if the string \a text is likely to be rich text; - otherwise returns FALSE. - - This function uses a fast and therefore simple heuristic. It - mainly checks whether there is something that looks like a tag - before the first line break. Although the result may be correct - for common cases, there is no guarantee. -*/ -bool TQStyleSheet::mightBeRichText( const TQString& text) -{ - if ( text.isEmpty() ) - return FALSE; - int start = 0; - - while ( start < int(text.length()) && text[start].isSpace() ) - ++start; - if ( text.mid( start, 5 ).lower() == " - ++open; - } - if ( open < (int)text.length() && text[open] == '<' ) { - int close = text.find('>', open); - if ( close > -1 ) { - TQString tag; - for (int i = open+1; i < close; ++i) { - if ( text[i].isDigit() || text[i].isLetter() ) - tag += text[i]; - else if ( !tag.isEmpty() && text[i].isSpace() ) - break; - else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) ) - return FALSE; // that's not a tag - } - return defaultSheet()->item( tag.lower() ) != 0; - } - } - return FALSE; -} - - -/*! - \fn void TQStyleSheet::error( const TQString& msg) const - - This virtual function is called when an error occurs when - processing rich text. Reimplement it if you need to catch error - messages. - - Errors might occur if some rich text strings contain tags that are - not understood by the stylesheet, if some tags are nested - incorrectly, or if tags are not closed properly. - - \a msg is the error message. -*/ -void TQStyleSheet::error( const TQString& ) const -{ -} - - -/*! - Scales the font \a font to the appropriate physical point size - corresponding to the logical font size \a logicalSize. - - When calling this function, \a font has a point size corresponding - to the logical font size 3. - - Logical font sizes range from 1 to 7, with 1 being the smallest. - - \sa TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), TQFont::setPointSize() - */ -void TQStyleSheet::scaleFont( TQFont& font, int logicalSize ) const -{ - if ( logicalSize < 1 ) - logicalSize = 1; - if ( logicalSize > 7 ) - logicalSize = 7; - int baseSize = font.pointSize(); - bool pixel = FALSE; - if ( baseSize == -1 ) { - baseSize = font.pixelSize(); - pixel = TRUE; - } - int s; - switch ( logicalSize ) { - case 1: - s = 7*baseSize/10; - break; - case 2: - s = (8 * baseSize) / 10; - break; - case 4: - s = (12 * baseSize) / 10; - break; - case 5: - s = (15 * baseSize) / 10; - break; - case 6: - s = 2 * baseSize; - break; - case 7: - s = (24 * baseSize) / 10; - break; - default: - s = baseSize; - } - if ( pixel ) - font.setPixelSize( s ); - else - font.setPointSize( s ); -} - -#endif // TQT_NO_RICHTEXT diff --git a/src/kernel/qt_kernel.pri b/src/kernel/qt_kernel.pri index a021a33f..d2249813 100644 --- a/src/kernel/qt_kernel.pri +++ b/src/kernel/qt_kernel.pri @@ -75,8 +75,8 @@ kernel { $$KERNEL_H/ntqsizepolicy.h \ $$KERNEL_H/ntqsocketnotifier.h \ $$KERNEL_H/ntqsound.h \ - $$KERNEL_H/ntqstyle.h \ - $$KERNEL_H/ntqstylesheet.h \ + $$KERNEL_H/tqstyle.h \ + $$KERNEL_H/tqstylesheet.h \ $$KERNEL_H/ntqthread.h \ $$KERNEL_H/ntqtimer.h \ $$KERNEL_H/ntqurl.h \ @@ -245,10 +245,10 @@ kernel { $$KERNEL_CPP/qsignalmapper.cpp \ $$KERNEL_CPP/qsize.cpp \ $$KERNEL_CPP/qsizegrip.cpp \ - $$KERNEL_CPP/qstyle.cpp \ + $$KERNEL_CPP/tqstyle.cpp \ $$KERNEL_CPP/qsocketnotifier.cpp \ $$KERNEL_CPP/qsound.cpp \ - $$KERNEL_CPP/qstylesheet.cpp \ + $$KERNEL_CPP/tqstylesheet.cpp \ $$KERNEL_CPP/qthread.cpp \ $$KERNEL_CPP/qtimer.cpp \ $$KERNEL_CPP/qurl.cpp \ diff --git a/src/kernel/qt_pch.h b/src/kernel/qt_pch.h index 4041d184..a4655ff2 100644 --- a/src/kernel/qt_pch.h +++ b/src/kernel/qt_pch.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index b87fd8d0..d50b48e8 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -50,7 +50,7 @@ #include "tqptrvector.h" // TQStyleControlElementData -#include "ntqstyle.h" +#include "tqstyle.h" #ifdef TQT_THREAD_SUPPORT #include "ntqmutex.h" diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp new file mode 100644 index 00000000..f0c0524d --- /dev/null +++ b/src/kernel/tqstyle.cpp @@ -0,0 +1,2911 @@ +/**************************************************************************** +** +** Implementation of TQStyle class +** +** Created : 981231 +** +** Copyright (C) 1998-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqstyle.h" +#ifndef TQT_NO_STYLE +#include "ntqapplication.h" +#include "ntqpainter.h" +#include "ntqbitmap.h" +#include "ntqpixmapcache.h" +#include "ntqframe.h" +#include "ntqlayout.h" +#include "ntqlistview.h" +#include "ntqpopupmenu.h" +#include "ntqpushbutton.h" +#include "tqobjectlist.h" +#include "tqwidgetlist.h" + +#include + +class TQStylePrivate +{ +public: + TQStylePrivate() + { + } +}; + +TQStyleOption::TQStyleOption(StyleOptionDefault) : + def(TRUE), + tb(NULL), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(int in1) : + def(FALSE), + tb(NULL), + i1(in1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(int in1, int in2) : + def(FALSE), + tb(NULL), + i1(in1), + i2(in2), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) : + def(FALSE), + tb(NULL), + i1(in1), + i2(in2), + i3(in3), + i4(in4), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQMenuItem* m) : + def(FALSE), + mi(m), + tb(NULL), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) : + def(FALSE), + mi(m), + tb(NULL), + i1(in1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) : + def(FALSE), + mi(m), + tb(NULL), + i1(in1), + i2(in2), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(const TQColor& c) : + def(FALSE), + tb(NULL), + cl(&c), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQTab* t) : + def(FALSE), + tb(t), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQListViewItem* i) : + def(FALSE), + tb(NULL), + li(i), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQCheckListItem* i) : + def(FALSE), + tb(NULL), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(i), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQt::ArrowType a) : + def(FALSE), + tb(NULL), + i1((int)a), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(const TQRect& r) : + def(FALSE), + tb(NULL), + i1(r.x()), + i2(r.y()), + i3(r.width()), + i4(r.height()), + i5(-1), + cli(NULL), + tbh(NULL) { + // +} + +TQStyleOption::TQStyleOption(TQWidget *w) : + def(FALSE), + tb(NULL), + i1(-1), + i2(-1), + i3(-1), + i4(-1), + i5(-1), + cli(NULL), + p1((void*)w), + tbh(NULL) { + // +} + +/*! + \class TQStyleOption tqstyle.h + \brief The TQStyleOption class specifies optional parameters for TQStyle functions. + \ingroup appearance + + Some TQStyle functions take an optional argument specifying extra + information that is required for a paritical primitive or control. + So that the TQStyle class can be extended, TQStyleOption is used to + provide a variable-argument for these options. + + The TQStyleOption class has constructors for each type of optional + argument, and this set of constructors may be extended in future + TQt releases. There are also corresponding access functions that + return the optional arguments: these too may be extended. + + For each constructor, you should refer to the documentation of the + TQStyle functions to see the meaning of the arguments. + + When calling TQStyle functions from your own widgets, you must only + pass the default TQStyleOption or the argument that TQStyle is + documented to accept. For example, if the function expects + TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *) + leaves the optional integer argument uninitialized. + + When subclassing TQStyle, you must similarly only expect the + default or documented arguments. The other arguments will have + uninitialized values. + + If you make your own TQStyle subclasses and your own widgets, you + can make a subclass of TQStyleOption to pass additional arguments + to your TQStyle subclass. You will need to cast the "const + TQStyleOption&" argument to your subclass, so be sure your style + has been called from your widget. +*/ + +/*! + \enum TQStyleOption::StyleOptionDefault + + This enum value can be passed as the optional argument to any + TQStyle function. + + \value Default +*/ + +/*! + \fn TQStyleOption::TQStyleOption(StyleOptionDefault) + + The default option. This can always be passed as the optional + argument to TQStyle functions. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(int) + + Pass one integer, \a in1. For example, headerSection. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(int, int) + + Pass two integers, \a in1 and \a in2. For example, linewidth and + midlinewidth. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(int, int, int, int) + + Pass four integers, \a in1, \a in2, \a in3 and \a in4. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQMenuItem*) + + Pass a menu item, \a m. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQMenuItem*, int) + + Pass a menu item and an integer, \a m and \a in1. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQMenuItem*, int, int) + + Pass a menu item and two integers, \a m, \a in1 and \a in2. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(const TQColor&) + + Pass a color, \a c. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQTab*) + + Pass a TQTab, \a t. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQListViewItem*) + + Pass a TQListViewItem, \a i. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQt::ArrowType) + + Pass an TQt::ArrowType, \a a. +*/ + +/*! + \fn TQStyleOption::TQStyleOption(TQCheckListItem* i) + + Pass a TQCheckListItem, \a i. +*/ + +/*! + \fn TQStyleOption::TQStyleOption( const TQRect &r ) + + Pass a TQRect, \a r. +*/ + +/*! + \fn TQStyleOption::TQStyleOption( TQWidget *w ) + + Pass a TQWidget, \a w. +*/ + +/*! + \fn bool TQStyleOption::isDefault() const + + Returns TRUE if the option was constructed with the default + constructor; otherwise returns FALSE. +*/ + +/*! + \fn int TQStyleOption::day() const + + Returns the index of the day in the month if the appropriate + constructor was called; otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::lineWidth() const + + Returns the line width if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::midLineWidth() const + + Returns the mid-line width if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::frameShape() const + + Returns a TQFrame::Shape value if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::frameShadow() const + + Returns a TQFrame::Shadow value if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn TQMenuItem* TQStyleOption::menuItem() const + + Returns a menu item if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::maxIconWidth() const + + Returns the maximum width of the menu item check area if the + appropriate constructor was called; otherwise the return value is + undefined. +*/ + +/*! + \fn int TQStyleOption::tabWidth() const + + Returns the tab indent width if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn int TQStyleOption::headerSection() const + + Returns the header section if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn const TQColor& TQStyleOption::color() const + + Returns a color if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn TQTab* TQStyleOption::tab() const + + Returns a TQTabBar tab if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn TQListViewItem* TQStyleOption::listViewItem() const + + Returns a TQListView item if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn TQt::ArrowType TQStyleOption::arrowType() const + + Returns an arrow type if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn TQCheckListItem* TQStyleOption::checkListItem() const + + Returns a check list item if the appropriate constructor was + called; otherwise the return value is undefined. +*/ + +/*! + \fn TQRect TQStyleOption::rect() const + + Returns a rectangle if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \fn TQWidget* TQStyleOption::widget() const + + Returns a pointer to a widget if the appropriate constructor was called; + otherwise the return value is undefined. +*/ + +/*! + \class TQStyle tqstyle.h + \brief The TQStyle class specifies the look and feel of a GUI. + \ingroup appearance + + A large number of GUI elements are common to many widgets. The + TQStyle class allows the look of these elements to be modified + across all widgets that use the TQStyle functions. It also + provides two feel options: Motif and Windows. + + Although it is not possible to fully enumerate the look of + graphical elements and the feel of widgets in a GUI, TQStyle + provides a considerable amount of control and customisability. + + In TQt 1.x the look and feel option for widgets was specified by a + single value: the GUIStyle. Starting with TQt 2.0, this notion was + expanded to allow the look to be specified by virtual drawing + functions. + + Derived classes may reimplement some or all of the drawing + functions to modify the look of all widgets that use those + functions. + + Languages written from right to left (such as Arabic and Hebrew) + usually also mirror the whole layout of widgets. If you design a + style, you should take special care when drawing asymmetric + elements to make sure that they also look correct in a mirrored + layout. You can start your application with \c -reverse to check + the mirrored layout. Also notice, that for a reversed layout, the + light usually comes from top right instead of top left. + + The actual reverse layout is performed automatically when + possible. However, for the sake of flexibility, the translation + cannot be performed everywhere. The documentation for each + function in the TQStyle API states whether the function + expects/returns logical or screen coordinates. Using logical + coordinates (in ComplexControls, for example) provides great + flexibility in controlling the look of a widget. Use visualRect() + when necessary to translate logical coordinates into screen + coordinates for drawing. + + In TQt versions prior to 3.0, if you wanted a low level route into + changing the appearance of a widget, you would reimplement + polish(). With the new 3.0 style engine the recommended approach + is to reimplement the draw functions, for example drawItem(), + drawPrimitive(), drawControl(), drawControlMask(), + drawComplexControl() and drawComplexControlMask(). Each of these + functions is called with a range of parameters that provide + information that you can use to determine how to draw them, e.g. + style flags, rectangle, color group, etc. + + For information on changing elements of an existing style or + creating your own style see the \link customstyles.html Style + overview\endlink. + + Styles can also be created as \link plugins-howto.html + plugins\endlink. +*/ + +/*! + \enum TQt::GUIStyle + + \obsolete + + \value WindowsStyle + \value MotifStyle + \value MacStyle + \value Win3Style + \value PMStyle +*/ + +/*! + \enum TQt::UIEffect + + \value UI_General + \value UI_AnimateMenu + \value UI_FadeMenu + \value UI_AnimateCombo + \value UI_AnimateTooltip + \value UI_FadeTooltip + \value UI_AnimateToolBox Reserved +*/ + +/*! + Constructs a TQStyle. +*/ +TQStyle::TQStyle() +{ + m_eventHandlerInstallationHook = NULL; + m_eventHandlerRemovalHook = NULL; + m_widgetActionRequestHook = NULL; + m_applicationActionRequestHook = NULL; + conditionalAcceleratorsEnabled = false; + d = new TQStylePrivate; +} + +/*! + Destroys the style and frees all allocated resources. +*/ +TQStyle::~TQStyle() +{ + delete d; + d = 0; +} + +/* + \fn GUIStyle TQStyle::guiStyle() const + \obsolete + + Returns an indicator to the additional "feel" component of a + style. Current supported values are TQt::WindowsStyle and TQt::MotifStyle. +*/ + +/*! + Initializes the appearance of a widget. + + This function is called for every widget at some point after it + has been fully created but just \e before it is shown the very + first time. + + Reasonable actions in this function might be to call + TQWidget::setBackgroundMode() for the widget. An example of highly + unreasonable use would be setting the geometry! Reimplementing + this function gives you a back-door through which you can change + the appearance of a widget. With TQt 3.0's style engine you will + rarely need to write your own polish(); instead reimplement + drawItem(), drawPrimitive(), etc. + + The TQWidget::inherits() function may provide enough information to + allow class-specific customizations. But be careful not to + hard-code things too much because new TQStyle subclasses are + expected to work reasonably with all current and \e future + widgets. + + \sa unPolish() +*/ +void TQStyle::polish( TQWidget *widget ) { + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + polish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); +} + +/*! + Undoes the initialization of a widget's appearance. + + This function is the counterpart to polish. It is called for every + polished widget when the style is dynamically changed. The former + style has to unpolish its settings before the new style can polish + them again. + + \sa polish() +*/ +void TQStyle::unPolish( TQWidget *widget ) { + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + unPolish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); +} + +/*! + Initializes the appearance of a widget. + + This function is called for every widget at some point after it + has been fully created but just \e before it is shown the very + first time. + + Reasonable actions in this function might be to install a widget + event handler for the style. An example of highly unreasonable + use would be setting the geometry! With TQt 3.0's style engine + you will rarely need to write your own polish(); instead reimplement + drawItem(), drawPrimitive(), etc. + + The \a objectTypes object may provide enough information to + allow class-specific customizations. But be careful not to + hard-code things too much because new TQStyle subclasses are + expected to work reasonably with all current and \e future + widgets. + + You may specify either a TQWidget pointer or a custom pointer. + If a custom pointer is specified, you must be careful to intercept any event + handler installation/removal calls via setEventHandlerInstallationHook and + setEventHandlerRemovalHook. + + \sa unPolish() +*/ +void TQStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { + // Enable dynamic hide/show of accelerator shortcuts + TQWidget* widget = reinterpret_cast(ptr); + widget->installEventFilter(this); + } +} + +/*! + Undoes the initialization of a widget's appearance. + + This function is the counterpart to polish. It is called for every + polished widget when the style is dynamically changed. The former + style has to unpolish its settings before the new style can polish + them again. + + \sa polish() +*/ +void TQStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { + // Disable dynamic hide/show of accelerator shortcuts + TQWidget* widget = reinterpret_cast(ptr); + widget->installEventFilter(this); + } +} + +/*! + \overload + Late initialization of the TQApplication object. + + \sa unPolish() +*/ +void TQStyle::polish( TQApplication *app ) { + const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); + applicationPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); +} + +/*! + \overload + + Undoes the application polish. + + \sa polish() +*/ +void TQStyle::unPolish( TQApplication *app ) { + const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); + applicationUnPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); +} + +/*! + \overload + Late initialization of the TQApplication object or other global application object. + + You may specify either a TQApplication pointer or a custom pointer. + If a custom pointer is specified, you must be careful to intercept any event + handler installation/removal calls via setEventHandlerInstallationHook and + setEventHandlerRemovalHook. + + \sa unPolish() +*/ +void TQStyle::applicationPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { + // +} + +/*! + \overload + + Undoes the application polish. + + You may specify either a TQApplication pointer or a custom pointer. + If a custom pointer is specified, you must be careful to intercept any event + handler installation/removal calls via setEventHandlerInstallationHook and + setEventHandlerRemovalHook. + + \sa polish() +*/ +void TQStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { + // +} + +/*! + \overload + + The style may have certain requirements for color palettes. In + this function it has the chance to change the palette according to + these requirements. + + \sa TQPalette, TQApplication::setPalette() +*/ +void TQStyle::polish( TQPalette&) +{ +} + +/*! + Polishes the popup menu according to the GUI style. This usually + means setting the mouse tracking + (\l{TQPopupMenu::setMouseTracking()}) and whether the menu is + checkable by default (\l{TQPopupMenu::setCheckable()}). +*/ +void TQStyle::polishPopupMenu( TQPopupMenu *pm ) { + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(pm, TQStyleOption()); + polish(ceData, getControlElementFlagsForObject(pm, TQStyleOption()), pm); +} + +/*! + Polishes the popup menu according to the GUI style. This usually + means setting the mouse tracking + (\l{TQPopupMenu::setMouseTracking()}) and whether the menu is + checkable by default (\l{TQPopupMenu::setCheckable()}). +*/ +void TQStyle::polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * ) +{ +} + +/*! + Returns the appropriate area (see below) within rectangle \a r in + which to draw the \a text or \a pixmap using painter \a p. If \a + len is -1 (the default) all the \a text is drawn; otherwise only + the first \a len characters of \a text are drawn. The text is + aligned in accordance with the alignment \a flags (see + \l{TQt::AlignmentFlags}). The \a enabled bool indicates whether or + not the item is enabled. + + If \a r is larger than the area needed to render the \a text the + rectangle that is returned will be offset within \a r in + accordance with the alignment \a flags. For example if \a flags is + \c AlignCenter the returned rectangle will be centered within \a + r. If \a r is smaller than the area needed the rectangle that is + returned will be \e larger than \a r (the smallest rectangle large + enough to render the \a text or \a pixmap). + + By default, if both the text and the pixmap are not null, the + pixmap is drawn and the text is ignored. +*/ +TQRect TQStyle::itemRect( TQPainter *p, const TQRect &r, + int flags, bool enabled, const TQPixmap *pixmap, + const TQString& text, int len ) const +{ + TQRect result; + int x = r.x(); + int y = r.y(); + int w = r.width(); + int h = r.height(); + GUIStyle gs = (GUIStyle)styleHint( SH_GUIStyle ); + + if ( pixmap ) { + if ( (flags & TQt::AlignVCenter) == TQt::AlignVCenter ) + y += h/2 - pixmap->height()/2; + else if ( (flags & TQt::AlignBottom) == TQt::AlignBottom) + y += h - pixmap->height(); + if ( (flags & TQt::AlignRight) == TQt::AlignRight ) + x += w - pixmap->width(); + else if ( (flags & TQt::AlignHCenter) == TQt::AlignHCenter ) + x += w/2 - pixmap->width()/2; + else if ( (flags & TQt::AlignLeft) != TQt::AlignLeft && TQApplication::reverseLayout() ) + x += w - pixmap->width(); + result = TQRect(x, y, pixmap->width(), pixmap->height()); + } else if ( !text.isNull() && p ) { + result = p->boundingRect( x, y, w, h, flags, text, len ); + if ( gs == TQt::WindowsStyle && !enabled ) { + result.setWidth(result.width()+1); + result.setHeight(result.height()+1); + } + } else { + result = TQRect(x, y, w, h); + } + + return result; +} + + +/*! + Draws the \a text or \a pixmap in rectangle \a r using painter \a + p and color group \a g. The pen color is specified with \a + penColor. The \a enabled bool indicates whether or not the item is + enabled; when reimplementing this bool should influence how the + item is drawn. If \a len is -1 (the default) all the \a text is + drawn; otherwise only the first \a len characters of \a text are + drawn. The text is aligned and wrapped according to the alignment + \a flags (see \l{TQt::AlignmentFlags}). + + By default, if both the text and the pixmap are not null, the + pixmap is drawn and the text is ignored. +*/ +void TQStyle::drawItem( TQPainter *p, const TQRect &r, + int flags, const TQColorGroup &g, bool enabled, + const TQPixmap *pixmap, const TQString& text, int len, + const TQColor* penColor ) const +{ + int x = r.x(); + int y = r.y(); + int w = r.width(); + int h = r.height(); + GUIStyle gs = (GUIStyle)styleHint( SH_GUIStyle ); + + p->setPen( penColor?*penColor:g.foreground() ); + if ( pixmap ) { + TQPixmap pm( *pixmap ); + bool clip = (flags & TQt::DontClip) == 0; + if ( clip ) { + if ( pm.width() < w && pm.height() < h ) { + clip = FALSE; + } else { + p->save(); + TQRegion cr = TQRect(x, y, w, h); + if (p->hasClipping()) + cr &= p->clipRegion(TQPainter::CoordPainter); + p->setClipRegion(cr); + } + } + if ( (flags & TQt::AlignVCenter) == TQt::AlignVCenter ) + y += h/2 - pm.height()/2; + else if ( (flags & TQt::AlignBottom) == TQt::AlignBottom) + y += h - pm.height(); + if ( (flags & TQt::AlignRight) == TQt::AlignRight ) + x += w - pm.width(); + else if ( (flags & TQt::AlignHCenter) == TQt::AlignHCenter ) + x += w/2 - pm.width()/2; + else if ( ((flags & TQt::AlignLeft) != TQt::AlignLeft) && TQApplication::reverseLayout() ) // AlignAuto && rightToLeft + x += w - pm.width(); + + if ( !enabled ) { + if ( pm.mask() ) { // pixmap with a mask + if ( !pm.selfMask() ) { // mask is not pixmap itself + TQPixmap pmm( *pm.mask() ); + pmm.setMask( *((TQBitmap *)&pmm) ); + pm = pmm; + } + } else if ( pm.depth() == 1 ) { // monochrome pixmap, no mask + pm.setMask( *((TQBitmap *)&pm) ); +#ifndef TQT_NO_IMAGE_HEURISTIC_MASK + } else { // color pixmap, no mask + TQString k; + k.sprintf( "$qt-drawitem-%x", pm.serialNumber() ); + TQPixmap *mask = TQPixmapCache::find(k); + bool del=FALSE; + if ( !mask ) { + mask = new TQPixmap( pm.createHeuristicMask() ); + mask->setMask( *((TQBitmap*)mask) ); + del = !TQPixmapCache::insert( k, mask ); + } + pm = *mask; + if (del) delete mask; +#endif + } + if ( gs == TQt::WindowsStyle ) { + p->setPen( g.light() ); + p->drawPixmap( x+1, y+1, pm ); + p->setPen( g.text() ); + } + } + p->drawPixmap( x, y, pm ); + if ( clip ) + p->restore(); + } else if ( !text.isNull() ) { + if ( gs == TQt::WindowsStyle && !enabled ) { + p->setPen( g.light() ); + p->drawText( x+1, y+1, w, h, flags, text, len ); + p->setPen( g.text() ); + } + p->drawText( x, y, w, h, flags, text, len ); + } +} + +/*! + \enum TQStyle::PrimitiveElement + + This enum represents the PrimitiveElements of a style. A + PrimitiveElement is a common GUI element, such as a checkbox + indicator or pushbutton bevel. + + \value PE_ButtonCommand button used to initiate an action, for + example, a TQPushButton. + \value PE_ButtonDefault this button is the default button, e.g. + in a dialog. + \value PE_ButtonBevel generic button bevel. + \value PE_ButtonTool tool button, for example, a TQToolButton. + \value PE_ButtonDropDown drop down button, for example, a tool + button that displays a popup menu, for example, TQPopupMenu. + + + \value PE_FocusRect generic focus indicator. + + + \value PE_ArrowUp up arrow. + \value PE_ArrowDown down arrow. + \value PE_ArrowRight right arrow. + \value PE_ArrowLeft left arrow. + + + \value PE_SpinWidgetUp up symbol for a spin widget, for example a + TQSpinBox. + \value PE_SpinWidgetDown down symbol for a spin widget. + \value PE_SpinWidgetPlus increase symbol for a spin widget. + \value PE_SpinWidgetMinus decrease symbol for a spin widget. + + + \value PE_Indicator on/off indicator, for example, a TQCheckBox. + \value PE_IndicatorMask bitmap mask for an indicator. + \value PE_ExclusiveIndicator exclusive on/off indicator, for + example, a TQRadioButton. + \value PE_ExclusiveIndicatorMask bitmap mask for an exclusive indicator. + + + \value PE_DockWindowHandle tear off handle for dock windows and + toolbars, for example \l{TQDockWindow}s and \l{TQToolBar}s. + \value PE_DockWindowSeparator item separator for dock window and + toolbar contents. + \value PE_DockWindowResizeHandle resize handle for dock windows. + + \value PE_Splitter splitter handle; see also TQSplitter. + + + \value PE_Panel generic panel frame; see also TQFrame. + \value PE_PanelPopup panel frame for popup windows/menus; see also + TQPopupMenu. + \value PE_PanelMenuBar panel frame for menu bars. + \value PE_PanelDockWindow panel frame for dock windows and toolbars. + \value PE_PanelTabWidget panel frame for tab widgets. + \value PE_PanelLineEdit panel frame for line edits. + \value PE_PanelGroupBox panel frame for group boxes. + + \value PE_TabBarBase area below tabs in a tab widget, for example, + TQTab. + + + \value PE_HeaderSection section of a list or table header; see also + TQHeader. + \value PE_HeaderArrow arrow used to indicate sorting on a list or table + header + \value PE_StatusBarSection section of a status bar; see also + TQStatusBar. + + + \value PE_GroupBoxFrame frame around a group box; see also + TQGroupBox. + \value PE_WindowFrame frame around a MDI window or a docking window + + + \value PE_Separator generic separator. + + + \value PE_SizeGrip window resize handle; see also TQSizeGrip. + + + \value PE_CheckMark generic check mark; see also TQCheckBox. + + + \value PE_ScrollBarAddLine scrollbar line increase indicator + (i.e. scroll down); see also TQScrollBar. + \value PE_ScrollBarSubLine scrollbar line decrease indicator (i.e. scroll up). + \value PE_ScrollBarAddPage scolllbar page increase indicator (i.e. page down). + \value PE_ScrollBarSubPage scrollbar page decrease indicator (i.e. page up). + \value PE_ScrollBarSlider scrollbar slider + \value PE_ScrollBarFirst scrollbar first line indicator (i.e. home). + \value PE_ScrollBarLast scrollbar last line indicator (i.e. end). + + + \value PE_ProgressBarChunk section of a progress bar indicator; see + also TQProgressBar. + + \value PE_CheckListController controller part of a listview item + \value PE_CheckListIndicator checkbox part of a listview item + \value PE_CheckListExclusiveIndicator radiobutton part of a listview item + \value PE_RubberBand rubber band used in such things as iconview + + \value PE_CustomBase base value for custom PrimitiveElements. + All values above this are reserved for custom use. Custom + values must be greater than this value. + + \sa drawPrimitive() +*/ +/*! \enum TQStyle::SFlags + \internal +*/ +/*! \enum TQStyle::SCFlags + \internal +*/ + +/*! + \enum TQStyle::StyleFlags + + This enum represents flags for drawing PrimitiveElements. Not all + primitives use all of these flags. Note that these flags may mean + different things to different primitives. For an explanation of + the relationship between primitives and their flags, as well as + the different meanings of the flags, see the \link + customstyles.html Style overview\endlink. + + \value Style_Default + \value Style_Enabled + \value Style_Raised + \value Style_Sunken + \value Style_Off + \value Style_NoChange + \value Style_On + \value Style_Down + \value Style_Horizontal + \value Style_HasFocus + \value Style_Top + \value Style_Bottom + \value Style_FocusAtBorder + \value Style_AutoRaise + \value Style_MouseOver + \value Style_Up + \value Style_Selected + \value Style_HasFocus + \value Style_Active + \value Style_ButtonDefault + + \sa drawPrimitive() +*/ + +/*! + \fn void TQStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption& opt) const + + Draws the style PrimitiveElement \a pe using the painter \a p in + the area \a r. Colors are used from the color group \a cg. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The rect \a r should be in screen coordinates. + + The \a flags argument is used to control how the PrimitiveElement + is drawn. Multiple flags can be OR'ed together. + + For example, a pressed button would be drawn with the flags \c + Style_Enabled and \c Style_Down. + + The \a opt argument can be used to control how various + PrimitiveElements are drawn. Note that \a opt may be the default + value even for PrimitiveElements that make use of extra options. + When \a opt is non-default, it is used as follows: + + \table + \header \i PrimitiveElement \i Options \i Notes + \row \i \l PE_FocusRect + \i \l TQStyleOption ( const \l TQColor & bg ) + \list + \i opt.\link TQStyleOption::color() color\endlink() + \endlist + \i \e bg is the background color on which the focus rect is being drawn. + \row \i12 \l PE_Panel + \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) + \list + \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() + \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() + \endlist + \i \e linewidth is the line width for drawing the panel. + \row \i \e midlinewidth is the mid-line width for drawing the panel. + \row \i12 \l PE_PanelPopup + \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) + \list + \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() + \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() + \endlist + \i \e linewidth is the line width for drawing the panel. + \row \i \e midlinewidth is the mid-line width for drawing the panel. + \row \i12 \l PE_PanelMenuBar + \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) + \list + \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() + \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() + \endlist + \i \e linewidth is the line width for drawing the panel. + \row \i \e midlinewidth is the mid-line width for drawing the panel. + \row \i12 \l PE_PanelDockWindow + \i12 \l TQStyleOption ( int linewidth, int midlinewidth ) + \list + \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() + \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() + \endlist + \i \e linewidth is the line width for drawing the panel. + \row \i \e midlinewidth is the mid-line width for drawing the panel. + \row \i14 \l PE_GroupBoxFrame + \i14 \l TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) + \list + \i opt.\link TQStyleOption::lineWidth() lineWidth\endlink() + \i opt.\link TQStyleOption::midLineWidth() midLineWidth\endlink() + \i opt.\link TQStyleOption::frameShape() frameShape\endlink() + \i opt.\link TQStyleOption::frameShadow() frameShadow\endlink() + \endlist + \i \e linewidth is the line width for the group box. + \row \i \e midlinewidth is the mid-line width for the group box. + \row \i \e shape is the \link TQFrame::frameShape frame shape \endlink + for the group box. + \row \i \e shadow is the \link TQFrame::frameShadow frame shadow \endlink + for the group box. + \endtable + + + For all other \link TQStyle::PrimitiveElement + PrimitiveElements\endlink, \a opt is unused. + + \sa StyleFlags +*/ + +/*! + \enum TQStyle::ControlElement + + This enum represents a ControlElement. A ControlElement is part of + a widget that performs some action or displays information to the + user. + + \value CE_PushButton the bevel and default indicator of a TQPushButton. + \value CE_PushButtonLabel the label (iconset with text or pixmap) + of a TQPushButton. + + \value CE_CheckBox the indicator of a TQCheckBox. + \value CE_CheckBoxLabel the label (text or pixmap) of a TQCheckBox. + + \value CE_RadioButton the indicator of a TQRadioButton. + \value CE_RadioButtonLabel the label (text or pixmap) of a TQRadioButton. + + \value CE_TabBarTab the tab within a TQTabBar (a TQTab). + \value CE_TabBarLabel the label within a TQTab. + + \value CE_ProgressBarGroove the groove where the progress + indicator is drawn in a TQProgressBar. + \value CE_ProgressBarContents the progress indicator of a TQProgressBar. + \value CE_ProgressBarLabel the text label of a TQProgressBar. + + \value CE_PopupMenuItem a menu item in a TQPopupMenu. + \value CE_PopupMenuScroller scrolling areas in a popumenu when the + style supports scrolling. + \value CE_PopupMenuHorizontalExtra extra frame area set aside with PM_PopupMenuFrameHorizontalExtra + \value CE_PopupMenuVerticalExtra extra frame area set aside with PM_PopupMenuFrameVerticalExtra + + \value CE_MenuBarItem a menu item in a TQMenuBar. + + \value CE_ToolButtonLabel a tool button's label. + + \value CE_MenuBarEmptyArea the empty area of a TQMenuBar. + \value CE_DockWindowEmptyArea the empty area of a TQDockWindow. + + \value CE_ToolBoxTab the toolbox's tab area + \value CE_HeaderLabel the header's label + + \value CE_CustomBase base value for custom ControlElements. All values above + this are reserved for custom use. Therefore, custom values must be + greater than this value. + + \sa drawControl() +*/ + +/*! + \fn void TQStyle::drawControl( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, const TQStyleOption& opt, const TQWidget *widget) const + + Draws the ControlElement \a element using the painter \a p in the + area \a r. Colors are used from the color group \a cg. + + The rect \a r should be in screen coordinates. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a how argument is used to control how the ControlElement is + drawn. Multiple flags can be OR'ed together. See the table below + for an explanation of which flags are used with the various + ControlElements. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. Note that usage of the widget argument is deprecated + in favor of specifying widget parameters via \a ceData and \a elementFlags. + The widget can be cast to the appropriate type based + on the value of \a element. The \a opt argument can be used to + pass extra information required when drawing the ControlElement. + Note that \a opt may be the default value even for ControlElements + that can make use of the extra options. See the table below for + the appropriate \a widget and \a opt usage: + + \table + \header \i ControlElement
        \& Widget Cast + \i Style Flags + \i Notes + \i Options + \i Notes + + \row \i16 \l{CE_PushButton}(const \l TQPushButton *) + + and + + \l{CE_PushButtonLabel}(const \l TQPushButton *) + \i \l Style_Enabled \i Set if the button is enabled. + \i16 Unused. + \i16   + \row \i \l Style_HasFocus \i Set if the button has input focus. + \row \i \l Style_Raised \i Set if the button is not down, not on and not flat. + \row \i \l Style_On \i Set if the button is a toggle button and toggled on. + \row \i \l Style_Down \i Set if the button is down (i.e., the mouse button or + space bar is pressed on the button). + \row \i \l Style_ButtonDefault \i Set if the button is a default button. + + \row \i16 \l{CE_CheckBox}(const \l TQCheckBox *) + + and + + \l{CE_CheckBoxLabel}(const \l TQCheckBox *) + + \i \l Style_Enabled \i Set if the checkbox is enabled. + \i16 Unused. + \i16   + \row \i \l Style_HasFocus \i Set if the checkbox has input focus. + \row \i \l Style_On \i Set if the checkbox is checked. + \row \i \l Style_Off \i Set if the checkbox is not checked. + \row \i \l Style_NoChange \i Set if the checkbox is in the NoChange state. + \row \i \l Style_Down \i Set if the checkbox is down (i.e., the mouse button or + space bar is pressed on the button). + + \row \i15 \l{CE_RadioButton}(const TQRadioButton *) + + and + + \l{CE_RadioButtonLabel}(const TQRadioButton *) + \i \l Style_Enabled \i Set if the radiobutton is enabled. + \i15 Unused. + \i15   + \row \i \l Style_HasFocus \i Set if the radiobutton has input focus. + \row \i \l Style_On \i Set if the radiobutton is checked. + \row \i \l Style_Off \i Set if the radiobutton is not checked. + \row \i \l Style_Down \i Set if the radiobutton is down (i.e., the mouse + button or space bar is pressed on the radiobutton). + + \row \i12 \l{CE_TabBarTab}(const \l TQTabBar *) + + and + + \l{CE_TabBarLabel}(const \l TQTabBar *) + + \i \l Style_Enabled \i Set if the tabbar and tab is enabled. + \i12 \l TQStyleOption ( \l TQTab *t ) + \list + \i opt.\link TQStyleOption::tab() tab\endlink() + \endlist + \i12 \e t is the TQTab being drawn. + \row \i \l Style_Selected \i Set if the tab is the current tab. + + \row \i12 \l{CE_ProgressBarGroove}(const TQProgressBar *) + + and + + \l{CE_ProgressBarContents}(const TQProgressBar *) + + and + + \l{CE_ProgressBarLabel}(const TQProgressBar *) + + \i \l Style_Enabled \i Set if the progressbar is enabled. + \i12 Unused. + \i12   + \row \i \l Style_HasFocus \i Set if the progressbar has input focus. + + \row \i13 \l{CE_PopupMenuItem}(const \l TQPopupMenu *) + \i \l Style_Enabled \i Set if the menuitem is enabled. + \i13 \l TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) + \list + \i opt.\link TQStyleOption::menuItem() menuItem\endlink() + \i opt.\link TQStyleOption::tabWidth() tabWidth\endlink() + \i opt.\link TQStyleOption::maxIconWidth() maxIconWidth\endlink() + \endlist + \i \e mi is the menu item being drawn. TQMenuItem is currently an + internal class. + \row \i \l Style_Active \i Set if the menuitem is the current item. + \i \e tabwidth is the width of the tab column where key accelerators + are drawn. + \row \i \l Style_Down \i Set if the menuitem is down (i.e., the mouse button + or space bar is pressed). + \i \e maxpmwidth is the maximum width of the check column where + checkmarks and iconsets are drawn. + + \row \i14 \l{CE_MenuBarItem}(const \l TQMenuBar *) + \i \l Style_Enabled \i Set if the menuitem is enabled + \i14 \l TQStyleOption ( TQMenuItem *mi ) + \list + \i opt.\link TQStyleOption::menuItem() menuItem\endlink() + \endlist + \i14 \e mi is the menu item being drawn. + \row \i \l Style_Active \i Set if the menuitem is the current item. + \row \i \l Style_Down \i Set if the menuitem is down (i.e., a mouse button or + the space bar is pressed). + \row \i \l Style_HasFocus \i Set if the menubar has input focus. + + \row \i17 \l{CE_ToolButtonLabel}(const \l TQToolButton *) + \i \l Style_Enabled \i Set if the toolbutton is enabled. + \i17 \l TQStyleOption ( \l ArrowType t ) + \list + \i opt.\link TQStyleOption::arrowType() arrowType\endlink() + \endlist + \i17 When the tool button only contains an arrow, \e t is the + arrow's type. + \row \i \l Style_HasFocus \i Set if the toolbutton has input focus. + \row \i \l Style_Down \i Set if the toolbutton is down (i.e., a + mouse button or the space is pressed). + \row \i \l Style_On \i Set if the toolbutton is a toggle button + and is toggled on. + \row \i \l Style_AutoRaise \i Set if the toolbutton has auto-raise enabled. + \row \i \l Style_MouseOver \i Set if the mouse pointer is over the toolbutton. + \row \i \l Style_Raised \i Set if the button is not down, not on and doesn't + contain the mouse when auto-raise is enabled. + \endtable + + \sa ControlElement, StyleFlags +*/ + +/*! + \fn void TQStyle::drawControlMask( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const + + Draw a bitmask for the ControlElement \a element using the painter + \a p in the area \a r. See drawControl() for an explanation of the + use of the \a widget and \a opt arguments. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The rect \a r should be in screen coordinates. + + \a widget is deprecated and should not be used. + + \sa drawControl(), ControlElement +*/ + +/*! + \enum TQStyle::SubRect + + This enum represents a sub-area of a widget. Style implementations + would use these areas to draw the different parts of a widget. + + \value SR_PushButtonContents area containing the label (iconset + with text or pixmap). + \value SR_PushButtonFocusRect area for the focus rect (usually + larger than the contents rect). + + \value SR_CheckBoxIndicator area for the state indicator (e.g. check mark). + \value SR_CheckBoxContents area for the label (text or pixmap). + \value SR_CheckBoxFocusRect area for the focus indicator. + + + \value SR_RadioButtonIndicator area for the state indicator. + \value SR_RadioButtonContents area for the label. + \value SR_RadioButtonFocusRect area for the focus indicator. + + + \value SR_ComboBoxFocusRect area for the focus indicator. + + + \value SR_SliderFocusRect area for the focus indicator. + + + \value SR_DockWindowHandleRect area for the tear-off handle. + + + \value SR_ProgressBarGroove area for the groove. + \value SR_ProgressBarContents area for the progress indicator. + \value SR_ProgressBarLabel area for the text label. + + + \value SR_ToolButtonContents area for the tool button's label. + + \value SR_DialogButtonAccept area for a dialog's accept button. + \value SR_DialogButtonReject area for a dialog's reject button. + \value SR_DialogButtonApply area for a dialog's apply button. + \value SR_DialogButtonHelp area for a dialog's help button. + \value SR_DialogButtonAll area for a dialog's all button. + \value SR_DialogButtonRetry area for a dialog's retry button. + \value SR_DialogButtonAbort area for a dialog's abort button. + \value SR_DialogButtonIgnore area for a dialog's ignore button. + \value SR_DialogButtonCustom area for a dialog's custom widget area (in button row). + + \value SR_ToolBoxTabContents area for a toolbox tab's icon and label + + \value SR_CustomBase base value for custom ControlElements. All values above + this are reserved for custom use. Therefore, custom values must be + greater than this value. + + \sa subRect() +*/ + +/*! + \fn TQRect TQStyle::subRect( SubRect subrect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const; + + Returns the sub-area \a subrect for the \a widget in logical + coordinates. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. Note that usage of \a widget is deprecated in favor + of \a ceData and \a elementFlags. The widget can be cast to the + appropriate type based on the value of \a subrect. See the table + below for the appropriate \a widget casts: + + \table + \header \i SubRect \i Widget Cast + \row \i \l SR_PushButtonContents \i (const \l TQPushButton *) + \row \i \l SR_PushButtonFocusRect \i (const \l TQPushButton *) + \row \i \l SR_CheckBoxIndicator \i (const \l TQCheckBox *) + \row \i \l SR_CheckBoxContents \i (const \l TQCheckBox *) + \row \i \l SR_CheckBoxFocusRect \i (const \l TQCheckBox *) + \row \i \l SR_RadioButtonIndicator \i (const \l TQRadioButton *) + \row \i \l SR_RadioButtonContents \i (const \l TQRadioButton *) + \row \i \l SR_RadioButtonFocusRect \i (const \l TQRadioButton *) + \row \i \l SR_ComboBoxFocusRect \i (const \l TQComboBox *) + \row \i \l SR_DockWindowHandleRect \i (const \l TQWidget *) + \row \i \l SR_ProgressBarGroove \i (const \l TQProgressBar *) + \row \i \l SR_ProgressBarContents \i (const \l TQProgressBar *) + \row \i \l SR_ProgressBarLabel \i (const \l TQProgressBar *) + \endtable + + The tear-off handle (SR_DockWindowHandleRect) for TQDockWindow + is a private class. Use TQWidget::parentWidget() to access the + TQDockWindow: + + \code + if ( !widget->parentWidget() ) + return; + const TQDockWindow *dw = (const TQDockWindow *) widget->parentWidget(); + \endcode + + \sa SubRect +*/ + +/*! + \enum TQStyle::ComplexControl + + This enum represents a ComplexControl. ComplexControls have + different behaviour depending upon where the user clicks on them + or which keys are pressed. + + \value CC_SpinWidget + \value CC_ComboBox + \value CC_ScrollBar + \value CC_Slider + \value CC_ToolButton + \value CC_TitleBar + \value CC_ListView + + + \value CC_CustomBase base value for custom ControlElements. All + values above this are reserved for custom use. Therefore, + custom values must be greater than this value. + + \sa SubControl drawComplexControl() +*/ + +/*! + \enum TQStyle::SubControl + + This enum represents a SubControl within a ComplexControl. + + \value SC_None special value that matches no other SubControl. + + + \value SC_ScrollBarAddLine scrollbar add line (i.e. down/right + arrow); see also TQScrollbar. + \value SC_ScrollBarSubLine scrollbar sub line (i.e. up/left arrow). + \value SC_ScrollBarAddPage scrollbar add page (i.e. page down). + \value SC_ScrollBarSubPage scrollbar sub page (i.e. page up). + \value SC_ScrollBarFirst scrollbar first line (i.e. home). + \value SC_ScrollBarLast scrollbar last line (i.e. end). + \value SC_ScrollBarSlider scrollbar slider handle. + \value SC_ScrollBarGroove special subcontrol which contains the + area in which the slider handle may move. + + + \value SC_SpinWidgetUp spinwidget up/increase; see also TQSpinBox. + \value SC_SpinWidgetDown spinwidget down/decrease. + \value SC_SpinWidgetFrame spinwidget frame. + \value SC_SpinWidgetEditField spinwidget edit field. + \value SC_SpinWidgetButtonField spinwidget button field. + + + \value SC_ComboBoxEditField combobox edit field; see also TQComboBox. + \value SC_ComboBoxArrow combobox arrow + \value SC_ComboBoxFrame combobox frame + \value SC_ComboBoxListBoxPopup combobox list box + + \value SC_SliderGroove special subcontrol which contains the area + in which the slider handle may move. + \value SC_SliderHandle slider handle. + \value SC_SliderTickmarks slider tickmarks. + + + \value SC_ToolButton tool button; see also TQToolbutton. + \value SC_ToolButtonMenu subcontrol for opening a popup menu in a + tool button; see also TQPopupMenu. + + + \value SC_TitleBarSysMenu system menu button (i.e. restore, close, etc.). + \value SC_TitleBarMinButton minimize button. + \value SC_TitleBarMaxButton maximize button. + \value SC_TitleBarCloseButton close button. + \value SC_TitleBarLabel window title label. + \value SC_TitleBarNormalButton normal (restore) button. + \value SC_TitleBarShadeButton shade button. + \value SC_TitleBarUnshadeButton unshade button. + + + \value SC_ListView the list view area. + \value SC_ListViewBranch (internal) + \value SC_ListViewExpand expand item (i.e. show/hide child items). + + + \value SC_All special value that matches all SubControls. + + + \sa ComplexControl +*/ + +/*! + \fn void TQStyle::drawComplexControl( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, SCFlags sub, SCFlags subActive, const TQStyleOption& opt, const TQWidget *widget ) const + + Draws the ComplexControl \a control using the painter \a p in the + area \a r. Colors are used from the color group \a cg. The \a sub + argument specifies which SubControls to draw. Multiple SubControls + can be OR'ed together. The \a subActive argument specifies which + SubControl is active. + + The rect \a r should be in logical coordinates. Reimplementations + of this function should use visualRect() to change the logical + coordinates into screen coordinates when using drawPrimitive() and + drawControl(). + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a how argument is used to control how the ComplexControl is + drawn. Multiple flags can OR'ed together. See the table below for + an explanation of which flags are used with the various + ComplexControls. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a control. Note that usage of \a widget is + deprecated in favor of \a ceData and \a elementFlags. The \a opt + argument can be used to pass extra information required when + drawing the ComplexControl. Note that \a opt may be the default + value even for ComplexControls that can make use of the extra + options. See the table below for the appropriate \a widget and + \a opt usage: + + \table + \header \i ComplexControl
        \& Widget Cast + \i Style Flags + \i Notes + \i Options + \i Notes + + \row \i12 \l{CC_SpinWidget}(const TQSpinWidget *) + \i \l Style_Enabled \i Set if the spinwidget is enabled. + \i12 Unused. + \i12   + \row \i \l Style_HasFocus \i Set if the spinwidget has input focus. + + \row \i12 \l{CC_ComboBox}(const \l TQComboBox *) + \i \l Style_Enabled \i Set if the combobox is enabled. + \i12 Unused. + \i12   + \row \i \l Style_HasFocus \i Set if the combobox has input focus. + + \row \i12 \l{CC_ScrollBar}(const \l TQScrollBar *) + \i \l Style_Enabled \i Set if the scrollbar is enabled. + \i12 Unused. + \i12   + \row \i \l Style_HasFocus \i Set if the scrollbar has input focus. + + \row \i12 \l{CC_Slider}(const \l TQSlider *) + \i \l Style_Enabled \i Set if the slider is enabled. + \i12 Unused. + \i12   + + \row \i \l Style_HasFocus \i Set if the slider has input focus. + + \row \i16 \l{CC_ToolButton}(const \l TQToolButton *) + \i \l Style_Enabled \i Set if the toolbutton is enabled. + \i16 \l TQStyleOption ( \l ArrowType t ) + \list + \i opt.\link TQStyleOption::arrowType() arrowType\endlink() + \endlist + \i16 When the tool button only contains an arrow, \e t is the + arrow's type. + \row \i \l Style_HasFocus \i Set if the toolbutton has input focus. + \row \i \l Style_Down \i Set if the toolbutton is down (ie. mouse + button or space pressed). + \row \i \l Style_On \i Set if the toolbutton is a toggle button + and is toggled on. + \row \i \l Style_AutoRaise \i Set if the toolbutton has auto-raise enabled. + \row \i \l Style_Raised \i Set if the button is not down, not on and doesn't + contain the mouse when auto-raise is enabled. + + \row \i \l{CC_TitleBar}(const \l TQWidget *) + \i \l Style_Enabled \i Set if the titlebar is enabled. + \i Unused. + \i   + + \row \i \l{CC_ListView}(const \l TQListView *) + \i \l Style_Enabled \i Set if the titlebar is enabled. + \i \l TQStyleOption ( \l TQListViewItem *item ) + \list + \i opt.\link TQStyleOption::listViewItem() listViewItem\endlink() + \endlist + \i \e item is the item that needs branches drawn + \endtable + + \sa ComplexControl, SubControl +*/ + +/*! + \fn void TQStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const + + Draw a bitmask for the ComplexControl \a control using the painter + \a p in the area \a r. See drawComplexControl() for an explanation + of the use of the \a widget and \a opt arguments. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The rect \a r should be in logical coordinates. Reimplementations + of this function should use visualRect() to change the logical + corrdinates into screen coordinates when using drawPrimitive() and + drawControl(). + + Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. + + \sa drawComplexControl() ComplexControl +*/ + +/*! + \fn TQRect TQStyle::querySubControlMetrics( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl subcontrol, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + + Returns the rect for the SubControl \a subcontrol for \a widget in + logical coordinates. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a control. The \a opt argument can be used to + pass extra information required when drawing the ComplexControl. + Note that \a opt may be the default value even for ComplexControls + that can make use of the extra options. See drawComplexControl() + for an explanation of the \a widget and \a opt arguments. + + Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. + + \sa drawComplexControl(), ComplexControl, SubControl +*/ + +/*! + \fn SubControl TQStyle::querySubControl( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + + Returns the SubControl for \a widget at the point \a pos. The \a + widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a control. The \a opt argument can be used to + pass extra information required when drawing the ComplexControl. + Note that \a opt may be the default value even for ComplexControls + that can make use of the extra options. See drawComplexControl() + for an explanation of the \a widget and \a opt arguments. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + Note that \a pos is passed in screen coordinates. When using + querySubControlMetrics() to check for hits and misses, use + visualRect() to change the logical coordinates into screen + coordinates. + + Note that usage of \a widget is deprecated in favor of \a ceData and \a elementFlags. + + \sa drawComplexControl(), ComplexControl, SubControl, querySubControlMetrics() +*/ + +/*! + \enum TQStyle::PixelMetric + + This enum represents a PixelMetric. A PixelMetric is a style + dependent size represented as a single pixel value. + + \value PM_ButtonMargin amount of whitespace between pushbutton + labels and the frame. + \value PM_ButtonDefaultIndicator width of the default-button indicator frame. + \value PM_MenuButtonIndicator width of the menu button indicator + proportional to the widget height. + \value PM_ButtonShiftHorizontal horizontal contents shift of a + button when the button is down. + \value PM_ButtonShiftVertical vertical contents shift of a button when the + button is down. + + \value PM_DefaultFrameWidth default frame width, usually 2. + \value PM_SpinBoxFrameWidth frame width of a spin box. + \value PM_MDIFrameWidth frame width of an MDI window. + \value PM_MDIMinimizedWidth width of a minimized MSI window. + + \value PM_MaximumDragDistance Some feels require the scrollbar or + other sliders to jump back to the original position when the + mouse pointer is too far away while dragging. A value of -1 + disables this behavior. + + \value PM_ScrollBarExtent width of a vertical scrollbar and the + height of a horizontal scrollbar. + \value PM_ScrollBarSliderMin the minimum height of a vertical + scrollbar's slider and the minimum width of a horiztonal + scrollbar slider. + + \value PM_SliderThickness total slider thickness. + \value PM_SliderControlThickness thickness of the slider handle. + \value PM_SliderLength length of the slider. + \value PM_SliderTickmarkOffset the offset between the tickmarks + and the slider. + \value PM_SliderSpaceAvailable the available space for the slider to move. + + \value PM_DockWindowSeparatorExtent width of a separator in a + horiztonal dock window and the height of a separator in a + vertical dock window. + \value PM_DockWindowHandleExtent width of the handle in a + horizontal dock window and the height of the handle in a + vertical dock window. + \value PM_DockWindowFrameWidth frame width of a dock window. + + \value PM_MenuBarFrameWidth frame width of a menubar. + + \value PM_MenuBarItemSpacing spacing between menubar items. + \value PM_ToolBarItemSpacing spacing between toolbar items. + + \value PM_TabBarTabOverlap number of pixels the tabs should overlap. + \value PM_TabBarTabHSpace extra space added to the tab width. + \value PM_TabBarTabVSpace extra space added to the tab height. + \value PM_TabBarBaseHeight height of the area between the tab bar + and the tab pages. + \value PM_TabBarBaseOverlap number of pixels the tab bar overlaps + the tab bar base. + \value PM_TabBarScrollButtonWidth + \value PM_TabBarTabShiftHorizontal horizontal pixel shift when a + tab is selected. + \value PM_TabBarTabShiftVertical vertical pixel shift when a + tab is selected. + + \value PM_ProgressBarChunkWidth width of a chunk in a progress bar indicator. + + \value PM_SplitterWidth width of a splitter. + + \value PM_TitleBarHeight height of the title bar. + \value PM_PopupMenuFrameHorizontalExtra additional border, e.g. for panels + \value PM_PopupMenuFrameVerticalExtra additional border, e.g. for panels + + \value PM_IndicatorWidth width of a check box indicator. + \value PM_IndicatorHeight height of a checkbox indicator. + \value PM_ExclusiveIndicatorWidth width of a radio button indicator. + \value PM_ExclusiveIndicatorHeight height of a radio button indicator. + + \value PM_PopupMenuScrollerHeight height of the scroller area in a popupmenu. + \value PM_PopupMenuScrollerHeight height of the scroller area in a popupmenu. + \value PM_CheckListButtonSize area (width/height) of the + checkbox/radiobutton in a TQCheckListItem + \value PM_CheckListControllerSize area (width/height) of the + controller in a TQCheckListItem + + \value PM_DialogButtonsSeparator distance between buttons in a dialog buttons widget. + \value PM_DialogButtonsButtonWidth minimum width of a button in a dialog buttons widget. + \value PM_DialogButtonsButtonHeight minimum height of a button in a dialog buttons widget. + + \value PM_HeaderMarkSize + \value PM_HeaderGripMargin + \value PM_HeaderMargin + + \value PM_CustomBase base value for custom ControlElements. All + values above this are reserved for custom use. Therefore, + custom values must be greater than this value. + + + \sa pixelMetric() +*/ + +/*! + \fn int TQStyle::pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; + + Returns the pixel metric for \a metric. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a metric. Note that \a widget may be zero even + for PixelMetrics that can make use of \a widget. Note also that + usage of \a widget is deprecated in favor of \a ceData and + \a elementFlags. See the table below for the appropriate + \a widget casts: + + \table + \header \i PixelMetric \i Widget Cast + \row \i \l PM_SliderControlThickness \i (const \l TQSlider *) + \row \i \l PM_SliderLength \i (const \l TQSlider *) + \row \i \l PM_SliderTickmarkOffset \i (const \l TQSlider *) + \row \i \l PM_SliderSpaceAvailable \i (const \l TQSlider *) + \row \i \l PM_TabBarTabOverlap \i (const \l TQTabBar *) + \row \i \l PM_TabBarTabHSpace \i (const \l TQTabBar *) + \row \i \l PM_TabBarTabVSpace \i (const \l TQTabBar *) + \row \i \l PM_TabBarBaseHeight \i (const \l TQTabBar *) + \row \i \l PM_TabBarBaseOverlap \i (const \l TQTabBar *) + \endtable +*/ + +/*! + \enum TQStyle::ContentsType + + This enum represents a ContentsType. It is used to calculate sizes + for the contents of various widgets. + + \value CT_PushButton + \value CT_CheckBox + \value CT_RadioButton + \value CT_ToolButton + \value CT_ComboBox + \value CT_Splitter + \value CT_DockWindow + \value CT_ProgressBar + \value CT_PopupMenuItem + \value CT_TabBarTab + \value CT_Slider + \value CT_Header + \value CT_LineEdit + \value CT_MenuBar + \value CT_SpinBox + \value CT_SizeGrip + \value CT_TabWidget + \value CT_DialogButtons + + \value CT_CustomBase base value for custom ControlElements. All + values above this are reserved for custom use. Custom values + must be greater than this value. + + \sa sizeFromContents() +*/ + +/*! + \fn TQSize TQStyle::sizeFromContents( ContentsType contents, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &contentsSize, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + + Returns the size of \a widget based on the contents size \a + contentsSize. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a contents. The \a opt argument can be used to + pass extra information required when calculating the size. Note + that \a opt may be the default value even for ContentsTypes that + can make use of the extra options. Note that usage of \a widget + is deprecated in favor of \a ceData and \a elementFlags. See the + table below for the appropriate \a widget and \a opt usage: + + \table + \header \i ContentsType \i Widget Cast \i Options \i Notes + \row \i \l CT_PushButton \i (const \l TQPushButton *) \i Unused. \i   + \row \i \l CT_CheckBox \i (const \l TQCheckBox *) \i Unused. \i   + \row \i \l CT_RadioButton \i (const \l TQRadioButton *) \i Unused. \i   + \row \i \l CT_ToolButton \i (const \l TQToolButton *) \i Unused. \i   + \row \i \l CT_ComboBox \i (const \l TQComboBox *) \i Unused. \i   + \row \i \l CT_Splitter \i (const \l TQSplitter *) \i Unused. \i   + \row \i \l CT_DockWindow \i (const \l TQDockWindow *) \i Unused. \i   + \row \i \l CT_ProgressBar \i (const \l TQProgressBar *) \i Unused. \i   + \row \i \l CT_PopupMenuItem \i (const TQPopupMenu *) + \i \l TQStyleOption ( TQMenuItem *mi ) + \list + \i opt.\link TQStyleOption::menuItem() menuItem\endlink() + \endlist + \i \e mi is the menu item to use when calculating the size. + TQMenuItem is currently an internal class. + \endtable +*/ + +/*! + \enum TQStyle::StyleHint + + This enum represents a StyleHint. A StyleHint is a general look + and/or feel hint. + + \value SH_EtchDisabledText disabled text is "etched" like Windows. + + \value SH_GUIStyle the GUI style to use. + + \value SH_ScrollBar_BackgroundMode the background mode for a + TQScrollBar. Possible values are any of those in the \link + TQt::BackgroundMode BackgroundMode\endlink enum. + + \value SH_ScrollBar_MiddleClickAbsolutePosition a boolean value. + If TRUE, middle clicking on a scrollbar causes the slider to + jump to that position. If FALSE, the middle clicking is + ignored. + + \value SH_ScrollBar_LeftClickAbsolutePosition a boolean value. + If TRUE, left clicking on a scrollbar causes the slider to + jump to that position. If FALSE, the left clicking will + behave as appropriate for each control. + + \value SH_ScrollBar_ScrollWhenPointerLeavesControl a boolean + value. If TRUE, when clicking a scrollbar SubControl, holding + the mouse button down and moving the pointer outside the + SubControl, the scrollbar continues to scroll. If FALSE, the + scollbar stops scrolling when the pointer leaves the + SubControl. + + \value SH_TabBar_Alignment the alignment for tabs in a + TQTabWidget. Possible values are \c TQt::AlignLeft, \c + TQt::AlignCenter and \c TQt::AlignRight. + + \value SH_Header_ArrowAlignment the placement of the sorting + indicator may appear in list or table headers. Possible values + are \c TQt::Left or \c TQt::Right. + + \value SH_Slider_SnapToValue sliders snap to values while moving, + like Windows + + \value SH_Slider_SloppyKeyEvents key presses handled in a sloppy + manner, i.e. left on a vertical slider subtracts a line. + + \value SH_ProgressDialog_CenterCancelButton center button on + progress dialogs, like Motif, otherwise right aligned. + + \value SH_ProgressDialog_TextLabelAlignment TQt::AlignmentFlags -- + text label alignment in progress dialogs; Center on windows, + Auto|VCenter otherwise. + + \value SH_PrintDialog_RightAlignButtons right align buttons in + the print dialog, like Windows. + + \value SH_MainWindow_SpaceBelowMenuBar 1 or 2 pixel space between + the menubar and the dockarea, like Windows. + + \value SH_FontDialog_SelectAssociatedText select the text in the + line edit, or when selecting an item from the listbox, or when + the line edit receives focus, like Windows. + + \value SH_PopupMenu_AllowActiveAndDisabled allows disabled menu + items to be active. + + \value SH_PopupMenu_SpaceActivatesItem pressing Space activates + the item, like Motif. + + \value SH_PopupMenu_SubMenuPopupDelay the number of milliseconds + to wait before opening a submenu; 256 on windows, 96 on Motif. + + \value SH_PopupMenu_Scrollable whether popupmenu's must support + scrolling. + + \value SH_PopupMenu_SloppySubMenus whether popupmenu's must support + sloppy submenu; as implemented on Mac OS. + + \value SH_ScrollView_FrameOnlyAroundContents whether scrollviews + draw their frame only around contents (like Motif), or around + contents, scrollbars and corner widgets (like Windows). + + \value SH_MenuBar_AltKeyNavigation menubars items are navigable + by pressing Alt, followed by using the arrow keys to select + the desired item. + + \value SH_ComboBox_ListMouseTracking mouse tracking in combobox + dropdown lists. + + \value SH_PopupMenu_MouseTracking mouse tracking in popup menus. + + \value SH_MenuBar_MouseTracking mouse tracking in menubars. + + \value SH_ItemView_ChangeHighlightOnFocus gray out selected items + when losing focus. + + \value SH_Widget_ShareActivation turn on sharing activation with + floating modeless dialogs. + + \value SH_TabBar_SelectMouseType which type of mouse event should + cause a tab to be selected. + + \value SH_ListViewExpand_SelectMouseType which type of mouse event should + cause a listview expansion to be selected. + + \value SH_TabBar_PreferNoArrows whether a tabbar should suggest a size + to prevent scoll arrows. + + \value SH_ComboBox_Popup allows popups as a combobox dropdown + menu. + + \value SH_Workspace_FillSpaceOnMaximize the workspace should + maximize the client area. + + \value SH_TitleBar_NoBorder the titlebar has no border + + \value SH_ScrollBar_StopMouseOverSlider stops autorepeat when + slider reaches mouse + + \value SH_BlinkCursorWhenTextSelected whether cursor should blink + when text is selected + + \value SH_RichText_FullWidthSelection whether richtext selections + should extend the full width of the document. + + \value SH_GroupBox_TextLabelVerticalAlignment how to vertically align a + groupbox's text label. + + \value SH_GroupBox_TextLabelColor how to paint a groupbox's text label. + + \value SH_DialogButtons_DefaultButton which buttons gets the + default status in a dialog's button widget. + + \value SH_CustomBase base value for custom ControlElements. All + values above this are reserved for custom use. Therefore, + custom values must be greater than this value. + + \value SH_ToolButton_Uses3D indicates whether TQToolButtons should + use a 3D frame when the mouse is over them + + \value SH_ToolBox_SelectedPageTitleBold Boldness of the selected + page title in a TQToolBox. + + \value SH_LineEdit_PasswordCharacter The TQChar Unicode character + to be used for passwords. + + \value SH_Table_GridLineColor + + \value SH_UnderlineAccelerator whether accelerators are underlined + + \sa styleHint() +*/ + +/*! + \fn int TQStyle::styleHint( StyleHint stylehint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn *returnData = 0, const TQWidget *widget = 0 ) const; + + Returns the style hint \a stylehint for \a widget. Currently, \a + widget, \a opt, and \a returnData are unused; they're included to + allow for future enhancements. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + Note that usage of \a widget is deprecated in favor of \a ceData + and \a elementFlags. + + For an explanation of the return value see \l StyleHint. +*/ + +/*! + \enum TQStyle::StylePixmap + + This enum represents a StylePixmap. A StylePixmap is a pixmap that + can follow some existing GUI style or guideline. + + + \value SP_TitleBarMinButton minimize button on titlebars. For + example, in a TQWorkspace. + \value SP_TitleBarMaxButton maximize button on titlebars. + \value SP_TitleBarCloseButton close button on titlebars. + \value SP_TitleBarNormalButton normal (restore) button on titlebars. + \value SP_TitleBarShadeButton shade button on titlebars. + \value SP_TitleBarUnshadeButton unshade button on titlebars. + \value SP_MessageBoxInformation the 'information' icon. + \value SP_MessageBoxWarning the 'warning' icon. + \value SP_MessageBoxCritical the 'critical' icon. + \value SP_MessageBoxQuestion the 'question' icon. + + + \value SP_DockWindowCloseButton close button on dock windows; + see also TQDockWindow. + + + \value SP_CustomBase base value for custom ControlElements. All + values above this are reserved for custom use. Therefore, + custom values must be greater than this value. + + \sa stylePixmap() +*/ + +/*! + \fn TQPixmap TQStyle::stylePixmap( StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + + Returns a pixmap for \a stylepixmap. + + \a ceData and \a elementFlags provide additional information about + the widget for which the PrimitiveElement is being drawn. + + The \a opt argument can be used to pass extra information required + when drawing the ControlElement. Note that \a opt may be the + default value even for StylePixmaps that can make use of the extra + options. Currently, the \a opt argument is unused. + + The \a widget argument is a pointer to a TQWidget or one of its + subclasses. The widget can be cast to the appropriate type based + on the value of \a stylepixmap. Note that usage of \a widget is + deprecated in favor of \a ceData and \a elementFlags.See the table + below for the appropriate \a widget casts: + + \table + \header \i StylePixmap \i Widget Cast + \row \i \l SP_TitleBarMinButton \i (const \l TQWidget *) + \row \i \l SP_TitleBarMaxButton \i (const \l TQWidget *) + \row \i \l SP_TitleBarCloseButton \i (const \l TQWidget *) + \row \i \l SP_TitleBarNormalButton \i (const \l TQWidget *) + \row \i \l SP_TitleBarShadeButton \i (const \l TQWidget *) + \row \i \l SP_TitleBarUnshadeButton \i (const \l TQWidget *) + \row \i \l SP_DockWindowCloseButton \i (const \l TQDockWindow *) + \endtable + + \sa StylePixmap +*/ + +/*! + \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ); + + Returns the rect \a logical in screen coordinates. The bounding + rect for widget \a w is used to perform the translation. This + function is provided to aid style implementors in supporting + right-to-left mode. + + Note that this function is deprecated in favor of visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); + + \sa TQApplication::reverseLayout() +*/ +TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ) +{ + TQStyleControlElementData ceData; + ceData.rect = w->rect(); + return visualRect(logical, ceData, CEF_None); +} + +/*! + \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); + + Returns the rect \a logical in screen coordinates. The bounding + rect for the widget described by \a ceData and \a elementFlags + is used to perform the translation. This function is provided to + aid style implementors in supporting + right-to-left mode. + + \sa TQApplication::reverseLayout() +*/ +TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ) +{ + Q_UNUSED(elementFlags) + + TQRect boundingRect = ceData.rect; + TQRect r = logical; + if ( TQApplication::reverseLayout() ) + r.moveBy( 2*(boundingRect.right() - logical.right()) + + logical.width() - boundingRect.width(), 0 ); + return r; +} + +/*! + \overload TQRect TQStyle::visualRect( const TQRect &logical, const TQRect &bounding ); + + Returns the rect \a logical in screen coordinates. The rect \a + bounding is used to perform the translation. This function is + provided to aid style implementors in supporting right-to-left + mode. + + \sa TQApplication::reverseLayout() +*/ +TQRect TQStyle::visualRect( const TQRect &logical, const TQRect &boundingRect ) +{ + TQRect r = logical; + if ( TQApplication::reverseLayout() ) + r.moveBy( 2*(boundingRect.right() - logical.right()) + + logical.width() - boundingRect.width(), 0 ); + return r; +} + +/*! + \fn void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + + Intercepts events generated by \a source and sends them to \a handler via + the bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) virtual method. + + \sa void TQStyle::removeObjectEventHandler( TQObject* source, TQStyle* handler ) + \sa bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) +*/ +void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { + bool cbret = false; + if (m_eventHandlerInstallationHook) { + cbret = (*m_eventHandlerInstallationHook)(ceData, elementFlags, source, handler); + } + if (!cbret) { + if (ceData.widgetObjectTypes.contains("TQObject")) { + TQObject* o = reinterpret_cast(source); + o->installEventFilter(this); + m_objectEventSourceToHandlerMap[source] = handler; + m_objectEventSourceDataToHandlerMap[source] = ceData; + m_objectEventSourceFlagsToHandlerMap[source] = elementFlags; + } + } +} + +/*! + \fn void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + + Stops intercepting events generated by \a source. + + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { + bool cbret = false; + if (m_eventHandlerRemovalHook) { + cbret = (*m_eventHandlerRemovalHook)(ceData, elementFlags, source, handler); + } + if (!cbret) { + if (ceData.widgetObjectTypes.contains("TQObject")) { + TQObject* o = reinterpret_cast(source); + m_objectEventSourceToHandlerMap.remove(source); + m_objectEventSourceDataToHandlerMap.remove(source); + m_objectEventSourceFlagsToHandlerMap.remove(source); + o->removeEventFilter(this); + } + } +} + +/*! + \fn void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook ); + + Sets a callback function \a hook which will be called whenever a new intercept request + is made via the TQStyle::installObjectEventHandler method. The callback function must + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook ) { + m_eventHandlerInstallationHook = hook; +} + +/*! + \fn void TQStyle::setEventHandlerRemovalHook( EventHandlerRemovalHook hook ); + + Sets a callback function \a hook which will be called whenever a new intercept deactivation request + is made via the TQStyle::removeObjectEventHandler method. The callback function must + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + + \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +void TQStyle::setEventHandlerRemovalHook( EventHandlerRemovalHook hook ) { + m_eventHandlerRemovalHook = hook; +} + +/*! + \fn bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); + + Override this virtual function to intercept events requested by a previous call to + TQStyle::installObjectEventHandler. + + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) { + Q_UNUSED(ceData); + Q_UNUSED(elementFlags); + Q_UNUSED(source); + Q_UNUSED(e); + return false; +} + +/*! + \fn bool TQStyle::eventFilter(TQObject *o, TQEvent *e); + \internal +*/ +bool TQStyle::eventFilter(TQObject *o, TQEvent *e) { + acceleratorKeypressEventMonitor(o, e); + + if (m_objectEventSourceToHandlerMap.contains(o)) { + TQStyle* handler = m_objectEventSourceToHandlerMap[o]; + const TQStyleControlElementData &ceData = m_objectEventSourceDataToHandlerMap[o]; + ControlElementFlags elementFlags = m_objectEventSourceFlagsToHandlerMap[o]; + bool ret; + TQWidget* w = dynamic_cast(o); + if (w) { + // Update ceData as widget parameters may have changed + // If not done glitches may appear such as those present in Bug 1816 + populateControlElementDataFromWidget(w, TQStyleOption()); + const TQStyleControlElementData &widgetCEData = *(w->controlElementDataObject()); + if (e->type() == TQEvent::Paint) { + TQPainter p(w); + TQPainter* activePainterOrig = widgetCEData.activePainter; + const_cast(widgetCEData).activePainter = &p; + ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e); + const_cast(widgetCEData).activePainter = activePainterOrig; + } + else { + ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e); + } + } + else { + ret = handler->objectEventHandler(ceData, elementFlags, o, e); + } + if (ret) { + return ret; + } + else { + return TQObject::eventFilter(o, e); + } + } + else { + return TQObject::eventFilter(o, e); + } +} + +/*! + \fn void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ); + + Sets a callback function \a hook which will be called whenever a new widget action request + is made via the TQStyle::installObjectEventHandler method. The callback function must + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ) { + m_widgetActionRequestHook = hook; +} + +/*! + \fn bool widgetActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request ); + + Handles widget action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. +*/ +bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) { + bool cbret = false; + if (m_widgetActionRequestHook) { + cbret = (*m_widgetActionRequestHook)(ceData, elementFlags, source, request, requestData); + } + if (!cbret) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { + TQWidget* widget = reinterpret_cast(source); + if (request == WAR_Repaint) { + widget->repaint(FALSE); + } + else if (request == WAR_RepaintRect) { + widget->repaint(requestData.rect, FALSE); + } + else if (request == WAR_EnableMouseTracking) { + widget->setMouseTracking(TRUE); + } + else if (request == WAR_DisableMouseTracking) { + widget->setMouseTracking(FALSE); + } + else if (request == WAR_SetAutoMask) { + widget->setAutoMask(TRUE); + } + else if (request == WAR_UnSetAutoMask) { + widget->setAutoMask(FALSE); + } + else if (request == WAR_SetCheckable) { + TQPopupMenu *pm = dynamic_cast(widget); + if (pm) { + pm->setCheckable(TRUE); + } + } + else if (request == WAR_UnSetCheckable) { + TQPopupMenu *pm = dynamic_cast(widget); + if (pm) { + pm->setCheckable(FALSE); + } + } + else if (request == WAR_FrameSetStyle) { + TQFrame* frame = dynamic_cast(widget); + if (frame) { + frame->setFrameStyle(requestData.metric1); + } + } + else if (request == WAR_FrameSetLineWidth) { + TQFrame* frame = dynamic_cast(widget); + if (frame) { + frame->setLineWidth(requestData.metric1); + } + } + else if (request == WAR_SetLayoutMargin) { + TQLayout* layout = widget->layout(); + if (layout) { + layout->setMargin(requestData.metric1); + } + } + else if (request == WAR_SetPalette) { + widget->setPalette(requestData.palette); + } + else if (request == WAR_SetBackgroundMode) { + widget->setBackgroundMode((TQt::BackgroundMode)requestData.metric1); + } + else if (request == WAR_SetBackgroundOrigin) { + widget->setBackgroundOrigin((TQWidget::BackgroundOrigin)requestData.metric1); + } + else if (request == WAR_SetFont) { + widget->setFont(requestData.font); + } + else if (request == WAR_RepaintAllAccelerators) { + TQWidgetList *list = TQApplication::topLevelWidgets(); + TQWidgetListIt it( *list ); + TQWidget * widget; + while ((widget=it.current()) != 0) { + ++it; + + TQObjectList *l = widget->queryList("TQWidget"); + TQObjectListIt it2( *l ); + TQWidget *w; + while ( (w = (TQWidget*)it2.current()) != 0 ) { + ++it2; + if (w->isTopLevel() || !w->isVisible() || w->style().styleHint(SH_UnderlineAccelerator, TQStyleControlElementData(), CEF_None, w)) { + l->removeRef(w); + } + } + + // Repaint all relevant widgets + it2.toFirst(); + while ( (w = (TQWidget*)it2.current()) != 0 ) { + ++it2; + w->repaint(FALSE); + } + delete l; + } + delete list; + } + else if (request == WAR_SetDefault) { + TQPushButton *button = dynamic_cast(widget); + if (button) { + button->setDefault(TRUE); + } + } + else if (request == WAR_UnSetDefault) { + TQPushButton *button = dynamic_cast(widget); + if (button) { + button->setDefault(FALSE); + } + } + else if (request == WAR_SendPaintEvent) { + static_cast(widget)->event(requestData.paintEvent); + } + return true; + } + } + return true; +} + +/*! + \fn void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook ); + + Sets a callback function \a hook which will be called whenever a new application action request + is made via the TQStyle::installObjectEventHandler method. The callback function must + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) +*/ +void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook ) { + m_applicationActionRequestHook = hook; +} + +/*! + \fn bool applicationActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request ); + + Handles application action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. +*/ +bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) { + bool cbret = false; + if (m_applicationActionRequestHook) { + cbret = (*m_applicationActionRequestHook)(ceData, elementFlags, source, request, requestData); + } + if (!cbret) { + if (ceData.widgetObjectTypes.contains("TQApplication")) { + TQApplication* application = reinterpret_cast(source); + if (request == AAR_SetPalette) { + application->setPalette(requestData.palette, requestData.bool1, requestData.cstr); + } + else if (request == AAR_SetFont) { + application->setFont(requestData.font, requestData.bool1, requestData.cstr); + } + return true; + } + } + return true; +} + +void TQStyle::acceleratorKeypressEventMonitor( TQObject *o, TQEvent *e ) { + if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) { + TQWidget *widget = dynamic_cast(o); + if (widget) { + switch(e->type()) { + case TQEvent::KeyPress: + if (((TQKeyEvent*)e)->key() == Key_Alt) { + conditionalAcceleratorsEnabled = true; + widgetActionRequest(TQStyleControlElementData(), CEF_None, o, WAR_RepaintAllAccelerators); + } + break; + case TQEvent::KeyRelease: + if (((TQKeyEvent*)e)->key() == Key_Alt) { + conditionalAcceleratorsEnabled = false; + widgetActionRequest(TQStyleControlElementData(), CEF_None, o, WAR_RepaintAllAccelerators); + } + break; + default: + break; + } + } + } + else { + conditionalAcceleratorsEnabled = false; + } +} + +bool TQStyle::acceleratorsShown() const { + if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) { + return conditionalAcceleratorsEnabled; + } + else { + return true; + } +} + +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData() { + // +} +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(int param1, int param2) { + metric1 = param1; + metric2 = param2; +} + +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQPalette param, bool informWidgets, const char* className) { + palette = param; + bool1 = informWidgets; + cstr = className; +} + +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQFont param, bool informWidgets, const char* className) { + font = param; + bool1 = informWidgets; + cstr = className; +} + +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQRect param) { + rect = param; +} + +TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQPaintEvent* param) { + paintEvent = param; +} + +TQStyleWidgetActionRequestData::~TQStyleWidgetActionRequestData() { + // +} + +// ============================================================================================ +// Interface methods +// ============================================================================================ + +void TQStyle::drawPrimitive( PrimitiveElement pe, + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags, + const TQStyleOption& opt ) const +{ + const TQWidget* widget = 0; + + // Determine if the request needs widget information and set widget appropriately + // FIXME + if ((pe == PE_CheckListController) || (pe == PE_CheckListExclusiveIndicator) || (pe == PE_CheckListIndicator)) { + TQCheckListItem *item = opt.checkListItem(); + if (item) { + TQListView *lv = item->listView(); + widget = dynamic_cast(lv); + } + } + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawPrimitive(pe, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, opt); +} + +void TQStyle::drawControl( ControlElement element, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags, + const TQStyleOption& opt ) const +{ +#if defined(QT_CHECK_STATE) + if (!widget) { + tqWarning("TQStyle::drawControl: widget parameter cannot be zero!"); + return; + } +#endif + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawControl(element, p, ceData, getControlElementFlagsForObject(widget, opt), r, cg, flags, opt, widget); +} + +void TQStyle::drawControlMask( ControlElement control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& opt ) const +{ + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawControlMask(control, p, ceData, getControlElementFlagsForObject(widget, opt), r, opt, widget); +} + +TQRect TQStyle::subRect(SubRect r, const TQWidget *widget) const +{ +#if defined(QT_CHECK_STATE) + if (! widget) { + tqWarning("TQStyle::subRect: widget parameter cannot be zero!"); + return TQRect(); + } +#endif + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + return subRect(r, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); +} + +void TQStyle::drawComplexControl( ComplexControl control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags, + SCFlags controls, + SCFlags active, + const TQStyleOption& opt ) const +{ +#if defined(QT_CHECK_STATE) + if (! widget) { + tqWarning("TQStyle::drawComplexControl: widget parameter cannot be zero!"); + return; + } +#endif + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawComplexControl(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, controls, active, opt, widget); +} + +void TQStyle::drawComplexControlMask( ComplexControl control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& opt ) const +{ + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawComplexControlMask(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, opt, widget); +} + +TQRect TQStyle::querySubControlMetrics( ComplexControl control, + const TQWidget *widget, + SubControl sc, + const TQStyleOption &opt ) const +{ +#if defined(QT_CHECK_STATE) + if (! widget) { + tqWarning("TQStyle::querySubControlMetrics: widget parameter cannot be zero!"); + return TQRect(); + } +#endif + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt, false); + return querySubControlMetrics(control, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), sc, opt, widget); +} + +TQStyle::SubControl TQStyle::querySubControl(ComplexControl control, + const TQWidget *widget, + const TQPoint &pos, + const TQStyleOption& opt ) const +{ + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + return querySubControl(control, ceData, getControlElementFlagsForObject(widget, opt), pos, opt, widget); +} + +int TQStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +{ + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption(), false); + return pixelMetric(m, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); +} + +TQSize TQStyle::sizeFromContents(ContentsType contents, + const TQWidget *widget, + const TQSize &contentsSize, + const TQStyleOption& opt ) const +{ + TQSize sz(contentsSize); + +#if defined(QT_CHECK_STATE) + if (! widget) { + tqWarning("TQStyle::sizeFromContents: widget parameter cannot be zero!"); + return sz; + } +#endif + + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + return sizeFromContents(contents, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), contentsSize, opt, widget); +} + +int TQStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption &so, TQStyleHintReturn *shr) const +{ + bool ceDataNotNeeded = false; + if (sh == SH_Widget_ShareActivation) { + ceDataNotNeeded = true; + } + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so, false, ceDataNotNeeded); + return styleHint(sh, ceData, getControlElementFlagsForObject(w, TQStyleOption(), false), so, shr, w); +} + +TQPixmap TQStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOption &so) const +{ + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so); + return stylePixmap(sp, ceData, getControlElementFlagsForObject(w, TQStyleOption()), so, w); +} + +/*! + \fn int TQStyle::defaultFrameWidth() const + \obsolete +*/ + +/*! + \fn void TQStyle::tabbarMetrics( const TQWidget *, int &, int &, int & ) const + \obsolete +*/ + +/*! + \fn TQSize TQStyle::scrollBarExtent() const + \obsolete +*/ + +#ifndef TQT_NO_COMPAT +int TQStyle::defaultFrameWidth() const +{ + TQStyleControlElementData ceData; + return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None ); +} + +void TQStyle::tabbarMetrics( const TQWidget* t, int& hf, int& vf, int& ov ) const +{ + TQStyleControlElementData ceData; + hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t ); + vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t ); + ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t ); +} + +TQSize TQStyle::scrollBarExtent() const +{ + TQStyleControlElementData ceData; + ceData.orientation = TQt::Horizontal; + return TQSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None), + pixelMetric(PM_ScrollBarExtent, ceData, CEF_None)); +} +#endif + +TQStyleControlElementData::TQStyleControlElementData() { + isNull = true; + activePainter = 0; + tickMarkSetting = 0; + comboBoxLineEditFlags = 0; + frameStyle = 0; + comboBoxListBoxFlags = 0; + parentWidgetFlags = 0; + topLevelWidgetFlags = 0; +} + +TQStyleControlElementData::~TQStyleControlElementData() { + // +} + +TQStyleControlElementData::TQStyleControlElementData(const TQStyleControlElementData& orig) { + isNull = orig.isNull; + widgetObjectTypes = orig.widgetObjectTypes; + allDataPopulated = orig.allDataPopulated; + wflags = orig.wflags; + windowState = orig.windowState; + bgPixmap = orig.bgPixmap; + bgBrush = orig.bgBrush; + bgColor = orig.bgColor; + bgOffset = orig.bgOffset; + backgroundMode = orig.backgroundMode; + fgPixmap = orig.fgPixmap; + fgColor = orig.fgColor; + colorGroup = orig.colorGroup; + geometry = orig.geometry; + rect = orig.rect; + pos = orig.pos; + icon = orig.icon; + iconSet = orig.iconSet; + text = orig.text; + orientation = orig.orientation; + activeItemPaletteBgColor = orig.activeItemPaletteBgColor; + palette = orig.palette; + totalSteps = orig.totalSteps; + currentStep = orig.currentStep; + tickMarkSetting = orig.tickMarkSetting; + tickInterval = orig.tickInterval; + minSteps = orig.minSteps; + maxSteps = orig.maxSteps; + startStep = orig.startStep; + pageStep = orig.pageStep; + lineStep = orig.lineStep; + dlgVisibleButtons = orig.dlgVisibleButtons; + dlgVisibleSizeHints = orig.dlgVisibleSizeHints; + progressText = orig.progressText; + textLabel = orig.textLabel; + font = orig.font; + percentageVisible = orig.percentageVisible; + dwData = orig.dwData; + toolButtonTextPosition = orig.toolButtonTextPosition; + popupDelay = orig.popupDelay; + titleBarData = orig.titleBarData; + spinWidgetData = orig.spinWidgetData; + parentWidgetData = orig.parentWidgetData; + viewportData = orig.viewportData; + listViewData = orig.listViewData; + tabBarData = orig.tabBarData; + checkListItemData = orig.checkListItemData; + comboBoxLineEditFlags = orig.comboBoxLineEditFlags; + frameStyle = orig.frameStyle; + sliderRect = orig.sliderRect; + activePainter = orig.activePainter; + toolBarData = orig.toolBarData; + comboBoxListBoxFlags = orig.comboBoxListBoxFlags; + paletteBgColor = orig.paletteBgColor; + parentWidgetFlags = orig.parentWidgetFlags; + name = orig.name; + caption = orig.caption; + topLevelWidgetData = orig.topLevelWidgetData; + topLevelWidgetFlags = orig.topLevelWidgetFlags; + paletteBgPixmap = orig.paletteBgPixmap; +} + +#endif // TQT_NO_STYLE diff --git a/src/kernel/tqstyle.h b/src/kernel/tqstyle.h new file mode 100644 index 00000000..6fc61b45 --- /dev/null +++ b/src/kernel/tqstyle.h @@ -0,0 +1,1243 @@ +/**************************************************************************** +** +** Definition of TQStyle class +** +** Created : 980616 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ +#ifndef TQSTYLE_H +#define TQSTYLE_H + +#ifndef QT_H +#include "tqobject.h" +#include "ntqpixmap.h" +#include "ntqcolor.h" +#include "tqiconset.h" +#include "ntqtabbar.h" +#include "ntqtoolbutton.h" +#endif // QT_H + + +#ifndef TQT_NO_STYLE + +class TQPopupMenu; +class TQStylePrivate; +class TQMenuItem; +class TQTab; +class TQListViewItem; +class TQCheckListItem; + +class TQ_EXPORT TQStyleOption { +public: + enum StyleOptionDefault { Default }; + + TQStyleOption(StyleOptionDefault=Default); + TQStyleOption(int in1); + TQStyleOption(int in1, int in2); + TQStyleOption(int in1, int in2, int in3, int in4); + TQStyleOption(TQMenuItem* m); + TQStyleOption(TQMenuItem* m, int in1); + TQStyleOption(TQMenuItem* m, int in1, int in2); + TQStyleOption(const TQColor& c); + TQStyleOption(TQTab* t); + TQStyleOption(TQListViewItem* i); + TQStyleOption(TQCheckListItem* i); + TQStyleOption(TQt::ArrowType a); + TQStyleOption(const TQRect& r); + TQStyleOption(TQWidget *w); + + bool isDefault() const { return def; } + + int day() const { return i1; } + + int lineWidth() const { return i1; } + int midLineWidth() const { return i2; } + int frameShape() const { return i3; } + int frameShadow() const { return i4; } + + int headerSection() const { return i1; } + TQMenuItem* menuItem() const { return mi; } + int maxIconWidth() const { return i1; } + int tabWidth() const { return i2; } + + const TQColor& color() const { return *cl; } + + TQTab* tab() const { return tb; } + + TQCheckListItem* checkListItem() const { return cli; } + TQListViewItem* listViewItem() const { return li; } + + TQt::ArrowType arrowType() const { return (TQt::ArrowType)i1; } + TQRect rect() const { return TQRect( i1, i2, i3, i4 ); } + TQWidget* widget() const { return (TQWidget*)p1; } + + TQStyleOption(TQTab* t, TQTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {} + TQTab* hoverTab() const { return tbh; } + +private: + // NOTE: none of these components have constructors. + bool def; + bool b1,b2,b3; // reserved + TQMenuItem* mi; + TQTab* tb; + TQListViewItem* li; + const TQColor* cl; + int i1, i2, i3, i4; + int i5, i6; // reserved + TQCheckListItem* cli; + void *p1, *p2, *p3, *p4; // reserved + TQTab* tbh; + // (padded to 64 bytes on some architectures) +}; + +class TQStyleHintReturn; // not defined yet + +typedef TQMap DialogButtonSizeMap; +typedef TQMap TabIdentifierIndexMap; + +class TQStyleControlElementGenericWidgetData; + +class TQStyleControlElementPopupMenuData { + public: + // +}; + +class TQStyleControlElementCheckListItemData { + public: + bool dataValid; + bool enabled; + bool hasParent; + int height; +}; + +class TQStyleControlElementListViewData { + public: + bool rootDecorated; + int itemMargin; +}; + +class TQStyleControlElementSpinWidgetData { + public: + TQ_UINT32 buttonSymbols; + TQRect upRect; + TQRect downRect; + bool upEnabled; + bool downEnabled; +}; + +class TQStyleControlElementTitleBarData { + public: + bool hasWindow; + bool usesActiveColor; + int windowState; + TQString visibleText; +}; + +class TQStyleControlElementDockWidgetData { + public: + bool hasDockArea; + bool closeEnabled; + TQt::Orientation areaOrientation; +}; + +class TQStyleControlElementToolBarWidgetData { + public: + TQt::Orientation orientation; +}; + +class TQStyleControlElementGenericWidgetData { + public: + TQStringList widgetObjectTypes; + bool allDataPopulated; + TQt::WFlags wflags; + TQt::WindowState windowState; + TQPixmap bgPixmap; + TQBrush bgBrush; + TQColor bgColor; + TQPoint bgOffset; + TQt::BackgroundMode backgroundMode; + TQColor fgColor; + TQColorGroup colorGroup; + TQRect geometry; + TQRect rect; + TQPoint pos; + TQPixmap icon; + TQPalette palette; + TQFont font; + TQColor paletteBgColor; + TQString name; + TQString caption; +}; + +class TQStyleControlElementTabBarData { + public: + int tabCount; + int currentTabIndex; + TQTabBar::Shape shape; + TabIdentifierIndexMap identIndexMap; +#ifdef Q_QDOC +#else + TQStyleControlElementGenericWidgetData cornerWidgets[4]; +#endif + + enum CornerWidgetLocation { + CWL_TopLeft = 0, + CWL_TopRight = 1, + CWL_BottomLeft = 2, + CWL_BottomRight = 3 + }; +}; + +class TQ_EXPORT TQStyleControlElementData { + public: + TQStyleControlElementData(); + ~TQStyleControlElementData(); + + public: + bool isNull; + TQStringList widgetObjectTypes; + bool allDataPopulated; + TQt::WFlags wflags; + TQt::WindowState windowState; + TQPixmap bgPixmap; + TQBrush bgBrush; + TQColor bgColor; + TQPoint bgOffset; + TQt::BackgroundMode backgroundMode; + TQPixmap fgPixmap; + TQColor fgColor; + TQColorGroup colorGroup; + TQRect geometry; + TQRect rect; + TQPoint pos; + TQPixmap icon; + TQIconSet iconSet; + TQString text; + TQt::Orientation orientation; + TQColor activeItemPaletteBgColor; + TQPalette palette; + int totalSteps; + int currentStep; + TQ_UINT32 tickMarkSetting; + int tickInterval; + int minSteps; + int maxSteps; + int startStep; + int pageStep; + int lineStep; + int dlgVisibleButtons; + DialogButtonSizeMap dlgVisibleSizeHints; + TQString progressText; + TQString textLabel; + TQFont font; + int percentageVisible; + TQStyleControlElementDockWidgetData dwData; + TQToolButton::TextPosition toolButtonTextPosition; + int popupDelay; + TQStyleControlElementTitleBarData titleBarData; + TQStyleControlElementSpinWidgetData spinWidgetData; + TQStyleControlElementGenericWidgetData parentWidgetData; + TQStyleControlElementGenericWidgetData viewportData; + TQStyleControlElementListViewData listViewData; + TQStyleControlElementTabBarData tabBarData; + TQStyleControlElementCheckListItemData checkListItemData; + TQ_UINT32 comboBoxLineEditFlags; + TQ_UINT32 frameStyle; + TQRect sliderRect; + TQPainter* activePainter; + TQStyleControlElementToolBarWidgetData toolBarData; + TQ_UINT32 comboBoxListBoxFlags; + TQColor paletteBgColor; + TQ_UINT32 parentWidgetFlags; + TQString name; + TQString caption; + TQStyleControlElementGenericWidgetData topLevelWidgetData; + TQ_UINT32 topLevelWidgetFlags; + TQPixmap paletteBgPixmap; + +#ifdef ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY + public: + TQStyleControlElementData(const TQStyleControlElementData&); +#else + private: + // Disable copy constructor + TQStyleControlElementData(const TQStyleControlElementData&); +#endif + +}; + +class TQ_EXPORT TQStyleWidgetActionRequestData { + public: + TQStyleWidgetActionRequestData(); + TQStyleWidgetActionRequestData(int metric1, int metric2=0); + TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = FALSE, const char* className = 0); + TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = FALSE, const char* className = 0); + TQStyleWidgetActionRequestData(TQRect rect); + TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent); + ~TQStyleWidgetActionRequestData(); + public: + bool bool1; + bool bool2; + int metric1; + int metric2; + TQPalette palette; + TQFont font; + TQRect rect; + const char * cstr; + TQString string; + TQPaintEvent * paintEvent; +}; + +typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData; + +class TQ_EXPORT TQStyle: public TQObject +{ + TQ_OBJECT + +public: + TQStyle(); + virtual ~TQStyle(); + + enum ControlElementFlags { + CEF_None = 0x00000000, + CEF_IsDefault = 0x00000001, + CEF_AutoDefault = 0x00000002, + CEF_IsActive = 0x00000004, + CEF_IsDown = 0x00000008, + CEF_IsOn = 0x00000010, + CEF_IsEnabled = 0x00000020, + CEF_BiState = 0x00000040, + CEF_HasFocus = 0x00000080, + CEF_IsMenuWidget = 0x00000100, + CEF_IsContainerEmpty = 0x00000200, + CEF_CenterIndicator = 0x00000400, + CEF_IndicatorFollowsStyle = 0x00000800, + CEF_UsesTextLabel = 0x00001000, + CEF_UsesBigPixmap = 0x00002000, + CEF_UseGenericParameters = 0x00004000, + CEF_HasParentWidget = 0x00008000, + CEF_HasPopupMenu = 0x00010000, + CEF_IsCheckable = 0x00020000, + CEF_HasFocusProxy = 0x00040000, + CEF_IsEditable = 0x00080000, + CEF_IsFlat = 0x00100000, + CEF_IsActiveWindow = 0x00200000, + CEF_IsTopLevel = 0x00400000, + CEF_IsVisible = 0x00800000, + CEF_IsShown = 0x01000000, + CEF_HasMouse = 0x02000000 + }; + + // New TQStyle API - most of these should probably be pure virtual + + // Old API + // DEPRECATED + virtual void polish( TQWidget * ); + + // New API + virtual void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); + + // Old API + // DEPRECATED + virtual void unPolish( TQWidget * ); + + // New API + virtual void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); + + // Old API + // DEPRECATED + virtual void polish( TQApplication * ); + + // New API + virtual void applicationPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); + + // Old API + // DEPRECATED + virtual void unPolish( TQApplication * ); + + // New API + virtual void applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); + + virtual void polish( TQPalette & ); + + // Old API + // DEPRECATED + virtual void polishPopupMenu( TQPopupMenu* ); + + // New API + virtual void polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ) = 0; + + virtual TQRect itemRect( TQPainter *p, const TQRect &r, + int flags, bool enabled, + const TQPixmap *pixmap, + const TQString &text, int len = -1 ) const; + + virtual void drawItem( TQPainter *p, const TQRect &r, + int flags, const TQColorGroup &g, bool enabled, + const TQPixmap *pixmap, const TQString &text, + int len = -1, const TQColor *penColor = 0 ) const; + + enum PrimitiveElement { + PE_ButtonCommand, + PE_ButtonDefault, + PE_ButtonBevel, + PE_ButtonTool, + PE_ButtonDropDown, + + PE_FocusRect, + + PE_ArrowUp, + PE_ArrowDown, + PE_ArrowRight, + PE_ArrowLeft, + + PE_SpinWidgetUp, + PE_SpinWidgetDown, + PE_SpinWidgetPlus, + PE_SpinWidgetMinus, + + PE_Indicator, + PE_IndicatorMask, + PE_ExclusiveIndicator, + PE_ExclusiveIndicatorMask, + + PE_DockWindowHandle, + PE_DockWindowSeparator, + PE_DockWindowResizeHandle, + + PE_Splitter, + + PE_Panel, + PE_PanelPopup, + PE_PanelMenuBar, + PE_PanelDockWindow, + + PE_TabBarBase, + + PE_HeaderSection, + PE_HeaderArrow, + PE_StatusBarSection, + + PE_GroupBoxFrame, + + PE_Separator, + + PE_SizeGrip, + + PE_CheckMark, + + PE_ScrollBarAddLine, + PE_ScrollBarSubLine, + PE_ScrollBarAddPage, + PE_ScrollBarSubPage, + PE_ScrollBarSlider, + PE_ScrollBarFirst, + PE_ScrollBarLast, + + PE_ProgressBarChunk, + + PE_PanelLineEdit, + PE_PanelTabWidget, + + PE_WindowFrame, + + PE_CheckListController, + PE_CheckListIndicator, + PE_CheckListExclusiveIndicator, + + PE_PanelGroupBox, + PE_RubberBand, + + PE_HeaderSectionMenu, + + PE_PanelScrollBar, + PE_MenuItemIndicatorFrame, + PE_MenuItemIndicatorIconFrame, + PE_MenuItemIndicatorCheck, + + PE_ScrollBarTrough, + + // do not add any values below/greater this + PE_CustomBase = 0xf000000 + }; + + enum StyleFlags { + Style_Default = 0x00000000, + Style_Enabled = 0x00000001, + Style_Raised = 0x00000002, + Style_Sunken = 0x00000004, + Style_Off = 0x00000008, + Style_NoChange = 0x00000010, + Style_On = 0x00000020, + Style_Down = 0x00000040, + Style_Horizontal = 0x00000080, + Style_HasFocus = 0x00000100, + Style_Top = 0x00000200, + Style_Bottom = 0x00000400, + Style_FocusAtBorder = 0x00000800, + Style_AutoRaise = 0x00001000, + Style_MouseOver = 0x00002000, + Style_Up = 0x00004000, + Style_Selected = 0x00008000, + Style_Active = 0x00010000, + Style_ButtonDefault = 0x00020000 + }; + typedef uint SFlags; + + // Old API + // DEPRECATED + virtual void drawPrimitive( PrimitiveElement pe, + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual void drawPrimitive( PrimitiveElement pe, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const = 0; + + + enum ControlElement { + CE_PushButton, + CE_PushButtonLabel, + + CE_CheckBox, + CE_CheckBoxLabel, + + CE_RadioButton, + CE_RadioButtonLabel, + + CE_TabBarTab, + CE_TabBarLabel, + + CE_ProgressBarGroove, + CE_ProgressBarContents, + CE_ProgressBarLabel, + + CE_PopupMenuItem, + CE_MenuBarItem, + + CE_ToolButtonLabel, + CE_MenuBarEmptyArea, + CE_PopupMenuScroller, + CE_DockWindowEmptyArea, + CE_PopupMenuVerticalExtra, + CE_PopupMenuHorizontalExtra, + + CE_ToolBoxTab, + CE_HeaderLabel, + + // do not add any values below/greater than this + CE_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual void drawControl( ControlElement element, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual void drawControl( ControlElement element, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0; + + // Old API + // DEPRECATED + virtual void drawControlMask( ControlElement element, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual void drawControlMask( ControlElement element, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0; + + enum SubRect { + SR_PushButtonContents, + SR_PushButtonFocusRect, + + SR_CheckBoxIndicator, + SR_CheckBoxContents, + SR_CheckBoxFocusRect, + + SR_RadioButtonIndicator, + SR_RadioButtonContents, + SR_RadioButtonFocusRect, + + SR_ComboBoxFocusRect, + + SR_SliderFocusRect, + + SR_DockWindowHandleRect, + + SR_ProgressBarGroove, + SR_ProgressBarContents, + SR_ProgressBarLabel, + + SR_ToolButtonContents, + + SR_DialogButtonAccept, + SR_DialogButtonReject, + SR_DialogButtonApply, + SR_DialogButtonHelp, + SR_DialogButtonAll, + SR_DialogButtonAbort, + SR_DialogButtonIgnore, + SR_DialogButtonRetry, + SR_DialogButtonCustom, + + SR_ToolBoxTabContents, + + // do not add any values below/greater than this + SR_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual TQRect subRect( SubRect r, const TQWidget *widget ) const; + + // New API + virtual TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const = 0; + + + enum ComplexControl{ + CC_SpinWidget, + CC_ComboBox, + CC_ScrollBar, + CC_Slider, + CC_ToolButton, + CC_TitleBar, + CC_ListView, + + // do not add any values below/greater than this + CC_CustomBase = 0xf0000000 + }; + + enum SubControl { + SC_None = 0x00000000, + + SC_ScrollBarAddLine = 0x00000001, + SC_ScrollBarSubLine = 0x00000002, + SC_ScrollBarAddPage = 0x00000004, + SC_ScrollBarSubPage = 0x00000008, + SC_ScrollBarFirst = 0x00000010, + SC_ScrollBarLast = 0x00000020, + SC_ScrollBarSlider = 0x00000040, + SC_ScrollBarGroove = 0x00000080, + + SC_SpinWidgetUp = 0x00000001, + SC_SpinWidgetDown = 0x00000002, + SC_SpinWidgetFrame = 0x00000004, + SC_SpinWidgetEditField = 0x00000008, + SC_SpinWidgetButtonField = 0x00000010, + + SC_ComboBoxFrame = 0x00000001, + SC_ComboBoxEditField = 0x00000002, + SC_ComboBoxArrow = 0x00000004, + SC_ComboBoxListBoxPopup = 0x00000008, + + SC_SliderGroove = 0x00000001, + SC_SliderHandle = 0x00000002, + SC_SliderTickmarks = 0x00000004, + + SC_ToolButton = 0x00000001, + SC_ToolButtonMenu = 0x00000002, + + SC_TitleBarLabel = 0x00000001, + SC_TitleBarSysMenu = 0x00000002, + SC_TitleBarMinButton = 0x00000004, + SC_TitleBarMaxButton = 0x00000008, + SC_TitleBarCloseButton = 0x00000010, + SC_TitleBarNormalButton = 0x00000020, + SC_TitleBarShadeButton = 0x00000040, + SC_TitleBarUnshadeButton = 0x00000080, + + SC_ListView = 0x00000001, + SC_ListViewBranch = 0x00000002, + SC_ListViewExpand = 0x00000004, + + SC_All = 0xffffffff + }; + typedef uint SCFlags; + + + // Old API + // DEPRECATED + virtual void drawComplexControl( ComplexControl control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, +#ifdef Q_QDOC + SCFlags sub = SC_All, +#else + SCFlags sub = (uint)SC_All, +#endif + SCFlags subActive = SC_None, + const TQStyleOption& = TQStyleOption::Default ) const; + + virtual void drawComplexControl( ComplexControl control, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, +#ifdef Q_QDOC + SCFlags sub = SC_All, +#else + SCFlags sub = (uint)SC_All, +#endif + SCFlags subActive = SC_None, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + // Old API + // DEPRECATED + virtual void drawComplexControlMask( ComplexControl control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual void drawComplexControlMask( ComplexControl control, + TQPainter *p, + const TQStyleControlElementData &ceData, + const ControlElementFlags elementFlags, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + // Old API + // DEPRECATED + virtual TQRect querySubControlMetrics( ComplexControl control, + const TQWidget *widget, + SubControl sc, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual TQRect querySubControlMetrics( ComplexControl control, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + SubControl sc, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + // Old API + // DEPRECATED + virtual SubControl querySubControl( ComplexControl control, + const TQWidget *widget, + const TQPoint &pos, + const TQStyleOption& = TQStyleOption::Default ) const; + + // New API + virtual SubControl querySubControl( ComplexControl control, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQPoint &pos, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + + enum PixelMetric { + PM_ButtonMargin, + PM_ButtonDefaultIndicator, + PM_MenuButtonIndicator, + PM_ButtonShiftHorizontal, + PM_ButtonShiftVertical, + + PM_DefaultFrameWidth, + PM_SpinBoxFrameWidth, + + PM_MaximumDragDistance, + + PM_ScrollBarExtent, + PM_ScrollBarSliderMin, + + PM_SliderThickness, // total slider thickness + PM_SliderControlThickness, // thickness of the business part + PM_SliderLength, // total length of slider + PM_SliderTickmarkOffset, // + PM_SliderSpaceAvailable, // available space for slider to move + + PM_DockWindowSeparatorExtent, + PM_DockWindowHandleExtent, + PM_DockWindowFrameWidth, + + PM_MenuBarFrameWidth, + + PM_TabBarTabOverlap, + PM_TabBarTabHSpace, + PM_TabBarTabVSpace, + PM_TabBarBaseHeight, + PM_TabBarBaseOverlap, + + PM_ProgressBarChunkWidth, + + PM_SplitterWidth, + PM_TitleBarHeight, + + PM_IndicatorWidth, + PM_IndicatorHeight, + PM_ExclusiveIndicatorWidth, + PM_ExclusiveIndicatorHeight, + PM_PopupMenuScrollerHeight, + PM_CheckListButtonSize, + PM_CheckListControllerSize, + PM_PopupMenuFrameHorizontalExtra, + PM_PopupMenuFrameVerticalExtra, + + PM_DialogButtonsSeparator, + PM_DialogButtonsButtonWidth, + PM_DialogButtonsButtonHeight, + + PM_MDIFrameWidth, + PM_MDIMinimizedWidth, + PM_HeaderMargin, + PM_HeaderMarkSize, + PM_HeaderGripMargin, + PM_TabBarTabShiftHorizontal, + PM_TabBarTabShiftVertical, + PM_TabBarScrollButtonWidth, + + PM_MenuBarItemSpacing, + PM_ToolBarItemSpacing, + + PM_MenuIndicatorFrameHBorder, + PM_MenuIndicatorFrameVBorder, + PM_MenuIconIndicatorFrameHBorder, + PM_MenuIconIndicatorFrameVBorder, + + PM_ArrowSize, + + // do not add any values below/greater than this + PM_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual int pixelMetric( PixelMetric metric, + const TQWidget *widget = 0 ) const; + + // New API + virtual int pixelMetric( PixelMetric metric, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQWidget *widget = 0 ) const = 0; + + + enum ContentsType { + CT_PushButton, + CT_CheckBox, + CT_RadioButton, + CT_ToolButton, + CT_ComboBox, + CT_Splitter, + CT_DockWindow, + CT_ProgressBar, + CT_PopupMenuItem, + CT_TabBarTab, + CT_Slider, + CT_Header, + CT_LineEdit, + CT_MenuBar, + CT_SpinBox, + CT_SizeGrip, + CT_TabWidget, + CT_DialogButtons, + + // do not add any values below/greater than this + CT_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual TQSize sizeFromContents( ContentsType contents, + const TQWidget *widget, + const TQSize &contentsSize, + const TQStyleOption& = TQStyleOption::Default ) const; + + virtual TQSize sizeFromContents( ContentsType contents, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQSize &contentsSize, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + enum StyleHint { + // ... + // the general hints + // ... + // disabled text should be etched, ala Windows + SH_EtchDisabledText, + + // the GUI style enum, argh! + SH_GUIStyle, + + // ... + // widget specific hints + // ... + SH_ScrollBar_BackgroundMode, + SH_ScrollBar_MiddleClickAbsolutePosition, + SH_ScrollBar_ScrollWhenPointerLeavesControl, + + // TQEvent::Type - which mouse event to select a tab + SH_TabBar_SelectMouseType, + + SH_TabBar_Alignment, + + SH_Header_ArrowAlignment, + + // bool - sliders snap to values while moving, ala Windows + SH_Slider_SnapToValue, + + // bool - key presses handled in a sloppy manner - ie. left on a vertical + // slider subtracts a line + SH_Slider_SloppyKeyEvents, + + // bool - center button on progress dialogs, ala Motif, else right aligned + // perhaps this should be a TQt::Alignment value + SH_ProgressDialog_CenterCancelButton, + + // TQt::AlignmentFlags - text label alignment in progress dialogs + // Center on windows, Auto|VCenter otherwize + SH_ProgressDialog_TextLabelAlignment, + + // bool - right align buttons on print dialog, ala Windows + SH_PrintDialog_RightAlignButtons, + + // bool - 1 or 2 pixel space between the menubar and the dockarea, ala Windows + // this *REALLY* needs a better name + SH_MainWindow_SpaceBelowMenuBar, + + // bool - select the text in the line edit about the listbox when selecting + // an item from the listbox, or when the line edit receives focus, ala Windows + SH_FontDialog_SelectAssociatedText, + + // bool - allows disabled menu items to be active + SH_PopupMenu_AllowActiveAndDisabled, + + // bool - pressing space activates item, ala Motif + SH_PopupMenu_SpaceActivatesItem, + + // int - number of milliseconds to wait before opening a submenu + // 256 on windows, 96 on motif + SH_PopupMenu_SubMenuPopupDelay, + + // bool - should scrollviews draw their frame only around contents (ala Motif), + // or around contents, scrollbars and corner widgets (ala Windows) ? + SH_ScrollView_FrameOnlyAroundContents, + + // bool - menubars items are navigatable by pressing alt, followed by using + // the arrow keys to select the desired item + SH_MenuBar_AltKeyNavigation, + + // bool - mouse tracking in combobox dropdown lists + SH_ComboBox_ListMouseTracking, + + // bool - mouse tracking in popupmenus + SH_PopupMenu_MouseTracking, + + // bool - mouse tracking in menubars + SH_MenuBar_MouseTracking, + + // bool - gray out selected items when loosing focus + SH_ItemView_ChangeHighlightOnFocus, + + // bool - supports shared activation among modeless widgets + SH_Widget_ShareActivation, + + // bool - workspace should just maximize the client area + SH_Workspace_FillSpaceOnMaximize, + + // bool - supports popup menu comboboxes + SH_ComboBox_Popup, + + // bool - titlebar has no border + SH_TitleBar_NoBorder, + + // bool - stop scrollbar at mouse + SH_ScrollBar_StopMouseOverSlider, + + //bool - blink cursort with selected text + SH_BlinkCursorWhenTextSelected, + + //bool - richtext selections extend the full width of the docuemnt + SH_RichText_FullWidthSelection, + + //bool - popupmenu supports scrolling instead of multicolumn mode + SH_PopupMenu_Scrollable, + + // TQt::AlignmentFlags - text label vertical alignment in groupboxes + // Center on windows, Auto|VCenter otherwize + SH_GroupBox_TextLabelVerticalAlignment, + + // TQt::TQRgb - text label color in groupboxes + SH_GroupBox_TextLabelColor, + + // bool - popupmenu supports sloppy submenus + SH_PopupMenu_SloppySubMenus, + + // TQt::TQRgb - table grid color + SH_Table_GridLineColor, + + // TQChar - Unicode character for password char + SH_LineEdit_PasswordCharacter, + + // TQDialogButtons::Button - default button + SH_DialogButtons_DefaultButton, + + // TQToolBox - Boldness of the selected page title + SH_ToolBox_SelectedPageTitleBold, + + //bool - if a tabbar prefers not to have scroller arrows + SH_TabBar_PreferNoArrows, + + //bool - if left button should cause an absolute position + SH_ScrollBar_LeftClickAbsolutePosition, + + // TQEvent::Type - which mouse event to select a list view expansion + SH_ListViewExpand_SelectMouseType, + + //bool - if underline for accelerators + SH_UnderlineAccelerator, + + // bool - TQToolButton - if tool buttons should use a 3D frame + // when the mouse is over the button + SH_ToolButton_Uses3D, + + // bool - hide underlined accelerators uless Alt key is currently down + SH_HideUnderlineAcceleratorWhenAltUp, + + // int - width of menu check column + SH_MenuIndicatorColumnWidth, + + // bool - whether or not the lower two button drawing areas should be combined into one + SH_ScrollBar_CombineAddLineRegionDrawingAreas, + + // bool - whether or not the upper two button drawing areas should be combined into one + SH_ScrollBar_CombineSubLineRegionDrawingAreas, + + // TQt::TQRgb - color of the popup menu arrow (active, menuitem enabled) + SH_PopupMenu_SubMenuArrowColorActiveEnabled, + + // TQt::TQRgb - color of the popup menu arrow (active, menuitem disabled) + SH_PopupMenu_SubMenuArrowColorActiveDisabled, + + // TQt::TQRgb - color of the popup menu arrow (inactive, menuitem enabled) + SH_PopupMenu_SubMenuArrowColorInactiveEnabled, + + // TQt::TQRgb - color of the popup menu arrow (active, menuitem disabled) + SH_PopupMenu_SubMenuArrowColorInactiveDisabled, + + // do not add any values below/greater than this + SH_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual int styleHint( StyleHint stylehint, + const TQWidget *widget = 0, + const TQStyleOption& = TQStyleOption::Default, + TQStyleHintReturn* returnData = 0 + ) const; + + // New API + virtual int styleHint( StyleHint stylehint, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQStyleOption& = TQStyleOption::Default, + TQStyleHintReturn* returnData = 0, + const TQWidget *widget = 0 + ) const = 0; + + + enum StylePixmap { + SP_TitleBarMinButton, + SP_TitleBarMaxButton, + SP_TitleBarCloseButton, + SP_TitleBarNormalButton, + SP_TitleBarShadeButton, + SP_TitleBarUnshadeButton, + SP_DockWindowCloseButton, + SP_MessageBoxInformation, + SP_MessageBoxWarning, + SP_MessageBoxCritical, + SP_MessageBoxQuestion, + + // do not add any values below/greater than this + SP_CustomBase = 0xf0000000 + }; + + // Old API + // DEPRECATED + virtual TQPixmap stylePixmap( StylePixmap stylepixmap, + const TQWidget *widget = 0, + const TQStyleOption& = TQStyleOption::Default ) const; + + virtual TQPixmap stylePixmap( StylePixmap stylepixmap, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const = 0; + + + // Old API + // DEPRECATED + static TQRect visualRect( const TQRect &logical, const TQWidget *w ); + + // New API + static TQRect visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); + + static TQRect visualRect( const TQRect &logical, const TQRect &bounding ); + + + // Object event handling API + typedef TQMap ObjectEventSourceToHandlerMap; + typedef TQMap ObjectEventSourceDataToHandlerMap; + typedef TQMap ObjectEventSourceFlagsToHandlerMap; + typedef bool (*EventHandlerInstallationHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler); + typedef bool (*EventHandlerRemovalHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler); + void installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + void removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + void setEventHandlerInstallationHook( EventHandlerInstallationHook ); + void setEventHandlerRemovalHook( EventHandlerRemovalHook hook ); + virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); + + enum WidgetActionRequest { + WAR_Repaint, + WAR_RepaintRect, + WAR_EnableMouseTracking, + WAR_DisableMouseTracking, + WAR_SetAutoMask, + WAR_UnSetAutoMask, + WAR_SetCheckable, + WAR_UnSetCheckable, + WAR_FrameSetStyle, + WAR_FrameSetLineWidth, + WAR_SetLayoutMargin, + WAR_SetPalette, + WAR_SetBackgroundMode, + WAR_SetBackgroundOrigin, + WAR_SetFont, + WAR_RepaintAllAccelerators, + WAR_SetDefault, + WAR_UnSetDefault, + WAR_SendPaintEvent + }; + + typedef bool (*WidgetActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData); + void setWidgetActionRequestHook( WidgetActionRequestHook ); + virtual bool widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData = TQStyleWidgetActionRequestData() ); + + enum ApplicationActionRequest { + AAR_SetPalette, + AAR_SetFont + }; + + typedef bool (*ApplicationActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData); + void setApplicationActionRequestHook( ApplicationActionRequestHook ); + virtual bool applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData = TQStyleApplicationActionRequestData() ); + + // Old 2.x TQStyle API + +#ifndef TQT_NO_COMPAT + int defaultFrameWidth() const; + void tabbarMetrics( const TQWidget* t, int& hf, int& vf, int& ov ) const; + TQSize scrollBarExtent() const; +#endif + +public: + virtual bool eventFilter( TQObject *, TQEvent * ); + bool acceleratorsShown() const; + +protected: + void acceleratorKeypressEventMonitor( TQObject *, TQEvent * ); + +private: + TQStylePrivate * d; + +#if defined(TQ_DISABLE_COPY) + TQStyle( const TQStyle & ); + TQStyle& operator=( const TQStyle & ); +#endif + + EventHandlerInstallationHook m_eventHandlerInstallationHook; + EventHandlerRemovalHook m_eventHandlerRemovalHook; + WidgetActionRequestHook m_widgetActionRequestHook; + ApplicationActionRequestHook m_applicationActionRequestHook; + ObjectEventSourceToHandlerMap m_objectEventSourceToHandlerMap; + ObjectEventSourceDataToHandlerMap m_objectEventSourceDataToHandlerMap; + ObjectEventSourceFlagsToHandlerMap m_objectEventSourceFlagsToHandlerMap; + bool conditionalAcceleratorsEnabled; +}; + +inline TQStyle::ControlElementFlags operator|(const TQStyle::ControlElementFlags a, const TQStyle::ControlElementFlags b) { return static_cast(static_cast(a) | static_cast(b)); } +// inline TQStyle::ControlElementFlags operator|=(TQStyle::ControlElementFlags &a, const TQStyle::ControlElementFlags b) { a = static_cast(static_cast(a) | static_cast(b)); return a; } + +TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWidget* widget, const TQStyleOption& opt, bool populateReliantFields=true); +TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromApplication(const TQApplication* app, const TQStyleOption& opt, bool populateReliantFields=true); +TQ_EXPORT TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* object, const TQStyleOption& opt, bool populateReliantFields=true); +TQ_EXPORT TQStringList getObjectTypeListForObject(const TQObject* object); +TQ_EXPORT const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWidget* widget, const TQStyleOption& opt, bool populateReliantFields, bool populateMinimumNumberOfFields); + +#endif // TQT_NO_STYLE +#endif // TQSTYLE_H diff --git a/src/kernel/tqstylesheet.cpp b/src/kernel/tqstylesheet.cpp new file mode 100644 index 00000000..2af22110 --- /dev/null +++ b/src/kernel/tqstylesheet.cpp @@ -0,0 +1,1623 @@ +/**************************************************************************** +** +** Implementation of the TQStyleSheet class +** +** Created : 990101 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqstylesheet.h" + +#ifndef TQT_NO_RICHTEXT + +#include "private/qrichtext_p.h" +#include "ntqlayout.h" +#include "ntqpainter.h" +#include "ntqcleanuphandler.h" + +#include + +class TQStyleSheetItemData +{ +public: + TQStyleSheetItem::DisplayMode disp; + int fontitalic; + int fontunderline; + int fontstrikeout; + int fontweight; + int fontsize; + int fontsizelog; + int fontsizestep; + int lineSpacing; + TQString fontfamily; + TQStyleSheetItem *parentstyle; + TQString stylename; + int ncolumns; + TQColor col; + bool anchor; + int align; + TQStyleSheetItem::VerticalAlignment valign; + int margin[5]; + TQStyleSheetItem::ListStyle list; + TQStyleSheetItem::WhiteSpaceMode whitespacemode; + TQString contxt; + bool selfnest; + TQStyleSheet* sheet; +}; + +/*! + \class TQStyleSheetItem tqstylesheet.h + \brief The TQStyleSheetItem class provides an encapsulation of a set of text styles. + + \ingroup text + + A style sheet item consists of a name and a set of attributes that + specifiy its font, color, etc. When used in a \link TQStyleSheet + style sheet\endlink (see styleSheet()), items define the name() of + a rich text tag and the display property changes associated with + it. + + The \link TQStyleSheetItem::DisplayMode display mode\endlink + attribute indicates whether the item is a block, an inline element + or a list element; see setDisplayMode(). The treatment of + whitespace is controlled by the \link + TQStyleSheetItem::WhiteSpaceMode white space mode\endlink; see + setWhiteSpaceMode(). An item's margins are set with setMargin(), + In the case of list items, the list style is set with + setListStyle(). An item may be a hypertext link anchor; see + setAnchor(). Other attributes are set with setAlignment(), + setVerticalAlignment(), setFontFamily(), setFontSize(), + setFontWeight(), setFontItalic(), setFontUnderline(), + setFontStrikeOut and setColor(). +*/ + +/*! \enum TQStyleSheetItem::AdditionalStyleValues + \internal +*/ + +/*! + \enum TQStyleSheetItem::WhiteSpaceMode + + This enum defines the ways in which TQStyleSheet can treat + whitespace. + + \value WhiteSpaceNormal any sequence of whitespace (including + line-breaks) is equivalent to a single space. + + \value WhiteSpacePre whitespace must be output exactly as given + in the input. + + \value WhiteSpaceNoWrap multiple spaces are collapsed as with + WhiteSpaceNormal, but no automatic line-breaks occur. To break + lines manually, use the \c{
        } tag. + +*/ + +/*! + \enum TQStyleSheetItem::Margin + + \value MarginLeft left margin + \value MarginRight right margin + \value MarginTop top margin + \value MarginBottom bottom margin + \value MarginAll all margins (left, right, top and bottom) + \value MarginVertical top and bottom margins + \value MarginHorizontal left and right margins + \value MarginFirstLine margin (indentation) of the first line of + a paragarph (in addition to the MarginLeft of the paragraph) +*/ + +/*! + Constructs a new style called \a name for the stylesheet \a + parent. + + All properties in TQStyleSheetItem are initially in the "do not + change" state, except \link TQStyleSheetItem::DisplayMode display + mode\endlink, which defaults to \c DisplayInline. +*/ +TQStyleSheetItem::TQStyleSheetItem( TQStyleSheet* parent, const TQString& name ) +{ + d = new TQStyleSheetItemData; + d->stylename = name.lower(); + d->sheet = parent; + init(); + if (parent) + parent->insert( this ); +} + +/*! + Copy constructor. Constructs a copy of \a other that is not bound + to any style sheet. +*/ +TQStyleSheetItem::TQStyleSheetItem( const TQStyleSheetItem & other ) +{ + d = new TQStyleSheetItemData; + *d = *other.d; +} + + +/*! + Destroys the style. Note that TQStyleSheetItem objects become + owned by TQStyleSheet when they are created. +*/ +TQStyleSheetItem::~TQStyleSheetItem() +{ + delete d; +} + +/*! + Assignment. Assings a copy of \a other that is not bound to any style sheet. + Unbounds first from previous style sheet. + */ +TQStyleSheetItem& TQStyleSheetItem::operator=( const TQStyleSheetItem& other ) +{ + if ( &other == this ) + return *this; + delete d; + d = new TQStyleSheetItemData; + *d = *other.d; + return *this; +} + +/*! + Returns the style sheet this item is in. +*/ +TQStyleSheet* TQStyleSheetItem::styleSheet() +{ + return d->sheet; +} + +/*! + \overload + + Returns the style sheet this item is in. +*/ +const TQStyleSheet* TQStyleSheetItem::styleSheet() const +{ + return d->sheet; +} + +/*! + \internal + Internal initialization + */ +void TQStyleSheetItem::init() +{ + d->disp = DisplayInline; + + d->fontitalic = Undefined; + d->fontunderline = Undefined; + d->fontstrikeout = Undefined; + d->fontweight = Undefined; + d->fontsize = Undefined; + d->fontsizelog = Undefined; + d->fontsizestep = 0; + d->ncolumns = Undefined; + d->col = TQColor(); // !isValid() + d->anchor = FALSE; + d->align = Undefined; + d->valign = VAlignBaseline; + d->margin[0] = Undefined; + d->margin[1] = Undefined; + d->margin[2] = Undefined; + d->margin[3] = Undefined; + d->margin[4] = Undefined; + d->list = ListStyleUndefined; + d->whitespacemode = WhiteSpaceModeUndefined; + d->selfnest = TRUE; + d->lineSpacing = Undefined; +} + +/*! + Returns the name of the style item. +*/ +TQString TQStyleSheetItem::name() const +{ + return d->stylename; +} + +/*! + Returns the \link TQStyleSheetItem::DisplayMode display + mode\endlink of the style. + + \sa setDisplayMode() +*/ +TQStyleSheetItem::DisplayMode TQStyleSheetItem::displayMode() const +{ + return d->disp; +} + +/*! + \enum TQStyleSheetItem::DisplayMode + + This enum type defines the way adjacent elements are displayed. + + \value DisplayBlock elements are displayed as a rectangular block + (e.g. \c{

        ...

        }). + + \value DisplayInline elements are displayed in a horizontally + flowing sequence (e.g. \c{...}). + + \value DisplayListItem elements are displayed in a vertical + sequence (e.g. \c{
      • ...
      • }). + + \value DisplayNone elements are not displayed at all. +*/ + +/*! + Sets the display mode of the style to \a m. + + \sa displayMode() + */ +void TQStyleSheetItem::setDisplayMode(DisplayMode m) +{ + d->disp=m; +} + + +/*! + Returns the alignment of this style. Possible values are \c + AlignAuto, \c AlignLeft, \c AlignRight, \c AlignCenter or \c + AlignJustify. + + \sa setAlignment(), TQt::AlignmentFlags +*/ +int TQStyleSheetItem::alignment() const +{ + return d->align; +} + +/*! + Sets the alignment to \a f. This only makes sense for styles with + a \link TQStyleSheetItem::DisplayMode display mode\endlink of + DisplayBlock. Possible values are \c AlignAuto, \c AlignLeft, + \c AlignRight, \c AlignCenter or \c AlignJustify. + + \sa alignment(), displayMode(), TQt::AlignmentFlags +*/ +void TQStyleSheetItem::setAlignment( int f ) +{ + d->align = f; +} + + +/*! + Returns the vertical alignment of the style. Possible values are + \c VAlignBaseline, \c VAlignSub or \c VAlignSuper. + + \sa setVerticalAlignment() +*/ +TQStyleSheetItem::VerticalAlignment TQStyleSheetItem::verticalAlignment() const +{ + return d->valign; +} + +/*! + \enum TQStyleSheetItem::VerticalAlignment + + This enum type defines the way elements are aligned vertically. + This is only supported for text elements. + + \value VAlignBaseline align the baseline of the element (or the + bottom, if the element doesn't have a baseline) with the + baseline of the parent + + \value VAlignSub subscript the element + + \value VAlignSuper superscript the element + +*/ + + +/*! + Sets the vertical alignment to \a valign. Possible values are + \c VAlignBaseline, \c VAlignSub or \c VAlignSuper. + + The vertical alignment property is not inherited. + + \sa verticalAlignment() +*/ +void TQStyleSheetItem::setVerticalAlignment( VerticalAlignment valign ) +{ + d->valign = valign; +} + + +/*! + Returns TRUE if the style sets an italic font; otherwise returns + FALSE. + + \sa setFontItalic(), definesFontItalic() +*/ +bool TQStyleSheetItem::fontItalic() const +{ + return d->fontitalic > 0; +} + +/*! + If \a italic is TRUE sets italic for the style; otherwise sets + upright. + + \sa fontItalic(), definesFontItalic() +*/ +void TQStyleSheetItem::setFontItalic(bool italic) +{ + d->fontitalic = italic?1:0; +} + +/*! + Returns TRUE if the style defines a font shape; otherwise returns + FALSE. A style does not define any shape until setFontItalic() is + called. + + \sa setFontItalic(), fontItalic() +*/ +bool TQStyleSheetItem::definesFontItalic() const +{ + return d->fontitalic != Undefined; +} + +/*! + Returns TRUE if the style sets an underlined font; otherwise + returns FALSE. + + \sa setFontUnderline(), definesFontUnderline() +*/ +bool TQStyleSheetItem::fontUnderline() const +{ + return d->fontunderline > 0; +} + +/*! + If \a underline is TRUE, sets underline for the style; otherwise + sets no underline. + + \sa fontUnderline(), definesFontUnderline() +*/ +void TQStyleSheetItem::setFontUnderline(bool underline) +{ + d->fontunderline = underline?1:0; +} + +/*! + Returns TRUE if the style defines a setting for the underline + property of the font; otherwise returns FALSE. A style does not + define this until setFontUnderline() is called. + + \sa setFontUnderline(), fontUnderline() +*/ +bool TQStyleSheetItem::definesFontUnderline() const +{ + return d->fontunderline != Undefined; +} + + +/*! + Returns TRUE if the style sets a strike out font; otherwise + returns FALSE. + + \sa setFontStrikeOut(), definesFontStrikeOut() +*/ +bool TQStyleSheetItem::fontStrikeOut() const +{ + return d->fontstrikeout > 0; +} + +/*! + If \a strikeOut is TRUE, sets strike out for the style; otherwise + sets no strike out. + + \sa fontStrikeOut(), definesFontStrikeOut() +*/ +void TQStyleSheetItem::setFontStrikeOut(bool strikeOut) +{ + d->fontstrikeout = strikeOut?1:0; +} + +/*! + Returns TRUE if the style defines a setting for the strikeOut + property of the font; otherwise returns FALSE. A style does not + define this until setFontStrikeOut() is called. + + \sa setFontStrikeOut(), fontStrikeOut() +*/ +bool TQStyleSheetItem::definesFontStrikeOut() const +{ + return d->fontstrikeout != Undefined; +} + + +/*! + Returns the font weight setting of the style. This is either a + valid \c TQFont::Weight or the value \c TQStyleSheetItem::Undefined. + + \sa setFontWeight(), TQFont +*/ +int TQStyleSheetItem::fontWeight() const +{ + return d->fontweight; +} + +/*! + Sets the font weight setting of the style to \a w. Valid values + are those defined by \c TQFont::Weight. + + \sa TQFont, fontWeight() +*/ +void TQStyleSheetItem::setFontWeight(int w) +{ + d->fontweight = w; +} + +/*! + Returns the logical font size setting of the style. This is either + a valid size between 1 and 7 or \c TQStyleSheetItem::Undefined. + + \sa setLogicalFontSize(), setLogicalFontSizeStep(), TQFont::pointSize(), TQFont::setPointSize() +*/ +int TQStyleSheetItem::logicalFontSize() const +{ + return d->fontsizelog; +} + + +/*! + Sets the logical font size setting of the style to \a s. Valid + logical sizes are 1 to 7. + + \sa logicalFontSize(), TQFont::pointSize(), TQFont::setPointSize() +*/ +void TQStyleSheetItem::setLogicalFontSize(int s) +{ + d->fontsizelog = s; +} + +/*! + Returns the logical font size step of this style. + + The default is 0. Tags such as \c big define \c +1; \c small + defines \c -1. + + \sa setLogicalFontSizeStep() +*/ +int TQStyleSheetItem::logicalFontSizeStep() const +{ + return d->fontsizestep; +} + +/*! + Sets the logical font size step of this style to \a s. + + \sa logicalFontSizeStep() +*/ +void TQStyleSheetItem::setLogicalFontSizeStep( int s ) +{ + d->fontsizestep = s; +} + + + +/*! + Sets the font size setting of the style to \a s points. + + \sa fontSize(), TQFont::pointSize(), TQFont::setPointSize() +*/ +void TQStyleSheetItem::setFontSize(int s) +{ + d->fontsize = s; +} + +/*! + Returns the font size setting of the style. This is either a valid + point size or \c TQStyleSheetItem::Undefined. + + \sa setFontSize(), TQFont::pointSize(), TQFont::setPointSize() +*/ +int TQStyleSheetItem::fontSize() const +{ + return d->fontsize; +} + + +/*! + Returns the font family setting of the style. This is either a + valid font family or TQString::null if no family has been set. + + \sa setFontFamily(), TQFont::family(), TQFont::setFamily() +*/ +TQString TQStyleSheetItem::fontFamily() const +{ + return d->fontfamily; +} + +/*! + Sets the font family setting of the style to \a fam. + + \sa fontFamily(), TQFont::family(), TQFont::setFamily() +*/ +void TQStyleSheetItem::setFontFamily( const TQString& fam) +{ + d->fontfamily = fam; +} + + +/*!\obsolete + Returns the number of columns for this style. + + \sa setNumberOfColumns(), displayMode(), setDisplayMode() + + */ +int TQStyleSheetItem::numberOfColumns() const +{ + return d->ncolumns; +} + + +/*!\obsolete + Sets the number of columns for this style. Elements in the style + are divided into columns. + + This makes sense only if the style uses a block display mode + (see TQStyleSheetItem::DisplayMode). + + \sa numberOfColumns() + */ +void TQStyleSheetItem::setNumberOfColumns(int ncols) +{ + if (ncols > 0) + d->ncolumns = ncols; +} + + +/*! + Returns the text color of this style or an invalid color if no + color has been set. + + \sa setColor() TQColor::isValid() +*/ +TQColor TQStyleSheetItem::color() const +{ + return d->col; +} + +/*! + Sets the text color of this style to \a c. + + \sa color() +*/ +void TQStyleSheetItem::setColor( const TQColor &c) +{ + d->col = c; +} + +/*! + Returns whether this style is an anchor. + + \sa setAnchor() +*/ +bool TQStyleSheetItem::isAnchor() const +{ + return d->anchor; +} + +/*! + If \a anc is TRUE, sets this style to be an anchor (hypertext + link); otherwise sets it to not be an anchor. Elements in this + style link to other documents or anchors. + + \sa isAnchor() +*/ +void TQStyleSheetItem::setAnchor(bool anc) +{ + d->anchor = anc; +} + + +/*! + Returns the whitespace mode. + + \sa setWhiteSpaceMode() WhiteSpaceMode +*/ +TQStyleSheetItem::WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode() const +{ + return d->whitespacemode; +} + +/*! + Sets the whitespace mode to \a m. + + \sa WhiteSpaceMode +*/ +void TQStyleSheetItem::setWhiteSpaceMode(WhiteSpaceMode m) +{ + d->whitespacemode = m; +} + + +/*! + Returns the width of margin \a m in pixels. + + The margin, \a m, can be \c MarginLeft, \c MarginRight, \c + MarginTop, \c MarginBottom, or \c MarginFirstLine. + + \sa setMargin() Margin +*/ +int TQStyleSheetItem::margin(Margin m) const +{ + if (m == MarginAll ) { + return d->margin[MarginLeft]; + } else if (m == MarginVertical) { + return d->margin[MarginTop]; + } else if (m == MarginHorizontal) { + return d->margin[MarginLeft]; + } else { + return d->margin[m]; + } +} + + +/*! + Sets the width of margin \a m to \a v pixels. + + The margin, \a m, can be \c MarginLeft, \c MarginRight, \c + MarginTop, \c MarginBottom, \c MarginFirstLine, \c MarginAll, + \c MarginVertical or \c MarginHorizontal. The value \a v must + be >= 0. + + \sa margin() +*/ +void TQStyleSheetItem::setMargin(Margin m, int v) +{ + if (m == MarginAll) { + d->margin[MarginLeft] = v; + d->margin[MarginRight] = v; + d->margin[MarginTop] = v; + d->margin[MarginBottom] = v; + } else if (m == MarginVertical ) { + d->margin[MarginTop] = v; + d->margin[MarginBottom] = v; + } else if (m == MarginHorizontal ) { + d->margin[MarginLeft] = v; + d->margin[MarginRight] = v; + } else { + d->margin[m] = v; + } +} + + +/*! + Returns the list style of the style. + + \sa setListStyle() ListStyle + */ +TQStyleSheetItem::ListStyle TQStyleSheetItem::listStyle() const +{ + return d->list; +} + +/*! + \enum TQStyleSheetItem::ListStyle + + This enum type defines how the items in a list are prefixed when + displayed. + + \value ListDisc a filled circle (i.e. a bullet) + \value ListCircle an unfilled circle + \value ListSquare a filled square + \value ListDecimal an integer in base 10: \e 1, \e 2, \e 3, ... + \value ListLowerAlpha a lowercase letter: \e a, \e b, \e c, ... + \value ListUpperAlpha an uppercase letter: \e A, \e B, \e C, ... +*/ + +/*! + Sets the list style of the style to \a s. + + This is used by nested elements that have a display mode of \c + DisplayListItem. + + \sa listStyle() DisplayMode ListStyle +*/ +void TQStyleSheetItem::setListStyle(ListStyle s) +{ + d->list=s; +} + + +/*! + Returns a space-separated list of names of styles that may contain + elements of this style. If nothing has been set, contexts() + returns an empty string, which indicates that this style can be + nested everywhere. + + \sa setContexts() +*/ +TQString TQStyleSheetItem::contexts() const +{ + return d->contxt; +} + +/*! + Sets a space-separated list of names of styles that may contain + elements of this style. If \a c is empty, the style can be nested + everywhere. + + \sa contexts() +*/ +void TQStyleSheetItem::setContexts( const TQString& c) +{ + d->contxt = TQChar(' ') + c + TQChar(' '); +} + +/*! + Returns TRUE if this style can be nested into an element of style + \a s; otherwise returns FALSE. + + \sa contexts(), setContexts() +*/ +bool TQStyleSheetItem::allowedInContext( const TQStyleSheetItem* s) const +{ + if ( d->contxt.isEmpty() ) + return TRUE; + return d->contxt.find( TQChar(' ')+s->name()+TQChar(' ')) != -1; +} + + +/*! + Returns TRUE if this style has self-nesting enabled; otherwise + returns FALSE. + + \sa setSelfNesting() +*/ +bool TQStyleSheetItem::selfNesting() const +{ + return d->selfnest; +} + +/*! + Sets the self-nesting property for this style to \a nesting. + + In order to support "dirty" HTML, paragraphs \c{

        } and list + items \c{

      • } are not self-nesting. This means that starting a + new paragraph or list item automatically closes the previous one. + + \sa selfNesting() +*/ +void TQStyleSheetItem::setSelfNesting( bool nesting ) +{ + d->selfnest = nesting; +} + +/*! + \internal + Sets the linespacing to be at least \a ls pixels. + + For compatibility with previous TQt releases, small values get + treated differently: If \a ls is smaller than the default font + line spacing in pixels at parse time, the resulting line spacing + is the sum of the default line spacing plus \a ls. We recommend + not relying on this behavior. +*/ + +void TQStyleSheetItem::setLineSpacing( int ls ) +{ + d->lineSpacing = ls; +} + +/*! + \obsolete + + Returns the linespacing +*/ + +int TQStyleSheetItem::lineSpacing() const +{ + return d->lineSpacing; +} + +//************************************************************************ + + + + +//************************************************************************ + + +/*! + \class TQStyleSheet tqstylesheet.h + \ingroup text + \brief The TQStyleSheet class is a collection of styles for rich text + rendering and a generator of tags. + + \ingroup graphics + \ingroup helpsystem + + By creating TQStyleSheetItem objects for a style sheet you build a + definition of a set of tags. This definition will be used by the + internal rich text rendering system to parse and display text + documents to which the style sheet applies. Rich text is normally + visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, + TQWhatsThis and TQMessageBox also support it, and other classes are + likely to follow. With TQSimpleRichText it is possible to use the + rich text renderer for custom widgets as well. + + The default TQStyleSheet object has the following style bindings, + sorted by structuring bindings, anchors, character style bindings + (i.e. inline styles), special elements such as horizontal lines or + images, and other tags. In addition, rich text supports simple + HTML tables. + + The structuring tags are + \table + \header \i Structuring tags \i Notes + \row \i \c{}...\c{} + \i A TQt rich text document. It understands the following + attributes: + \list + \i \c title -- The caption of the document. This attribute is + easily accessible with TQTextEdit::documentTitle(). + \i \c type -- The type of the document. The default type is \c + page. It indicates that the document is displayed in a + page of its own. Another style is \c detail, which can be + used to explain certain expressions in more detail in a + few sentences. For \c detail, TQTextBrowser will then keep + the current page and display the new document in a small + popup similar to TQWhatsThis. Note that links will not work + in documents with \c{...}. + \i \c bgcolor -- The background color, for example \c + bgcolor="yellow" or \c bgcolor="#0000FF". + \i \c background -- The background pixmap, for example \c + background="granite.xpm". The pixmap name will be resolved + by a TQMimeSourceFactory(). + \i \c text -- The default text color, for example \c text="red". + \i \c link -- The link color, for example \c link="green". + \endlist + \row \i \c{

        ...

        } + \i A top-level heading. + \row \i \c{

        ...

        } + \i A sublevel heading. + \row \i \c{

        ...

        } + \i A sub-sublevel heading. + \row \i \c{

        ...

        } \c{
        ...
        } + \i Headings of lesser importance. + \row \i \c{

        ...

        } + \i A left-aligned paragraph. Adjust the alignment with the \c + align attribute. Possible values are \c left, \c right and + \c center. + \row \i \c{
        ...}
        \c{
        } + \i A centered paragraph. + \row \i \c{
        ...}
        \c{
        } + \i An indented paragraph that is useful for quotes. + \row \i \c{
          ...
        } + \i An unordered list. You can also pass a type argument to + define the bullet style. The default is \c type=disc; + other types are \c circle and \c square. + \row \i \c{
          ...
        } + \i An ordered list. You can also pass a type argument to + define the enumeration label style. The default is \c + type="1"; other types are \c "a" and \c "A". + \row \i \c{
      • ...
      • } + \i A list item. This tag can be used only within the context + of \c{
          } or \c{
            }. + \row \i \c{
            ...
            } + \i A list of definitions, consisting of terms and descriptions. + \row \i \c{
            ...
            } + \i A term in a list of definitions. This tag can be used only + in the context of \c{
            ...
            }. + \row \i \c{
            ...
            } + \i A description in a list of definitions. This tag can be + used only in the context of \c{
            ...
            }. + \row \i \c{
            ...
            } + \i For larger chunks of code. Whitespaces in the contents are + preserved. For small bits of code use the inline-style \c + code. + \row \i \c{
            ...
            } and \c{...} + \i Block grouping elements. These are used to structure the + document, and are often used to provide hints about the + intended presentation of the document. + \endtable + + Anchors and links are done with a single tag: + \table + \header \i Anchor tags \i Notes + \row \i \c{...} + \i An anchor or link. + \list + \i A link is created by using an \c href + attribute, for example +
            \c{Link Text}. Links to + targets within a document are achieved in the same way + as for HTML, e.g. +
            \c{Link Text}. + \i A target is created by using a \c name + attribute, for example +
            \c{

            Sub Title

            }. + \endlist + \endtable + + The default character style bindings are + \table + \header \i Style tags \i Notes + \row \i \c{...} + \i Emphasized. By default this is the same as \c{...} + (italic). + \row \i \c{...} + \i Strong. By default this is the same as \c{...} + (bold). + \row \i \c{...} + \i Italic font style. + \row \i \c{...} + \i Bold font style. + \row \i \c{...} + \i Underlined font style. + \row \i \c{...} + \i Strike out font style. + \row \i \c{...} + \i A larger font size. + \row \i \c{...} + \i A smaller font size. + \row \i \c{...} + \i Subscripted text + \row \i \c{...} + \i Superscripted text + \row \i \c{...} + \i Indicates code. By default this is the same as + \c{...} (typewriter). For larger chunks of code + use the block-tag \c{<}\c{pre>}. + \row \i \c{...} + \i Typewriter font style. + \row \i \c{...} + \i Customizes the font size, family and text color. The tag + understands the following attributes: + \list + \i \c color -- The text color, for example \c color="red" or + \c color="#FF0000". + \i \c size -- The logical size of the font. Logical sizes 1 + to 7 are supported. The value may either be absolute + (for example, \c size=3) or relative (\c size=-2). In + the latter case the sizes are simply added. + \i \c face -- The family of the font, for example \c face=times. + \endlist + \endtable + + Special elements are: + \table + \header \i Special tags \i Notes + \row \i \c{} + \i An image. The image name for the mime source factory is + given in the source attribute, for example + \c{} The image tag also understands the + attributes \c width and \c height that determine the size + of the image. If the pixmap does not fit the specified + size it will be scaled automatically (by using + TQImage::smoothScale()). +
            + The \c align attribute determines where the image is + placed. By default, an image is placed inline just like a + normal character. Specify \c left or \c right to place the + image at the respective side. + \row \i \c{
            } + \i A horizontal line. + \row \i \c{
            } + \i A line break. + \row \i \c{...} + \i No break. Prevents word wrap. + \endtable + + In addition, rich text supports simple HTML tables. A table + consists of one or more rows each of which contains one or more + cells. Cells are either data cells or header cells, depending on + their content. Cells which span rows and columns are supported. + + \table + \header \i Table tags \i Notes + \row \i \c{...
            } + \i A table. Tables support the following attributes: + \list + \i \c bgcolor -- The background color. + \i \c width -- The table width. This is either an absolute + pixel width or a relative percentage of the table's + width, for example \c width=80%. + \i \c border -- The width of the table border. The default is + 0 (= no border). + \i \c cellspacing -- Additional space around the table cells. + The default is 2. + \i \c cellpadding -- Additional space around the contents of + table cells. The default is 1. + \endlist + \row \i \c{...} + \i A table row. This is only valid within a \c table. Rows + support the following attribute: + \list + \i \c bgcolor -- The background color. + \endlist + \row \i \c{...} + \i A table header cell. Similar to \c td, but defaults to + center alignment and a bold font. + \row \i \c{...} + \i A table data cell. This is only valid within a \c tr. + Cells support the following attributes: + \list + \i \c bgcolor -- The background color. + \i \c width -- The cell width. This is either an absolute + pixel width or a relative percentage of table's width, + for example \c width=50%. + \i \c colspan -- Specifies how many columns this cell spans. + The default is 1. + \i \c rowspan -- Specifies how many rows this cell spans. The + default is 1. + \i \c align -- Alignment; possible values are \c left, \c + right, and \c center. The default is \c left. + \i \c valign -- Vertical alignment; possible values are \c + top, \c middle, and \c bottom. The default is \c middle. + \endlist + \endtable +*/ + +/*! + Creates a style sheet called \a name, with parent \a parent. Like + any TQObject it will be deleted when its parent is destroyed (if + the child still exists). + + By default the style sheet has the tag definitions defined above. +*/ +TQStyleSheet::TQStyleSheet( TQObject *parent, const char *name ) + : TQObject( parent, name ) +{ + init(); +} + +/*! + Destroys the style sheet. All styles inserted into the style sheet + will be deleted. +*/ +TQStyleSheet::~TQStyleSheet() +{ +} + +/*! + \internal + Initialized the style sheet to the basic TQt style. +*/ +void TQStyleSheet::init() +{ + styles.setAutoDelete( TRUE ); + + nullstyle = new TQStyleSheetItem( this, + TQString::fromLatin1("") ); + + TQStyleSheetItem* style; + + style = new TQStyleSheetItem( this, "qml" ); // compatibility + style->setDisplayMode( TQStyleSheetItem::DisplayBlock ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("qt") ); + style->setDisplayMode( TQStyleSheetItem::DisplayBlock ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("a") ); + style->setAnchor( TRUE ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("em") ); + style->setFontItalic( TRUE ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("i") ); + style->setFontItalic( TRUE ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("big") ); + style->setLogicalFontSizeStep( 1 ); + style = new TQStyleSheetItem( this, TQString::fromLatin1("large") ); // compatibility + style->setLogicalFontSizeStep( 1 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("small") ); + style->setLogicalFontSizeStep( -1 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("strong") ); + style->setFontWeight( TQFont::Bold); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("b") ); + style->setFontWeight( TQFont::Bold); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("h1") ); + style->setFontWeight( TQFont::Bold); + style->setLogicalFontSize(6); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginTop, 18); + style-> setMargin(TQStyleSheetItem::MarginBottom, 12); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("h2") ); + style->setFontWeight( TQFont::Bold); + style->setLogicalFontSize(5); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginTop, 16); + style-> setMargin(TQStyleSheetItem::MarginBottom, 12); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("h3") ); + style->setFontWeight( TQFont::Bold); + style->setLogicalFontSize(4); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginTop, 14); + style-> setMargin(TQStyleSheetItem::MarginBottom, 12); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("h4") ); + style->setFontWeight( TQFont::Bold); + style->setLogicalFontSize(3); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginVertical, 12); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("h5") ); + style->setFontWeight( TQFont::Bold); + style->setLogicalFontSize(2); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginTop, 12); + style-> setMargin(TQStyleSheetItem::MarginBottom, 4); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("p") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style-> setMargin(TQStyleSheetItem::MarginVertical, 12); + style->setSelfNesting( FALSE ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("center") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setAlignment( AlignCenter ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("twocolumn") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setNumberOfColumns( 2 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("multicol") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + (void) new TQStyleSheetItem( this, TQString::fromLatin1("font") ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("ul") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setListStyle( TQStyleSheetItem::ListDisc ); + style-> setMargin(TQStyleSheetItem::MarginVertical, 12); + style->setMargin( TQStyleSheetItem::MarginLeft, 40 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("ol") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setListStyle( TQStyleSheetItem::ListDecimal ); + style-> setMargin(TQStyleSheetItem::MarginVertical, 12); + style->setMargin( TQStyleSheetItem::MarginLeft, 40 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("li") ); + style->setDisplayMode(TQStyleSheetItem::DisplayListItem); + style->setSelfNesting( FALSE ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("code") ); + style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("tt") ); + style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); + + new TQStyleSheetItem(this, TQString::fromLatin1("img")); + new TQStyleSheetItem(this, TQString::fromLatin1("br")); + new TQStyleSheetItem(this, TQString::fromLatin1("hr")); + + style = new TQStyleSheetItem(this, TQString::fromLatin1("sub")); + style->setVerticalAlignment( TQStyleSheetItem::VAlignSub ); + style = new TQStyleSheetItem(this, TQString::fromLatin1("sup")); + style->setVerticalAlignment( TQStyleSheetItem::VAlignSuper ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("pre") ); + style->setFontFamily( TQString::fromLatin1("Courier New,courier") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setWhiteSpaceMode(TQStyleSheetItem::WhiteSpacePre); + style-> setMargin(TQStyleSheetItem::MarginVertical, 12); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("blockquote") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setMargin(TQStyleSheetItem::MarginHorizontal, 40 ); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("head") ); + style->setDisplayMode(TQStyleSheetItem::DisplayNone); + style = new TQStyleSheetItem( this, TQString::fromLatin1("body") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style = new TQStyleSheetItem( this, TQString::fromLatin1("div") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock) ; + style = new TQStyleSheetItem( this, TQString::fromLatin1("span") ); + style = new TQStyleSheetItem( this, TQString::fromLatin1("dl") ); + style-> setMargin(TQStyleSheetItem::MarginVertical, 8); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style = new TQStyleSheetItem( this, TQString::fromLatin1("dt") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setContexts(TQString::fromLatin1("dl") ); + style = new TQStyleSheetItem( this, TQString::fromLatin1("dd") ); + style->setDisplayMode(TQStyleSheetItem::DisplayBlock); + style->setMargin(TQStyleSheetItem::MarginLeft, 30); + style->setContexts(TQString::fromLatin1("dt dl") ); + style = new TQStyleSheetItem( this, TQString::fromLatin1("u") ); + style->setFontUnderline( TRUE); + style = new TQStyleSheetItem( this, TQString::fromLatin1("s") ); + style->setFontStrikeOut( TRUE); + style = new TQStyleSheetItem( this, TQString::fromLatin1("nobr") ); + style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpaceNoWrap ); + + // compatibily with some minor 3.0.x TQt versions that had an + // undocumented tag. ### Remove 3.1 + style = new TQStyleSheetItem( this, TQString::fromLatin1("wsp") ); + style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre ); + + // tables + style = new TQStyleSheetItem( this, TQString::fromLatin1("table") ); + style = new TQStyleSheetItem( this, TQString::fromLatin1("tr") ); + style->setContexts(TQString::fromLatin1("table")); + style = new TQStyleSheetItem( this, TQString::fromLatin1("td") ); + style->setContexts(TQString::fromLatin1("tr")); + style = new TQStyleSheetItem( this, TQString::fromLatin1("th") ); + style->setFontWeight( TQFont::Bold ); + style->setAlignment( TQt::AlignCenter ); + style->setContexts(TQString::fromLatin1("tr")); + + style = new TQStyleSheetItem( this, TQString::fromLatin1("html") ); +} + + + +static TQStyleSheet* defaultsheet = 0; +static TQSingleCleanupHandler tqt_cleanup_stylesheet; + +/*! + Returns the application-wide default style sheet. This style sheet + is used by rich text rendering classes such as TQSimpleRichText, + TQWhatsThis and TQMessageBox to define the rendering style and + available tags within rich text documents. It also serves as the + initial style sheet for the more complex render widgets, TQTextEdit + and TQTextBrowser. + + \sa setDefaultSheet() +*/ +TQStyleSheet* TQStyleSheet::defaultSheet() +{ + if (!defaultsheet) { + defaultsheet = new TQStyleSheet(); + tqt_cleanup_stylesheet.set( &defaultsheet ); + } + return defaultsheet; +} + +/*! + Sets the application-wide default style sheet to \a sheet, + deleting any style sheet previously set. The ownership is + transferred to TQStyleSheet. + + \sa defaultSheet() +*/ +void TQStyleSheet::setDefaultSheet( TQStyleSheet* sheet) +{ + if ( defaultsheet != sheet ) { + if ( defaultsheet ) + tqt_cleanup_stylesheet.reset(); + delete defaultsheet; + } + defaultsheet = sheet; + if ( defaultsheet ) + tqt_cleanup_stylesheet.set( &defaultsheet ); +} + +/*!\internal + Inserts \a style. Any tags generated after this time will be + bound to this style. Note that \a style becomes owned by the + style sheet and will be deleted when the style sheet is destroyed. +*/ +void TQStyleSheet::insert( TQStyleSheetItem* style ) +{ + styles.insert(style->name(), style); +} + + +/*! + Returns the style called \a name or 0 if there is no such style. +*/ +TQStyleSheetItem* TQStyleSheet::item( const TQString& name) +{ + if ( name.isNull() ) + return 0; + return styles[name]; +} + +/*! + \overload + + Returns the style called \a name or 0 if there is no such style + (const version) +*/ +const TQStyleSheetItem* TQStyleSheet::item( const TQString& name) const +{ + if ( name.isNull() ) + return 0; + return styles[name]; +} + + +/*! + \preliminary + + Generates an internal object for the tag called \a name, given the + attributes \a attr, and using additional information provided by + the mime source factory \a factory. + + \a context is the optional context of the document, i.e. the path + to look for relative links. This becomes important if the text + contains relative references, for example within image tags. + TQSimpleRichText always uses the default mime source factory (see + \l{TQMimeSourceFactory::defaultFactory()}) to resolve these + references. The context will then be used to calculate the + absolute path. See TQMimeSourceFactory::makeAbsolute() for details. + + \a emptyTag and \a doc are for internal use only. + + This function should not be used in application code. +*/ +#ifndef TQT_NO_TEXTCUSTOMITEM +TQTextCustomItem* TQStyleSheet::tag( const TQString& name, + const TQMap &attr, + const TQString& context, + const TQMimeSourceFactory& factory, + bool /*emptyTag */, TQTextDocument *doc ) const +{ + const TQStyleSheetItem* style = item( name ); + // first some known tags + if ( !style ) + return 0; + if ( style->name() == "img" ) + return new TQTextImage( doc, attr, context, (TQMimeSourceFactory&)factory ); + if ( style->name() == "hr" ) + return new TQTextHorizontalLine( doc, attr, context, (TQMimeSourceFactory&)factory ); + return 0; +} +#endif + + +/*! Auxiliary function. Converts the plain text string \a plain to a + rich text formatted paragraph while preserving most of its look. + + \a mode defines the whitespace mode. Possible values are \c + TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces + preserved) and \c TQStyleSheetItem::WhiteSpaceNormal (wrapping, + simplified whitespaces). + + \sa escape() +*/ +TQString TQStyleSheet::convertFromPlainText( const TQString& plain, TQStyleSheetItem::WhiteSpaceMode mode ) +{ + int col = 0; + TQString rich; + rich += "

            "; + for ( int i = 0; i < int(plain.length()); ++i ) { + if ( plain[i] == '\n' ){ + int c = 1; + while ( i+1 < int(plain.length()) && plain[i+1] == '\n' ) { + i++; + c++; + } + if ( c == 1) + rich += "
            \n"; + else { + rich += "

            \n"; + while ( --c > 1 ) + rich += "
            \n"; + rich += "

            "; + } + col = 0; + } else { + if ( mode == TQStyleSheetItem::WhiteSpacePre && plain[i] == '\t' ){ + rich += 0x00a0U; + ++col; + while ( col % 8 ) { + rich += 0x00a0U; + ++col; + } + } + else if ( mode == TQStyleSheetItem::WhiteSpacePre && plain[i].isSpace() ) + rich += 0x00a0U; + else if ( plain[i] == '<' ) + rich +="<"; + else if ( plain[i] == '>' ) + rich +=">"; + else if ( plain[i] == '&' ) + rich +="&"; + else + rich += plain[i]; + ++col; + } + } + if ( col != 0 ) + rich += "

            "; + return rich; +} + +/*! + Auxiliary function. Converts the plain text string \a plain to a + rich text formatted string with any HTML meta-characters escaped. + + \sa convertFromPlainText() +*/ +TQString TQStyleSheet::escape( const TQString& plain) +{ + TQString rich; + for ( int i = 0; i < int(plain.length()); ++i ) { + if ( plain[i] == '<' ) + rich +="<"; + else if ( plain[i] == '>' ) + rich +=">"; + else if ( plain[i] == '&' ) + rich +="&"; + else + rich += plain[i]; + } + return rich; +} + +// Must doc this enum somewhere, and it is logically related to TQStyleSheet + +/*! + \enum TQt::TextFormat + + This enum is used in widgets that can display both plain text and + rich text, e.g. TQLabel. It is used for deciding whether a text + string should be interpreted as one or the other. This is normally + done by passing one of the enum values to a setTextFormat() + function. + + \value PlainText The text string is interpreted as a plain text + string. + + \value RichText The text string is interpreted as a rich text + string using the current TQStyleSheet::defaultSheet(). + + \value AutoText The text string is interpreted as for \c RichText + if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as + \c PlainText. + + \value LogText A special, limited text format which is only used + by TQTextEdit in an optimized mode. +*/ + +/*! + Returns TRUE if the string \a text is likely to be rich text; + otherwise returns FALSE. + + This function uses a fast and therefore simple heuristic. It + mainly checks whether there is something that looks like a tag + before the first line break. Although the result may be correct + for common cases, there is no guarantee. +*/ +bool TQStyleSheet::mightBeRichText( const TQString& text) +{ + if ( text.isEmpty() ) + return FALSE; + int start = 0; + + while ( start < int(text.length()) && text[start].isSpace() ) + ++start; + if ( text.mid( start, 5 ).lower() == " + ++open; + } + if ( open < (int)text.length() && text[open] == '<' ) { + int close = text.find('>', open); + if ( close > -1 ) { + TQString tag; + for (int i = open+1; i < close; ++i) { + if ( text[i].isDigit() || text[i].isLetter() ) + tag += text[i]; + else if ( !tag.isEmpty() && text[i].isSpace() ) + break; + else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) ) + return FALSE; // that's not a tag + } + return defaultSheet()->item( tag.lower() ) != 0; + } + } + return FALSE; +} + + +/*! + \fn void TQStyleSheet::error( const TQString& msg) const + + This virtual function is called when an error occurs when + processing rich text. Reimplement it if you need to catch error + messages. + + Errors might occur if some rich text strings contain tags that are + not understood by the stylesheet, if some tags are nested + incorrectly, or if tags are not closed properly. + + \a msg is the error message. +*/ +void TQStyleSheet::error( const TQString& ) const +{ +} + + +/*! + Scales the font \a font to the appropriate physical point size + corresponding to the logical font size \a logicalSize. + + When calling this function, \a font has a point size corresponding + to the logical font size 3. + + Logical font sizes range from 1 to 7, with 1 being the smallest. + + \sa TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), TQFont::setPointSize() + */ +void TQStyleSheet::scaleFont( TQFont& font, int logicalSize ) const +{ + if ( logicalSize < 1 ) + logicalSize = 1; + if ( logicalSize > 7 ) + logicalSize = 7; + int baseSize = font.pointSize(); + bool pixel = FALSE; + if ( baseSize == -1 ) { + baseSize = font.pixelSize(); + pixel = TRUE; + } + int s; + switch ( logicalSize ) { + case 1: + s = 7*baseSize/10; + break; + case 2: + s = (8 * baseSize) / 10; + break; + case 4: + s = (12 * baseSize) / 10; + break; + case 5: + s = (15 * baseSize) / 10; + break; + case 6: + s = 2 * baseSize; + break; + case 7: + s = (24 * baseSize) / 10; + break; + default: + s = baseSize; + } + if ( pixel ) + font.setPixelSize( s ); + else + font.setPointSize( s ); +} + +#endif // TQT_NO_RICHTEXT diff --git a/src/kernel/tqstylesheet.h b/src/kernel/tqstylesheet.h new file mode 100644 index 00000000..1c12775c --- /dev/null +++ b/src/kernel/tqstylesheet.h @@ -0,0 +1,253 @@ +/**************************************************************************** +** +** Definition of the TQStyleSheet class +** +** Created : 990101 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSTYLESHEET_H +#define TQSTYLESHEET_H + +#ifndef QT_H +#include "tqstring.h" +#include "tqvaluelist.h" +#include "tqptrvector.h" +#include "ntqdict.h" +#include "tqobject.h" +#endif // QT_H + +#ifndef TQT_NO_RICHTEXT + +class TQStyleSheet; +class TQTextDocument; +template class TQMap; +class TQStyleSheetItemData; + +class TQ_EXPORT TQStyleSheetItem : public TQt +{ +public: + TQStyleSheetItem( TQStyleSheet* parent, const TQString& name ); + TQStyleSheetItem( const TQStyleSheetItem & ); + ~TQStyleSheetItem(); + + TQStyleSheetItem& operator=( const TQStyleSheetItem& other ); + + TQString name() const; + + TQStyleSheet* styleSheet(); + const TQStyleSheet* styleSheet() const; + + enum AdditionalStyleValues { Undefined = - 1}; + + enum DisplayMode { + DisplayBlock, + DisplayInline, + DisplayListItem, + DisplayNone +#ifndef Q_QDOC + , DisplayModeUndefined = -1 +#endif + }; + + DisplayMode displayMode() const; + void setDisplayMode(DisplayMode m); + + int alignment() const; + void setAlignment( int f); + + enum VerticalAlignment { + VAlignBaseline, + VAlignSub, + VAlignSuper + }; + + VerticalAlignment verticalAlignment() const; + void setVerticalAlignment( VerticalAlignment valign ); + + int fontWeight() const; + void setFontWeight(int w); + + int logicalFontSize() const; + void setLogicalFontSize(int s); + + int logicalFontSizeStep() const; + void setLogicalFontSizeStep( int s ); + + int fontSize() const; + void setFontSize(int s); + + TQString fontFamily() const; + void setFontFamily( const TQString& ); + + int numberOfColumns() const; + void setNumberOfColumns(int ncols); + + TQColor color() const; + void setColor( const TQColor &); + + bool fontItalic() const; + void setFontItalic( bool ); + bool definesFontItalic() const; + + bool fontUnderline() const; + void setFontUnderline( bool ); + bool definesFontUnderline() const; + + bool fontStrikeOut() const; + void setFontStrikeOut( bool ); + bool definesFontStrikeOut() const; + + bool isAnchor() const; + void setAnchor(bool anc); + + enum WhiteSpaceMode { + WhiteSpaceNormal, + WhiteSpacePre, + WhiteSpaceNoWrap +#ifndef Q_QDOC + , WhiteSpaceModeUndefined = -1 +#endif + }; + WhiteSpaceMode whiteSpaceMode() const; + void setWhiteSpaceMode(WhiteSpaceMode m); + + enum Margin { + MarginLeft, + MarginRight, + MarginTop, + MarginBottom, + MarginFirstLine, + MarginAll, + MarginVertical, + MarginHorizontal +#ifndef Q_QDOC + , MarginUndefined = -1 +#endif + }; + + int margin( Margin m) const; + void setMargin( Margin, int); + + enum ListStyle { + ListDisc, + ListCircle, + ListSquare, + ListDecimal, + ListLowerAlpha, + ListUpperAlpha +#ifndef Q_QDOC + , ListStyleUndefined = -1 +#endif + }; + + ListStyle listStyle() const; + void setListStyle( ListStyle ); + + TQString contexts() const; + void setContexts( const TQString& ); + bool allowedInContext( const TQStyleSheetItem* ) const; + + bool selfNesting() const; + void setSelfNesting( bool ); + + void setLineSpacing( int ls ); + int lineSpacing() const; + +private: + void init(); + TQStyleSheetItemData* d; +}; + + +#if defined(Q_TEMPLATEDLL) +// MOC_SKIP_BEGIN +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector >; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +// MOC_SKIP_END +#endif + +#ifndef TQT_NO_TEXTCUSTOMITEM +class TQTextCustomItem; +#endif + +class TQ_EXPORT TQStyleSheet : public TQObject +{ + TQ_OBJECT +public: + TQStyleSheet( TQObject *parent=0, const char *name=0 ); + virtual ~TQStyleSheet(); + + static TQStyleSheet* defaultSheet(); + static void setDefaultSheet( TQStyleSheet* ); + + + TQStyleSheetItem* item( const TQString& name); + const TQStyleSheetItem* item( const TQString& name) const; + + void insert( TQStyleSheetItem* item); + +#ifndef TQT_NO_TEXTCUSTOMITEM + virtual TQTextCustomItem* tag( const TQString& name, + const TQMap &attr, + const TQString& context, + const TQMimeSourceFactory& factory, + bool emptyTag, TQTextDocument *doc ) const; +#endif + static TQString escape( const TQString& ); + static TQString convertFromPlainText( const TQString&, + TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre ); + static bool mightBeRichText( const TQString& ); + + virtual void scaleFont( TQFont& font, int logicalSize ) const; + + virtual void error( const TQString& ) const; + +private: + void init(); + TQDict styles; + TQStyleSheetItem* nullstyle; +private: // Disabled copy constructor and operator= +#if defined(TQ_DISABLE_COPY) + TQStyleSheet( const TQStyleSheet & ); + TQStyleSheet &operator=( const TQStyleSheet & ); +#endif +}; + +#endif // TQT_NO_RICHTEXT + +#endif // TQSTYLESHEET_H diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp index 118429a1..f4f1a8b1 100644 --- a/src/kernel/tqwidget.cpp +++ b/src/kernel/tqwidget.cpp @@ -51,9 +51,9 @@ #include "qapplication_p.h" #include "ntqbrush.h" #include "ntqlayout.h" -#include "ntqstylefactory.h" +#include "tqstylefactory.h" #include "ntqcleanuphandler.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqmetaobject.h" #include "ntqguardedptr.h" #if defined(TQT_THREAD_SUPPORT) diff --git a/src/qt.pro b/src/qt.pro index e359ea36..5d23a6b8 100644 --- a/src/qt.pro +++ b/src/qt.pro @@ -181,14 +181,14 @@ wince-* { HEADERS -= $$TOOLS_CPP/qcomlibrary.h \ $$KERNEL_CPP/ntqgplugin.h \ $$KERNEL_CPP/tqimageformatplugin.h \ - $$STYLES_CPP/ntqstyleplugin.h \ + $$STYLES_CPP/tqstyleplugin.h \ $$CODECS_CPP/tqtextcodecplugin.h \ $$WIDGETS_CPP/tqwidgetplugin.h SOURCES -= $$TOOLS_CPP/qcomlibrary.cpp \ $$KERNEL_CPP/qgplugin.cpp \ $$KERNEL_CPP/tqimageformatplugin.cpp \ - $$STYLES_CPP/qstyleplugin.cpp \ + $$STYLES_CPP/tqstyleplugin.cpp \ $$CODECS_CPP/tqtextcodecplugin.cpp \ $$WIDGETS_CPP/tqwidgetplugin.cpp } diff --git a/src/styles/ntqcommonstyle.h b/src/styles/ntqcommonstyle.h index 47edfe2c..705177d7 100644 --- a/src/styles/ntqcommonstyle.h +++ b/src/styles/ntqcommonstyle.h @@ -42,7 +42,7 @@ #define TQCOMMONSTYLE_H #ifndef QT_H -#include "ntqstyle.h" +#include "tqstyle.h" #endif // QT_H #ifndef TQT_NO_STYLE diff --git a/src/styles/ntqstylefactory.h b/src/styles/ntqstylefactory.h deleted file mode 100644 index bfab3153..00000000 --- a/src/styles/ntqstylefactory.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** ... -** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSTYLEFACTORY_H -#define TQSTYLEFACTORY_H - -#ifndef QT_H -#include "tqstringlist.h" -#endif // QT_H - -#ifndef TQT_NO_STYLE - -class TQString; -class TQStyle; - -class TQ_EXPORT TQStyleFactory -{ -public: -#ifndef TQT_NO_STRINGLIST - static TQStringList keys(); -#endif - static TQStyle *create( const TQString& ); -}; - -#endif //TQT_NO_STYLE - -#endif //TQSTYLEFACTORY_H diff --git a/src/styles/ntqstyleplugin.h b/src/styles/ntqstyleplugin.h deleted file mode 100644 index 13d83c45..00000000 --- a/src/styles/ntqstyleplugin.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Definition of TQStylePlugin class -** -** Created : 010920 -** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSTYLEPLUGIN_H -#define TQSTYLEPLUGIN_H - -#ifndef QT_H -#include "ntqgplugin.h" -#include "tqstringlist.h" -#endif // QT_H - -#ifndef TQT_NO_STYLE -#ifndef TQT_NO_COMPONENT - -class TQStyle; -class TQStylePluginPrivate; - -class TQ_EXPORT TQStylePlugin : public TQGPlugin -{ - TQ_OBJECT -public: - TQStylePlugin(); - ~TQStylePlugin(); - - virtual TQStringList keys() const = 0; - virtual TQStyle *create( const TQString &key ) = 0; - -private: - TQStylePluginPrivate *d; -}; - -#endif // TQT_NO_COMPONENT -#endif // TQT_NO_STYLE - -#endif // TQSTYLEPLUGIN_H diff --git a/src/styles/qstylefactory.cpp b/src/styles/qstylefactory.cpp deleted file mode 100644 index cf494018..00000000 --- a/src/styles/qstylefactory.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQStyleFactory class -** -** Created : 001103 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "qstyleinterface_p.h" // up here for GCC 2.7.* compatibility -#include "ntqstylefactory.h" - -#ifndef TQT_NO_STYLE - -#include "ntqapplication.h" -#include "ntqwindowsstyle.h" -#include "ntqmotifstyle.h" -#include "ntqcdestyle.h" -#include "ntqmotifplusstyle.h" -#include "ntqplatinumstyle.h" -#include "ntqsgistyle.h" -#include "ntqcompactstyle.h" -#ifndef TQT_NO_STYLE_WINDOWSXP -#include "qwindowsxpstyle.h" -#endif -#ifndef TQT_NO_STYLE_AQUA -#include "qaquastyle.h" -#endif -#ifndef TQT_NO_STYLE_POCKETPC -#include "qpocketpcstyle_wce.h" -#endif - -#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) -TQString p2qstring(const unsigned char *c); //qglobal.cpp -#include "qt_mac.h" -#include "qmacstyle_mac.h" -#endif -#include - -#include -#ifndef TQT_NO_COMPONENT -class TQStyleFactoryPrivate : public TQObject -{ -public: - TQStyleFactoryPrivate(); - ~TQStyleFactoryPrivate(); - - static TQPluginManager *manager; -}; - -static TQStyleFactoryPrivate *instance = 0; -TQPluginManager *TQStyleFactoryPrivate::manager = 0; - -TQStyleFactoryPrivate::TQStyleFactoryPrivate() -: TQObject( tqApp ) -{ - manager = new TQPluginManager( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE ); -} - -TQStyleFactoryPrivate::~TQStyleFactoryPrivate() -{ - delete manager; - manager = 0; - - instance = 0; -} - -#endif //TQT_NO_COMPONENT - -/*! - \class TQStyleFactory ntqstylefactory.h - \brief The TQStyleFactory class creates TQStyle objects. - - The style factory creates a TQStyle object for a given key with - TQStyleFactory::create(key). - - The styles are either built-in or dynamically loaded from a style - plugin (see \l TQStylePlugin). - - TQStyleFactory::keys() returns a list of valid keys, typically - including "Windows", "Motif", "CDE", "MotifPlus", "Platinum", - "SGI" and "Compact". Depending on the platform, "WindowsXP", - "Aqua" or "Macintosh" may be available. -*/ - -/*! - Creates a TQStyle object that matches \a key case-insensitively. - This is either a built-in style, or a style from a style plugin. - - \sa keys() -*/ -TQStyle *TQStyleFactory::create( const TQString& key ) -{ - TQStyle *ret = 0; - TQString style = key.lower(); -#ifndef TQT_NO_STYLE_WINDOWS - if ( style == "windows" ) - ret = new TQWindowsStyle; - else -#endif -#ifndef TQT_NO_STYLE_WINDOWSXP - if ( style == "windowsxp" ) - ret = new TQWindowsXPStyle; - else -#endif -#ifndef TQT_NO_STYLE_MOTIF - if ( style == "motif" ) - ret = new TQMotifStyle; - else -#endif -#ifndef TQT_NO_STYLE_CDE - if ( style == "cde" ) - ret = new TQCDEStyle; - else -#endif -#ifndef TQT_NO_STYLE_MOTIFPLUS - if ( style == "motifplus" ) - ret = new TQMotifPlusStyle; - else -#endif -#ifndef TQT_NO_STYLE_PLATINUM - if ( style == "platinum" ) - ret = new TQPlatinumStyle; - else -#endif -#ifndef TQT_NO_STYLE_SGI - if ( style == "sgi") - ret = new TQSGIStyle; - else -#endif -#ifndef TQT_NO_STYLE_COMPACT - if ( style == "compact" ) - ret = new TQCompactStyle; - else -#endif -#ifndef TQT_NO_STYLE_AQUA - if ( style == "aqua" ) - ret = new TQAquaStyle; -#endif -#ifndef TQT_NO_STYLE_POCKETPC - if ( style == "pocketpc" ) - ret = new TQPocketPCStyle; -#endif -#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) - if( style.left(9) == "macintosh" ) - ret = new TQMacStyle; -#endif - { } // Keep these here - they make the #ifdefery above work - -#ifndef TQT_NO_COMPONENT - if(!ret) { - if ( !instance ) - instance = new TQStyleFactoryPrivate; - - TQInterfacePtr iface; - TQStyleFactoryPrivate::manager->queryInterface( style, &iface ); - - if ( iface ) - ret = iface->create( style ); - } - if(ret) - ret->setName(key); -#endif - return ret; -} - -#ifndef TQT_NO_STRINGLIST -/*! - Returns the list of keys this factory can create styles for. - - \sa create() -*/ -TQStringList TQStyleFactory::keys() -{ - TQStringList list; -#ifndef TQT_NO_COMPONENT - if ( !instance ) - instance = new TQStyleFactoryPrivate; - - list = TQStyleFactoryPrivate::manager->featureList(); -#endif //TQT_NO_COMPONENT - -#ifndef TQT_NO_STYLE_WINDOWS - if ( !list.contains( "Windows" ) ) - list << "Windows"; -#endif -#ifndef TQT_NO_STYLE_WINDOWSXP - if ( !list.contains( "WindowsXP" ) && TQWindowsXPStyle::resolveSymbols() ) - list << "WindowsXP"; -#endif -#ifndef TQT_NO_STYLE_MOTIF - if ( !list.contains( "Motif" ) ) - list << "Motif"; -#endif -#ifndef TQT_NO_STYLE_CDE - if ( !list.contains( "CDE" ) ) - list << "CDE"; -#endif -#ifndef TQT_NO_STYLE_MOTIFPLUS - if ( !list.contains( "MotifPlus" ) ) - list << "MotifPlus"; -#endif -#ifndef TQT_NO_STYLE_PLATINUM - if ( !list.contains( "Platinum" ) ) - list << "Platinum"; -#endif -#ifndef TQT_NO_STYLE_SGI - if ( !list.contains( "SGI" ) ) - list << "SGI"; -#endif -#ifndef TQT_NO_STYLE_COMPACT - if ( !list.contains( "Compact" ) ) - list << "Compact"; -#endif -#ifndef TQT_NO_STYLE_AQUA - if ( !list.contains( "Aqua" ) ) - list << "Aqua"; -#endif -#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) - TQString mstyle = "Macintosh"; - Collection c = NewCollection(); - if (c) { - GetTheme(c); - Str255 str; - long int s = 256; - if(!GetCollectionItem(c, kThemeNameTag, 0, &s, &str)) - mstyle += " (" + p2qstring(str) + ")"; - } - if (!list.contains(mstyle)) - list << mstyle; - DisposeCollection(c); -#endif - - return list; -} -#endif -#endif // TQT_NO_STYLE diff --git a/src/styles/qstyleinterface_p.h b/src/styles/qstyleinterface_p.h deleted file mode 100644 index 500dcfef..00000000 --- a/src/styles/qstyleinterface_p.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** ... -** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSTYLEINTERFACE_P_H -#define TQSTYLEINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the TQt API. This header file may -// change from version to version without notice, or even be -// removed. -// -// We mean it. -// -// - -#ifndef QT_H -#include -#endif // QT_H - -#ifndef TQT_NO_STYLE -#ifndef TQT_NO_COMPONENT - -class TQStyle; - -// {FC1B6EBE-053C-49c1-A483-C377739AB9A5} -#ifndef IID_QStyleFactory -#define IID_QStyleFactory TQUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5) -#endif - -struct TQ_EXPORT TQStyleFactoryInterface : public TQFeatureListInterface -{ - virtual TQStyle* create( const TQString& style ) = 0; -}; - -#endif //TQT_NO_COMPONENT -#endif //TQT_NO_STYLE - -#endif //TQSTYLEINTERFACE_P_H diff --git a/src/styles/qstyleplugin.cpp b/src/styles/qstyleplugin.cpp deleted file mode 100644 index 2650708c..00000000 --- a/src/styles/qstyleplugin.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQSqlDriverPlugin class -** -** Created : 010920 -** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqstyleplugin.h" - -#ifndef TQT_NO_STYLE -#ifndef TQT_NO_COMPONENT - -#include "qstyleinterface_p.h" -#include "tqobjectcleanuphandler.h" -#include "ntqstyle.h" - -/*! - \class TQStylePlugin ntqstyleplugin.h - \brief The TQStylePlugin class provides an abstract base for custom TQStyle plugins. - - \ingroup plugins - - The style plugin is a simple plugin interface that makes it easy - to create custom styles that can be loaded dynamically into - applications with a TQStyleFactory. - - Writing a style plugin is achieved by subclassing this base class, - reimplementing the pure virtual functions keys() and create(), and - exporting the class with the \c TQ_EXPORT_PLUGIN macro. See the - \link plugins-howto.html plugins documentation\endlink for an - example. -*/ - -/*! - \fn TQStringList TQStylePlugin::keys() const - - Returns the list of style keys this plugin supports. - - These keys are usually the class names of the custom styles that - are implemented in the plugin. - - \sa create() -*/ - -/*! - \fn TQStyle* TQStylePlugin::create( const TQString& key ) - - Creates and returns a TQStyle object for the style key \a key. The - style key is usually the class name of the required style. - - \sa keys() -*/ - -class TQStylePluginPrivate : public TQStyleFactoryInterface, public TQLibraryInterface -{ -public: - TQStylePluginPrivate( TQStylePlugin *p ) - : plugin( p ) - { - } - - virtual ~TQStylePluginPrivate(); - - TQRESULT queryInterface( const TQUuid &iid, TQUnknownInterface **iface ); - TQ_REFCOUNT; - - TQStringList featureList() const; - TQStyle *create( const TQString &key ); - - bool init(); - void cleanup(); - bool canUnload() const; - -private: - TQStylePlugin *plugin; - TQObjectCleanupHandler styles; -}; - -TQRESULT TQStylePluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface ) -{ - *iface = 0; - - if ( iid == IID_QUnknown ) - *iface = (TQStyleFactoryInterface*)this; - else if ( iid == IID_QFeatureList ) - *iface = (TQFeatureListInterface*)this; - else if ( iid == IID_QStyleFactory ) - *iface = (TQStyleFactoryInterface*)this; - else if ( iid == IID_QLibrary ) - *iface = (TQLibraryInterface*) this; - else - return TQE_NOINTERFACE; - - (*iface)->addRef(); - return TQS_OK; -} - -TQStylePluginPrivate::~TQStylePluginPrivate() -{ - delete plugin; -} - -TQStringList TQStylePluginPrivate::featureList() const -{ - return plugin->keys(); -} - -TQStyle *TQStylePluginPrivate::create( const TQString &key ) -{ - TQStyle *st = plugin->create( key ); - styles.add( st ); - return st; -} - -bool TQStylePluginPrivate::init() -{ - return TRUE; -} - -void TQStylePluginPrivate::cleanup() -{ - styles.clear(); -} - -bool TQStylePluginPrivate::canUnload() const -{ - return styles.isEmpty(); -} - - -/*! - Constructs a style plugin. This is invoked automatically by the - \c TQ_EXPORT_PLUGIN macro. -*/ -TQStylePlugin::TQStylePlugin() - : TQGPlugin( (TQStyleFactoryInterface*)(d = new TQStylePluginPrivate( this )) ) -{ -} - -/*! - Destroys the style plugin. - - You never have to call this explicitly. TQt destroys a plugin - automatically when it is no longer used. -*/ -TQStylePlugin::~TQStylePlugin() -{ - // don't delete d, as this is deleted by d -} - -#endif // TQT_NO_COMPONENT -#endif // TQT_NO_STYLE diff --git a/src/styles/qt_styles.pri b/src/styles/qt_styles.pri index 7eb9e5bc..81269072 100644 --- a/src/styles/qt_styles.pri +++ b/src/styles/qt_styles.pri @@ -2,12 +2,12 @@ styles { STYLES_P = styles - HEADERS +=$$STYLES_H/ntqstylefactory.h \ - $$STYLES_P/qstyleinterface_p.h \ - $$STYLES_H/ntqstyleplugin.h \ + HEADERS +=$$STYLES_H/tqstylefactory.h \ + $$STYLES_P/tqstyleinterface_p.h \ + $$STYLES_H/tqstyleplugin.h \ $$STYLES_H/ntqcommonstyle.h - SOURCES +=$$STYLES_CPP/qstylefactory.cpp \ - $$STYLES_CPP/qstyleplugin.cpp \ + SOURCES +=$$STYLES_CPP/tqstylefactory.cpp \ + $$STYLES_CPP/tqstyleplugin.cpp \ $$STYLES_CPP/qcommonstyle.cpp contains( styles, all ) { diff --git a/src/styles/tqstylefactory.cpp b/src/styles/tqstylefactory.cpp new file mode 100644 index 00000000..d87794f9 --- /dev/null +++ b/src/styles/tqstylefactory.cpp @@ -0,0 +1,268 @@ +/**************************************************************************** +** +** Implementation of TQStyleFactory class +** +** Created : 001103 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqstyleinterface_p.h" // up here for GCC 2.7.* compatibility +#include "tqstylefactory.h" + +#ifndef TQT_NO_STYLE + +#include "ntqapplication.h" +#include "ntqwindowsstyle.h" +#include "ntqmotifstyle.h" +#include "ntqcdestyle.h" +#include "ntqmotifplusstyle.h" +#include "ntqplatinumstyle.h" +#include "ntqsgistyle.h" +#include "ntqcompactstyle.h" +#ifndef TQT_NO_STYLE_WINDOWSXP +#include "qwindowsxpstyle.h" +#endif +#ifndef TQT_NO_STYLE_AQUA +#include "qaquastyle.h" +#endif +#ifndef TQT_NO_STYLE_POCKETPC +#include "qpocketpcstyle_wce.h" +#endif + +#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) +TQString p2qstring(const unsigned char *c); //qglobal.cpp +#include "qt_mac.h" +#include "qmacstyle_mac.h" +#endif +#include + +#include +#ifndef TQT_NO_COMPONENT +class TQStyleFactoryPrivate : public TQObject +{ +public: + TQStyleFactoryPrivate(); + ~TQStyleFactoryPrivate(); + + static TQPluginManager *manager; +}; + +static TQStyleFactoryPrivate *instance = 0; +TQPluginManager *TQStyleFactoryPrivate::manager = 0; + +TQStyleFactoryPrivate::TQStyleFactoryPrivate() +: TQObject( tqApp ) +{ + manager = new TQPluginManager( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE ); +} + +TQStyleFactoryPrivate::~TQStyleFactoryPrivate() +{ + delete manager; + manager = 0; + + instance = 0; +} + +#endif //TQT_NO_COMPONENT + +/*! + \class TQStyleFactory tqstylefactory.h + \brief The TQStyleFactory class creates TQStyle objects. + + The style factory creates a TQStyle object for a given key with + TQStyleFactory::create(key). + + The styles are either built-in or dynamically loaded from a style + plugin (see \l TQStylePlugin). + + TQStyleFactory::keys() returns a list of valid keys, typically + including "Windows", "Motif", "CDE", "MotifPlus", "Platinum", + "SGI" and "Compact". Depending on the platform, "WindowsXP", + "Aqua" or "Macintosh" may be available. +*/ + +/*! + Creates a TQStyle object that matches \a key case-insensitively. + This is either a built-in style, or a style from a style plugin. + + \sa keys() +*/ +TQStyle *TQStyleFactory::create( const TQString& key ) +{ + TQStyle *ret = 0; + TQString style = key.lower(); +#ifndef TQT_NO_STYLE_WINDOWS + if ( style == "windows" ) + ret = new TQWindowsStyle; + else +#endif +#ifndef TQT_NO_STYLE_WINDOWSXP + if ( style == "windowsxp" ) + ret = new TQWindowsXPStyle; + else +#endif +#ifndef TQT_NO_STYLE_MOTIF + if ( style == "motif" ) + ret = new TQMotifStyle; + else +#endif +#ifndef TQT_NO_STYLE_CDE + if ( style == "cde" ) + ret = new TQCDEStyle; + else +#endif +#ifndef TQT_NO_STYLE_MOTIFPLUS + if ( style == "motifplus" ) + ret = new TQMotifPlusStyle; + else +#endif +#ifndef TQT_NO_STYLE_PLATINUM + if ( style == "platinum" ) + ret = new TQPlatinumStyle; + else +#endif +#ifndef TQT_NO_STYLE_SGI + if ( style == "sgi") + ret = new TQSGIStyle; + else +#endif +#ifndef TQT_NO_STYLE_COMPACT + if ( style == "compact" ) + ret = new TQCompactStyle; + else +#endif +#ifndef TQT_NO_STYLE_AQUA + if ( style == "aqua" ) + ret = new TQAquaStyle; +#endif +#ifndef TQT_NO_STYLE_POCKETPC + if ( style == "pocketpc" ) + ret = new TQPocketPCStyle; +#endif +#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) + if( style.left(9) == "macintosh" ) + ret = new TQMacStyle; +#endif + { } // Keep these here - they make the #ifdefery above work + +#ifndef TQT_NO_COMPONENT + if(!ret) { + if ( !instance ) + instance = new TQStyleFactoryPrivate; + + TQInterfacePtr iface; + TQStyleFactoryPrivate::manager->queryInterface( style, &iface ); + + if ( iface ) + ret = iface->create( style ); + } + if(ret) + ret->setName(key); +#endif + return ret; +} + +#ifndef TQT_NO_STRINGLIST +/*! + Returns the list of keys this factory can create styles for. + + \sa create() +*/ +TQStringList TQStyleFactory::keys() +{ + TQStringList list; +#ifndef TQT_NO_COMPONENT + if ( !instance ) + instance = new TQStyleFactoryPrivate; + + list = TQStyleFactoryPrivate::manager->featureList(); +#endif //TQT_NO_COMPONENT + +#ifndef TQT_NO_STYLE_WINDOWS + if ( !list.contains( "Windows" ) ) + list << "Windows"; +#endif +#ifndef TQT_NO_STYLE_WINDOWSXP + if ( !list.contains( "WindowsXP" ) && TQWindowsXPStyle::resolveSymbols() ) + list << "WindowsXP"; +#endif +#ifndef TQT_NO_STYLE_MOTIF + if ( !list.contains( "Motif" ) ) + list << "Motif"; +#endif +#ifndef TQT_NO_STYLE_CDE + if ( !list.contains( "CDE" ) ) + list << "CDE"; +#endif +#ifndef TQT_NO_STYLE_MOTIFPLUS + if ( !list.contains( "MotifPlus" ) ) + list << "MotifPlus"; +#endif +#ifndef TQT_NO_STYLE_PLATINUM + if ( !list.contains( "Platinum" ) ) + list << "Platinum"; +#endif +#ifndef TQT_NO_STYLE_SGI + if ( !list.contains( "SGI" ) ) + list << "SGI"; +#endif +#ifndef TQT_NO_STYLE_COMPACT + if ( !list.contains( "Compact" ) ) + list << "Compact"; +#endif +#ifndef TQT_NO_STYLE_AQUA + if ( !list.contains( "Aqua" ) ) + list << "Aqua"; +#endif +#if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) + TQString mstyle = "Macintosh"; + Collection c = NewCollection(); + if (c) { + GetTheme(c); + Str255 str; + long int s = 256; + if(!GetCollectionItem(c, kThemeNameTag, 0, &s, &str)) + mstyle += " (" + p2qstring(str) + ")"; + } + if (!list.contains(mstyle)) + list << mstyle; + DisposeCollection(c); +#endif + + return list; +} +#endif +#endif // TQT_NO_STYLE diff --git a/src/styles/tqstylefactory.h b/src/styles/tqstylefactory.h new file mode 100644 index 00000000..bfab3153 --- /dev/null +++ b/src/styles/tqstylefactory.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** ... +** +** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSTYLEFACTORY_H +#define TQSTYLEFACTORY_H + +#ifndef QT_H +#include "tqstringlist.h" +#endif // QT_H + +#ifndef TQT_NO_STYLE + +class TQString; +class TQStyle; + +class TQ_EXPORT TQStyleFactory +{ +public: +#ifndef TQT_NO_STRINGLIST + static TQStringList keys(); +#endif + static TQStyle *create( const TQString& ); +}; + +#endif //TQT_NO_STYLE + +#endif //TQSTYLEFACTORY_H diff --git a/src/styles/tqstyleinterface_p.h b/src/styles/tqstyleinterface_p.h new file mode 100644 index 00000000..500dcfef --- /dev/null +++ b/src/styles/tqstyleinterface_p.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** ... +** +** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSTYLEINTERFACE_P_H +#define TQSTYLEINTERFACE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the TQt API. This header file may +// change from version to version without notice, or even be +// removed. +// +// We mean it. +// +// + +#ifndef QT_H +#include +#endif // QT_H + +#ifndef TQT_NO_STYLE +#ifndef TQT_NO_COMPONENT + +class TQStyle; + +// {FC1B6EBE-053C-49c1-A483-C377739AB9A5} +#ifndef IID_QStyleFactory +#define IID_QStyleFactory TQUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5) +#endif + +struct TQ_EXPORT TQStyleFactoryInterface : public TQFeatureListInterface +{ + virtual TQStyle* create( const TQString& style ) = 0; +}; + +#endif //TQT_NO_COMPONENT +#endif //TQT_NO_STYLE + +#endif //TQSTYLEINTERFACE_P_H diff --git a/src/styles/tqstyleplugin.cpp b/src/styles/tqstyleplugin.cpp new file mode 100644 index 00000000..50e0e684 --- /dev/null +++ b/src/styles/tqstyleplugin.cpp @@ -0,0 +1,185 @@ +/**************************************************************************** +** +** Implementation of TQSqlDriverPlugin class +** +** Created : 010920 +** +** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqstyleplugin.h" + +#ifndef TQT_NO_STYLE +#ifndef TQT_NO_COMPONENT + +#include "tqstyleinterface_p.h" +#include "tqobjectcleanuphandler.h" +#include "tqstyle.h" + +/*! + \class TQStylePlugin tqstyleplugin.h + \brief The TQStylePlugin class provides an abstract base for custom TQStyle plugins. + + \ingroup plugins + + The style plugin is a simple plugin interface that makes it easy + to create custom styles that can be loaded dynamically into + applications with a TQStyleFactory. + + Writing a style plugin is achieved by subclassing this base class, + reimplementing the pure virtual functions keys() and create(), and + exporting the class with the \c TQ_EXPORT_PLUGIN macro. See the + \link plugins-howto.html plugins documentation\endlink for an + example. +*/ + +/*! + \fn TQStringList TQStylePlugin::keys() const + + Returns the list of style keys this plugin supports. + + These keys are usually the class names of the custom styles that + are implemented in the plugin. + + \sa create() +*/ + +/*! + \fn TQStyle* TQStylePlugin::create( const TQString& key ) + + Creates and returns a TQStyle object for the style key \a key. The + style key is usually the class name of the required style. + + \sa keys() +*/ + +class TQStylePluginPrivate : public TQStyleFactoryInterface, public TQLibraryInterface +{ +public: + TQStylePluginPrivate( TQStylePlugin *p ) + : plugin( p ) + { + } + + virtual ~TQStylePluginPrivate(); + + TQRESULT queryInterface( const TQUuid &iid, TQUnknownInterface **iface ); + TQ_REFCOUNT; + + TQStringList featureList() const; + TQStyle *create( const TQString &key ); + + bool init(); + void cleanup(); + bool canUnload() const; + +private: + TQStylePlugin *plugin; + TQObjectCleanupHandler styles; +}; + +TQRESULT TQStylePluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface ) +{ + *iface = 0; + + if ( iid == IID_QUnknown ) + *iface = (TQStyleFactoryInterface*)this; + else if ( iid == IID_QFeatureList ) + *iface = (TQFeatureListInterface*)this; + else if ( iid == IID_QStyleFactory ) + *iface = (TQStyleFactoryInterface*)this; + else if ( iid == IID_QLibrary ) + *iface = (TQLibraryInterface*) this; + else + return TQE_NOINTERFACE; + + (*iface)->addRef(); + return TQS_OK; +} + +TQStylePluginPrivate::~TQStylePluginPrivate() +{ + delete plugin; +} + +TQStringList TQStylePluginPrivate::featureList() const +{ + return plugin->keys(); +} + +TQStyle *TQStylePluginPrivate::create( const TQString &key ) +{ + TQStyle *st = plugin->create( key ); + styles.add( st ); + return st; +} + +bool TQStylePluginPrivate::init() +{ + return TRUE; +} + +void TQStylePluginPrivate::cleanup() +{ + styles.clear(); +} + +bool TQStylePluginPrivate::canUnload() const +{ + return styles.isEmpty(); +} + + +/*! + Constructs a style plugin. This is invoked automatically by the + \c TQ_EXPORT_PLUGIN macro. +*/ +TQStylePlugin::TQStylePlugin() + : TQGPlugin( (TQStyleFactoryInterface*)(d = new TQStylePluginPrivate( this )) ) +{ +} + +/*! + Destroys the style plugin. + + You never have to call this explicitly. TQt destroys a plugin + automatically when it is no longer used. +*/ +TQStylePlugin::~TQStylePlugin() +{ + // don't delete d, as this is deleted by d +} + +#endif // TQT_NO_COMPONENT +#endif // TQT_NO_STYLE diff --git a/src/styles/tqstyleplugin.h b/src/styles/tqstyleplugin.h new file mode 100644 index 00000000..13d83c45 --- /dev/null +++ b/src/styles/tqstyleplugin.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Definition of TQStylePlugin class +** +** Created : 010920 +** +** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSTYLEPLUGIN_H +#define TQSTYLEPLUGIN_H + +#ifndef QT_H +#include "ntqgplugin.h" +#include "tqstringlist.h" +#endif // QT_H + +#ifndef TQT_NO_STYLE +#ifndef TQT_NO_COMPONENT + +class TQStyle; +class TQStylePluginPrivate; + +class TQ_EXPORT TQStylePlugin : public TQGPlugin +{ + TQ_OBJECT +public: + TQStylePlugin(); + ~TQStylePlugin(); + + virtual TQStringList keys() const = 0; + virtual TQStyle *create( const TQString &key ) = 0; + +private: + TQStylePluginPrivate *d; +}; + +#endif // TQT_NO_COMPONENT +#endif // TQT_NO_STYLE + +#endif // TQSTYLEPLUGIN_H diff --git a/src/table/qtable.cpp b/src/table/qtable.cpp index 5d6e27bf..a63a3392 100644 --- a/src/table/qtable.cpp +++ b/src/table/qtable.cpp @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/tools/qfeatures.txt b/src/tools/qfeatures.txt index b2c88279..b8e08532 100644 --- a/src/tools/qfeatures.txt +++ b/src/tools/qfeatures.txt @@ -783,7 +783,7 @@ SeeAlso: ??? Feature: STYLE Section: Widgets Requires: DRAWUTIL -Name: QStyle +Name: TQStyle SeeAlso: ??? Feature: WIDGET_TOPEXTRA diff --git a/src/widgets/qcheckbox.cpp b/src/widgets/qcheckbox.cpp index 0ef6529b..390a5b5c 100644 --- a/src/widgets/qcheckbox.cpp +++ b/src/widgets/qcheckbox.cpp @@ -47,7 +47,7 @@ #include "ntqbitmap.h" #include "tqtextstream.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" /*! \class TQCheckBox ntqcheckbox.h diff --git a/src/widgets/qcombobox.cpp b/src/widgets/qcombobox.cpp index ad2cb9df..e8c1e28e 100644 --- a/src/widgets/qcombobox.cpp +++ b/src/widgets/qcombobox.cpp @@ -53,7 +53,7 @@ #include "qeffects_p.h" #include "tqstringlist.h" #include "ntqcombobox.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" diff --git a/src/widgets/qdatetimeedit.cpp b/src/widgets/qdatetimeedit.cpp index 98be1d2a..ce74b33a 100644 --- a/src/widgets/qdatetimeedit.cpp +++ b/src/widgets/qdatetimeedit.cpp @@ -50,7 +50,7 @@ #include "ntqapplication.h" #include "tqvaluelist.h" #include "tqstring.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(TQ_WS_WIN) #include "qt_windows.h" diff --git a/src/widgets/qdial.cpp b/src/widgets/qdial.cpp index 36fdbb9d..bea8feb7 100644 --- a/src/widgets/qdial.cpp +++ b/src/widgets/qdial.cpp @@ -48,7 +48,7 @@ #include "ntqapplication.h" #include "ntqregion.h" #include "ntqbitmap.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" #endif diff --git a/src/widgets/qdialogbuttons.cpp b/src/widgets/qdialogbuttons.cpp index ed1f4064..d75a16f9 100644 --- a/src/widgets/qdialogbuttons.cpp +++ b/src/widgets/qdialogbuttons.cpp @@ -48,7 +48,7 @@ #include #endif // TQT_NO_DIALOG #include -#include +#include #include struct TQDialogButtonsPrivate diff --git a/src/widgets/qdockwindow.cpp b/src/widgets/qdockwindow.cpp index 4ebe27ac..bfcd8dba 100644 --- a/src/widgets/qdockwindow.cpp +++ b/src/widgets/qdockwindow.cpp @@ -55,7 +55,7 @@ #include "ntqtooltip.h" #include "ntqguardedptr.h" #include "ntqcursor.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(TQ_WS_MAC9) #define MAC_DRAG_HACK diff --git a/src/widgets/qframe.cpp b/src/widgets/qframe.cpp index e5ccda02..50ade126 100644 --- a/src/widgets/qframe.cpp +++ b/src/widgets/qframe.cpp @@ -44,7 +44,7 @@ #include "ntqdrawutil.h" #include "ntqframe.h" #include "ntqbitmap.h" -#include "ntqstyle.h" +#include "tqstyle.h" /*! \class TQFrame diff --git a/src/widgets/qgroupbox.cpp b/src/widgets/qgroupbox.cpp index f9b450e6..6f1c3e0e 100644 --- a/src/widgets/qgroupbox.cpp +++ b/src/widgets/qgroupbox.cpp @@ -49,7 +49,7 @@ #include "tqobjectlist.h" #include "ntqdrawutil.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqcheckbox.h" #include "ntqbuttongroup.h" #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/widgets/qheader.cpp b/src/widgets/qheader.cpp index d8d2a88b..8128b9fc 100644 --- a/src/widgets/qheader.cpp +++ b/src/widgets/qheader.cpp @@ -46,7 +46,7 @@ #include "ntqbitarray.h" #include "tqptrvector.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" class TQHeaderData { diff --git a/src/widgets/qlabel.cpp b/src/widgets/qlabel.cpp index d376b1ff..7a5eae53 100644 --- a/src/widgets/qlabel.cpp +++ b/src/widgets/qlabel.cpp @@ -49,8 +49,8 @@ #include "ntqpicture.h" #include "ntqapplication.h" #include "ntqsimplerichtext.h" -#include "ntqstylesheet.h" -#include "ntqstyle.h" +#include "tqstylesheet.h" +#include "tqstyle.h" class TQLabelPrivate { diff --git a/src/widgets/qlineedit.cpp b/src/widgets/qlineedit.cpp index 3894e35e..f03b57cb 100644 --- a/src/widgets/qlineedit.cpp +++ b/src/widgets/qlineedit.cpp @@ -58,7 +58,7 @@ #include "ntqpopupmenu.h" #include "tqstringlist.h" #include "ntqguardedptr.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqwhatsthis.h" #include "../kernel/qinternal_p.h" #include "private/tqtextlayout_p.h" diff --git a/src/widgets/qlistbox.cpp b/src/widgets/qlistbox.cpp index 5b040fad..48ee6dc1 100644 --- a/src/widgets/qlistbox.cpp +++ b/src/widgets/qlistbox.cpp @@ -55,7 +55,7 @@ #include "tqptrdict.h" #include "ntqtimer.h" #include "tqstringlist.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqpopupmenu.h" #include "ntqguardedptr.h" #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index 9af517ae..ac236963 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -61,8 +61,8 @@ #include "ntqlineedit.h" #include "ntqvbox.h" #include "ntqtooltip.h" -#include "ntqstyle.h" -#include "ntqstylesheet.h" +#include "tqstyle.h" +#include "tqstylesheet.h" #include "../kernel/qinternal_p.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" diff --git a/src/widgets/qmainwindow.cpp b/src/widgets/qmainwindow.cpp index ff88e71d..c4549968 100644 --- a/src/widgets/qmainwindow.cpp +++ b/src/widgets/qmainwindow.cpp @@ -61,7 +61,7 @@ #include "ntqbitmap.h" #include "ntqdockarea.h" #include "tqstringlist.h" -#include "ntqstyle.h" +#include "tqstyle.h" #ifdef TQ_WS_MACX # include "qt_mac.h" #endif diff --git a/src/widgets/qmenubar.cpp b/src/widgets/qmenubar.cpp index ae31bfe8..fa25ebba 100644 --- a/src/widgets/qmenubar.cpp +++ b/src/widgets/qmenubar.cpp @@ -53,7 +53,7 @@ #include "ntqlayout.h" #include "ntqcleanuphandler.h" #include "../kernel/qinternal_p.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqtimer.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index afeb80f9..d2926d42 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -53,7 +53,7 @@ #include "ntqguardedptr.h" #include "qeffects_p.h" #include "ntqcursor.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqtimer.h" #include "ntqdatetime.h" #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/widgets/qprogressbar.cpp b/src/widgets/qprogressbar.cpp index 0271ee68..86616f0c 100644 --- a/src/widgets/qprogressbar.cpp +++ b/src/widgets/qprogressbar.cpp @@ -43,7 +43,7 @@ #include "ntqpainter.h" #include "ntqdrawutil.h" #include "ntqpixmap.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqwmatrix.h" #include "../kernel/qinternal_p.h" #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/widgets/qpushbutton.cpp b/src/widgets/qpushbutton.cpp index b9c1924c..62bac9dc 100644 --- a/src/widgets/qpushbutton.cpp +++ b/src/widgets/qpushbutton.cpp @@ -50,7 +50,7 @@ #include "ntqguardedptr.h" #include "ntqapplication.h" #include "ntqtoolbar.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" #endif diff --git a/src/widgets/qradiobutton.cpp b/src/widgets/qradiobutton.cpp index b5de6b8d..0a80076e 100644 --- a/src/widgets/qradiobutton.cpp +++ b/src/widgets/qradiobutton.cpp @@ -48,7 +48,7 @@ #include "ntqbitmap.h" #include "tqtextstream.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" /*! \class TQRadioButton ntqradiobutton.h diff --git a/src/widgets/qscrollbar.cpp b/src/widgets/qscrollbar.cpp index f9850b2f..d3860708 100644 --- a/src/widgets/qscrollbar.cpp +++ b/src/widgets/qscrollbar.cpp @@ -44,7 +44,7 @@ #include "ntqbitmap.h" #include "ntqapplication.h" #include "ntqtimer.h" -#include "ntqstyle.h" +#include "tqstyle.h" #ifndef TQT_NO_CURSOR #include #endif diff --git a/src/widgets/qscrollview.cpp b/src/widgets/qscrollview.cpp index a9ce4f87..e6f459cb 100644 --- a/src/widgets/qscrollview.cpp +++ b/src/widgets/qscrollview.cpp @@ -50,7 +50,7 @@ #include "tqptrdict.h" #include "ntqapplication.h" #include "ntqtimer.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqlistview.h" #ifdef TQ_WS_MAC # include "qt_mac.h" diff --git a/src/widgets/qslider.cpp b/src/widgets/qslider.cpp index 55e1589c..f77fc4d4 100644 --- a/src/widgets/qslider.cpp +++ b/src/widgets/qslider.cpp @@ -45,7 +45,7 @@ #include "ntqtimer.h" #include "ntqbitmap.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" #endif diff --git a/src/widgets/qspinbox.cpp b/src/widgets/qspinbox.cpp index 87e232a4..d088c8ac 100644 --- a/src/widgets/qspinbox.cpp +++ b/src/widgets/qspinbox.cpp @@ -49,7 +49,7 @@ #include "ntqvalidator.h" #include "ntqpixmapcache.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" #endif diff --git a/src/widgets/qspinwidget.cpp b/src/widgets/qspinwidget.cpp index 839bf872..6086ce11 100644 --- a/src/widgets/qspinwidget.cpp +++ b/src/widgets/qspinwidget.cpp @@ -42,7 +42,7 @@ #include "ntqrect.h" #include "ntqtimer.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqpainter.h" class TQSpinWidgetPrivate diff --git a/src/widgets/qsplitter.cpp b/src/widgets/qsplitter.cpp index 3e261f28..515ca876 100644 --- a/src/widgets/qsplitter.cpp +++ b/src/widgets/qsplitter.cpp @@ -50,7 +50,7 @@ #include "tqobjectlist.h" #include "ntqpainter.h" #include "tqptrlist.h" -#include "ntqstyle.h" +#include "tqstyle.h" const uint Default = QT_QSPLITTER_DEFAULT; diff --git a/src/widgets/qstatusbar.cpp b/src/widgets/qstatusbar.cpp index b0f0b1ea..b5c8b9ca 100644 --- a/src/widgets/qstatusbar.cpp +++ b/src/widgets/qstatusbar.cpp @@ -46,7 +46,7 @@ #include "ntqpainter.h" #include "ntqtimer.h" #include "ntqdrawutil.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqsizegrip.h" /*! diff --git a/src/widgets/qtabbar.cpp b/src/widgets/qtabbar.cpp index e2b2e162..ff261837 100644 --- a/src/widgets/qtabbar.cpp +++ b/src/widgets/qtabbar.cpp @@ -43,7 +43,7 @@ #include "ntqtoolbutton.h" #include "ntqtooltip.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqpainter.h" #include "tqiconset.h" #include "ntqcursor.h" diff --git a/src/widgets/qtabwidget.cpp b/src/widgets/qtabwidget.cpp index 464affb5..9e210105 100644 --- a/src/widgets/qtabwidget.cpp +++ b/src/widgets/qtabwidget.cpp @@ -46,7 +46,7 @@ #include "tqwidgetstack.h" #include "ntqbitmap.h" #include "ntqaccel.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqpainter.h" #include "ntqtoolbutton.h" diff --git a/src/widgets/qtitlebar.cpp b/src/widgets/qtitlebar.cpp index 0879c322..c14e2a82 100644 --- a/src/widgets/qtitlebar.cpp +++ b/src/widgets/qtitlebar.cpp @@ -46,14 +46,14 @@ #include #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqdatetime.h" #include "private/qapplication_p.h" #include "ntqtooltip.h" #include "tqimage.h" #include "ntqtimer.h" #include "ntqpainter.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "private/qinternal_p.h" #ifndef TQT_NO_WORKSPACE #include "ntqworkspace.h" diff --git a/src/widgets/qtoolbar.cpp b/src/widgets/qtoolbar.cpp index a3d390e4..08c57b58 100644 --- a/src/widgets/qtoolbar.cpp +++ b/src/widgets/qtoolbar.cpp @@ -54,7 +54,7 @@ #include "ntqcombobox.h" #include "ntqtimer.h" #include "tqwidgetlist.h" -#include "ntqstyle.h" +#include "tqstyle.h" static const char * const arrow_v_xpm[] = { "7 9 3 1", diff --git a/src/widgets/qtoolbox.cpp b/src/widgets/qtoolbox.cpp index 9b4eec8e..c426a5d6 100644 --- a/src/widgets/qtoolbox.cpp +++ b/src/widgets/qtoolbox.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/widgets/qtoolbutton.cpp b/src/widgets/qtoolbutton.cpp index bb5ac870..4b9145d4 100644 --- a/src/widgets/qtoolbutton.cpp +++ b/src/widgets/qtoolbutton.cpp @@ -46,7 +46,7 @@ #include "ntqpixmap.h" #include "ntqwmatrix.h" #include "ntqapplication.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqmainwindow.h" #include "ntqtooltip.h" #include "ntqtoolbar.h" diff --git a/src/widgets/qwhatsthis.cpp b/src/widgets/qwhatsthis.cpp index 41cb9fd8..b7bc0b15 100644 --- a/src/widgets/qwhatsthis.cpp +++ b/src/widgets/qwhatsthis.cpp @@ -50,7 +50,7 @@ #include "ntqbitmap.h" #include "ntqtooltip.h" #include "ntqsimplerichtext.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #if defined(QT_ACCESSIBILITY_SUPPORT) #include "ntqaccessible.h" #endif diff --git a/src/widgets/tqiconview.cpp b/src/widgets/tqiconview.cpp index 4ccecfd2..29208642 100644 --- a/src/widgets/tqiconview.cpp +++ b/src/widgets/tqiconview.cpp @@ -70,7 +70,7 @@ #include "tqstringlist.h" #include "ntqcleanuphandler.h" #include "private/qrichtext_p.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include #include diff --git a/src/widgets/tqtextedit.cpp b/src/widgets/tqtextedit.cpp index a4cc6cf1..33307e4b 100644 --- a/src/widgets/tqtextedit.cpp +++ b/src/widgets/tqtextedit.cpp @@ -54,7 +54,7 @@ #include "ntqpixmap.h" #include "ntqfont.h" #include "ntqcolor.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqsize.h" #include "ntqevent.h" #include "ntqtimer.h" @@ -65,7 +65,7 @@ #include "ntqclipboard.h" #include "ntqcolordialog.h" #include "ntqfontdialog.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "ntqdragobject.h" #include "ntqurl.h" #include "ntqcursor.h" diff --git a/src/widgets/tqtextedit.h b/src/widgets/tqtextedit.h index 40906dbf..0b88f859 100644 --- a/src/widgets/tqtextedit.h +++ b/src/widgets/tqtextedit.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqscrollview.h" -#include "ntqstylesheet.h" +#include "tqstylesheet.h" #include "tqptrvector.h" #include "tqvaluelist.h" #include "tqptrlist.h" diff --git a/src/workspace/qworkspace.cpp b/src/workspace/qworkspace.cpp index be93dd4c..e7f8381d 100644 --- a/src/workspace/qworkspace.cpp +++ b/src/workspace/qworkspace.cpp @@ -60,7 +60,7 @@ #include "ntqwmatrix.h" #include "tqimage.h" #include "ntqscrollbar.h" -#include "ntqstyle.h" +#include "tqstyle.h" #include "ntqbitmap.h" // magic non-mdi things diff --git a/tools/assistant/mainwindow.ui b/tools/assistant/mainwindow.ui index 6461c640..0542663d 100644 --- a/tools/assistant/mainwindow.ui +++ b/tools/assistant/mainwindow.ui @@ -584,7 +584,7 @@ stdlib.h ntqmime.h helpwindow.h - ntqstylesheet.h + tqstylesheet.h ntqapplication.h helpdialogimpl.h ntqdir.h diff --git a/tools/assistant/tabbedbrowser.ui b/tools/assistant/tabbedbrowser.ui index 906fcecb..8b773d19 100644 --- a/tools/assistant/tabbedbrowser.ui +++ b/tools/assistant/tabbedbrowser.ui @@ -81,7 +81,7 @@ ntqsettings.h helpwindow.h mainwindow.h - ntqstylesheet.h + tqstylesheet.h ntqmime.h tabbedbrowser.ui.h diff --git a/tools/assistant/tabbedbrowser.ui.h b/tools/assistant/tabbedbrowser.ui.h index b5c5bd5e..2c4f180c 100644 --- a/tools/assistant/tabbedbrowser.ui.h +++ b/tools/assistant/tabbedbrowser.ui.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include "config.h" diff --git a/tools/designer/designer/actiondnd.cpp b/tools/designer/designer/actiondnd.cpp index ba791d06..fc24abc1 100644 --- a/tools/designer/designer/actiondnd.cpp +++ b/tools/designer/designer/actiondnd.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include TQAction *ActionDrag::the_action = 0; diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 6da30984..56209f20 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -99,7 +99,7 @@ #include #include #include -#include +#include #include #include #include @@ -109,7 +109,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index 52b6e7a0..fd40e5aa 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/menubareditor.cpp b/tools/designer/designer/menubareditor.cpp index fa763b54..d65891f9 100644 --- a/tools/designer/designer/menubareditor.cpp +++ b/tools/designer/designer/menubareditor.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "command.h" #include "formwindow.h" #include "menubareditor.h" diff --git a/tools/designer/designer/popupmenueditor.cpp b/tools/designer/designer/popupmenueditor.cpp index 72152162..3f0780bd 100644 --- a/tools/designer/designer/popupmenueditor.cpp +++ b/tools/designer/designer/popupmenueditor.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include "actiondnd.h" #include "actioneditorimpl.h" diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index 436d6a75..18d9e520 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -81,7 +81,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/styledbutton.cpp b/tools/designer/designer/styledbutton.cpp index f3a31001..ef4b835e 100644 --- a/tools/designer/designer/styledbutton.cpp +++ b/tools/designer/designer/styledbutton.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include StyledButton::StyledButton(TQWidget* parent, const char* name) : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE ) diff --git a/tools/designer/designer/widgetaction.cpp b/tools/designer/designer/widgetaction.cpp index 30032652..62a4f7e4 100644 --- a/tools/designer/designer/widgetaction.cpp +++ b/tools/designer/designer/widgetaction.cpp @@ -35,8 +35,8 @@ #include #include #include "mainwindow.h" -#include -#include +#include +#include static TQStyle *windowsStyle = 0; diff --git a/tools/qtconfig/colorbutton.cpp b/tools/qtconfig/colorbutton.cpp index 2d8668c2..97244b58 100644 --- a/tools/qtconfig/colorbutton.cpp +++ b/tools/qtconfig/colorbutton.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include ColorButton::ColorButton(TQWidget *parent, const char *name) diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index c97d2f6c..429f4fd7 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include -- cgit v1.2.1