qstyle-h.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 687 行 · 第 1/2 页
HTML
687 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/include/qstyle.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>qstyle.h Include File</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">Home</font></a> | <a href="classes.html"><font color="#004faf">All Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> | <a href="functions.html"><font color="#004faf">Functions</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qstyle.h</h1><p>This is the verbatim text of the qstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech.<hr><pre>/****************************************************************************** $Id: qt/qstyle.h 3.0.5 edited May 7 22:37 $**** Definition of QStyle class**** Created : 980616**** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.**** This file is part of the kernel module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for** information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QSTYLE_H#define QSTYLE_H#ifndef QT_H#include "qobject.h"#endif // QT_H#ifndef QT_NO_STYLEclass QPopupMenu;class QStylePrivate;class QMenuItem;class QTab;class QListViewItem;class QStyleOption {public: enum StyleOptionDefault { Default }; QStyleOption(StyleOptionDefault=Default) : def(TRUE) {} // Note: we don't use default arguments since that is unnecessary // initialization. QStyleOption(int in1, int in2) : def(FALSE), i1(in1), i2(in2) {} QStyleOption(int in1, int in2, int in3, int in4) : def(FALSE), i1(in1), i2(in2), i3(in3), i4(in4) {} QStyleOption(QMenuItem* m) : def(FALSE), mi(m) {} QStyleOption(QMenuItem* m, int in1) : def(FALSE), mi(m), i1(in1) {} QStyleOption(QMenuItem* m, int in1, int in2) : def(FALSE), mi(m), i1(in1), i2(in2) {} QStyleOption(const QColor& c) : def(FALSE), cl(&c) {} QStyleOption(QTab* t) : def(FALSE), tb(t) {} QStyleOption(QListViewItem* i) : def(FALSE), li(i) {} QStyleOption(Qt::ArrowType a) : def(FALSE), i1((int)a) {} bool isDefault() const { return def; } int lineWidth() const { return i1; } int midLineWidth() const { return i2; } int frameShape() const { return i3; } int frameShadow() const { return i4; } QMenuItem* menuItem() const { return mi; } int maxIconWidth() const { return i1; } int tabWidth() const { return i2; } const QColor& color() const { return *cl; } QTab* tab() const { return tb; } QListViewItem* listViewItem() const { return li; } Qt::ArrowType arrowType() const { return (Qt::ArrowType)i1; }private: // NOTE: none of these components have constructors. bool def; bool b1,b2,b3; // reserved QMenuItem* mi; QTab* tb; QListViewItem* li; const QColor* cl; int i1, i2, i3, i4; int i5, i6; // reserved void *p1, *p2, *p3, *p4, *p5; // reserved // (padded to 64 bytes on some architectures)};class QStyleHintReturn; // not defined yetclass Q_EXPORT QStyle: public QObject{ Q_OBJECTpublic: QStyle(); virtual ~QStyle(); // New QStyle API - most of these should probably be pure virtual virtual void polish( QWidget * ); virtual void unPolish( QWidget * ); virtual void polish( QApplication * ); virtual void unPolish( QApplication * ); virtual void polish( QPalette & ); virtual void polishPopupMenu( QPopupMenu* ) = 0; virtual QRect itemRect( QPainter *p, const QRect &r, int flags, bool enabled, const QPixmap *pixmap, const QString &text, int len = -1 ) const; virtual void drawItem( QPainter *p, const QRect &r, int flags, const QColorGroup &g, bool enabled, const QPixmap *pixmap, const QString &text, int len = -1, const QColor *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, // 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, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::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_PopupMenuScroller, // do not add any values below/greater than this CE_CustomBase = 0xf0000000 }; virtual void drawControl( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how = Style_Default, const QStyleOption& = QStyleOption::Default ) const = 0; virtual void drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::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, // do not add any values below/greater than this SR_CustomBase = 0xf0000000 }; virtual QRect subRect( SubRect r, const QWidget *widget ) const = 0;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?