Qyoto
4.0.6
Qyoto is a C# language binding for Qt
|
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements. More...
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
![]() | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
![]() | |
static QRect | AlignedRect (Qt.LayoutDirection direction, Qt.AlignmentFlag alignment, QSize size, QRect rectangle) |
| |
static int | SliderPositionFromValue (int min, int max, int val, int space, bool upsideDown=false) |
| |
static int | SliderValueFromPosition (int min, int max, int pos, int space, bool upsideDown=false) |
| |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
static Qt.AlignmentFlag | VisualAlignment (Qt.LayoutDirection direction, Qt.AlignmentFlag alignment) |
| |
static QPoint | VisualPos (Qt.LayoutDirection direction, QRect boundingRect, QPoint logicalPos) |
| |
static QRect | VisualRect (Qt.LayoutDirection direction, QRect boundingRect, QRect logicalRect) |
| |
![]() | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
![]() | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream stream, QSizeF size) |
| |
static QDataStream | Write (QDataStream stream, QPoint point) |
| |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream stream, QLineF line) |
| |
static QDataStream | Write (QDataStream stream, QPointF point) |
| |
static QDataStream | Write (QDataStream @out, QChar chr) |
| |
static QDataStream | Write (QDataStream @out, QByteArray ba) |
| |
static QDataStream | Write (QDataStream stream, QEasingCurve easing) |
| |
static QDataStream | Write (QDataStream stream, QRectF rectangle) |
| |
static QDataStream | Write (QDataStream @out, QDateTime dateTime) |
| |
static QDataStream | Write (QDataStream @out, QUrl url) |
| |
static QDataStream | Write (QDataStream @out, QTime time) |
| |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream @out, QBitArray ba) |
| |
static QDataStream | Write (QDataStream s, QUuid id) |
| |
static QDataStream | Write (QDataStream stream, QLine line) |
| |
static QDataStream | Write (QDataStream @out, QDate date) |
| |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
| |
static QDataStream | Write (QDataStream stream, QRect rectangle) |
| |
static QDataStream | Write (QDataStream stream, QSize size) |
| |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
| |
static QDataStream | Read (QDataStream @in, QChar chr) |
| |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream stream, QRect rectangle) |
| |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream @in, QDate date) |
| |
static QDataStream | Read (QDataStream @in, QUrl url) |
| |
static QDataStream | Read (QDataStream s, QUuid id) |
| |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream stream, QLineF line) |
| |
static QDataStream | Read (QDataStream stream, QRectF rectangle) |
| |
static QDataStream | Read (QDataStream stream, QPointF point) |
| |
static QDataStream | Read (QDataStream stream, QLine line) |
| |
static QDataStream | Read (QDataStream @in, QBitArray ba) |
| |
static QDataStream | Read (QDataStream stream, QSize size) |
| |
static QDataStream | Read (QDataStream @in, QDateTime dateTime) |
| |
static QDataStream | Read (QDataStream @in, QTime time) |
| |
static QDataStream | Read (QDataStream stream, QPoint point) |
| |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
| |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream @in, QByteArray ba) |
| |
static QDataStream | Read (QDataStream stream, QSizeF size) |
| |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
| |
static double | QAcos (double v) |
| |
static void | QAddPostRoutine (System.Action ptr) |
| |
static double | QAsin (double v) |
| |
static double | QAtan (double v) |
| |
static double | QAtan2 (double x, double y) |
| |
static void | QBadAlloc () |
static int | QCeil (double v) |
| |
static ushort | QChecksum (string s, uint len) |
| |
static QByteArray | QCompress (QByteArray data, int compressionLevel=-1) |
| |
static QByteArray | QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
| |
static double | QCos (double v) |
| |
static double | QExp (double v) |
| |
static double | QFabs (double v) |
static double | QFastCos (double x) |
static double | QFastSin (double x) |
static string | QFlagLocation (string method) |
static int | QFloor (double v) |
| |
static bool | QFuzzyCompare (double p1, double p2) |
static bool | QFuzzyCompare (float p1, float p2) |
static bool | QFuzzyIsNull (double d) |
static bool | QFuzzyIsNull (float f) |
static uint | QHash (QBitArray key) |
| |
static uint | QHash (QChar key) |
| |
static uint | QHash (QStringRef key) |
static uint | QHash (QUrl url) |
| |
static uint | QHash (QPersistentModelIndex index) |
static uint | QHash (QByteArray key) |
| |
static uint | QHash (QModelIndex index) |
static uint | QHash (uint key) |
| |
static uint | QHash (char key) |
| |
static uint | QHash (byte key) |
| |
static uint | QHash (short key) |
| |
static uint | QHash (NativeLong key) |
| |
static uint | QHash (ushort key) |
| |
static uint | QHash (long key) |
| |
static uint | QHash (ulong key) |
| |
static uint | QHash (int key) |
| |
static uint | QHash (string key) |
| |
static uint | QHash (NativeULong key) |
| |
static Qt.ActionQtMsgTypeString | QInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | QIntCast (float f) |
static int | QIntCast (double f) |
static bool | QIsFinite (double d) |
static bool | QIsFinite (float f) |
static bool | QIsInf (float f) |
static bool | QIsInf (double d) |
static bool | QIsNaN (float f) |
static bool | QIsNaN (double d) |
static bool | QIsNull (float f) |
static bool | QIsNull (double d) |
static double | QLn (double v) |
| |
static double | QPow (double x, double y) |
| |
static void | QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
| |
static void | QRemovePostRoutine (System.Action arg1) |
static int | QRound (double d) |
static long | QRound64 (double d) |
static double | QSin (double v) |
| |
static double | QSqrt (double v) |
| |
static bool | QStringComparisonHelper (QStringRef s1, string s2) |
static double | QTan (double v) |
| |
static QByteArray | QUncompress (QByteArray data) |
| |
static QByteArray | QUncompress (Pointer< byte > data, int nbytes) |
| |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
| |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
| |
static Pointer< sbyte > | Qstrdup (string src) |
| |
static int | Qstricmp (string str1, string str2) |
| |
static uint | Qstrlen (string str) |
| |
static int | Qstrncmp (string str1, string str2, uint len) |
| |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
| |
static int | Qstrnicmp (string str1, string str2, uint len) |
| |
static uint | Qstrnlen (string str, uint maxlen) |
| |
static string | QtTrId (string id, int n=-1) |
Properties | |
QStyle | BaseStyle [get, set] |
| |
override QPalette | StandardPalette [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQProxyStyleSignals | Emit [get] |
![]() | |
static new QMetaObject | StaticMetaObject [get] |
new IQCommonStyleSignals | Emit [get] |
![]() | |
QStyle | Proxy [get] |
| |
virtual QPalette | StandardPalette [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQStyleSignals | Emit [get] |
![]() | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
QObject | Parent [get, set] |
| |
System.Collections.Generic.List < QObject > | Children [get] |
| |
System.Collections.Generic.List < QByteArray > | DynamicPropertyNames [get] |
| |
bool | IsWidgetType [get] |
| |
static uint | RegisterUserData [get] |
QObject | Sender [get] |
| |
int | SenderSignalIndex [get] |
| |
bool | SignalsBlocked [get] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
![]() | |
static string | QAppName [get] |
static double | QInf [get] |
static double | QQNaN [get] |
static double | QSNaN [get] |
static bool | QSharedBuild [get] |
static string | QVersion [get] |
static int | Qrand [get] |
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements.
A QProxyStyle wraps a QStyle (usually the default system style) for the purpose of dynamically overriding painting or other specific style behavior.
The following example shows how to override the shortcut underline behavior on any platform:
#include "textedit.h"
#include <QApplication>
#include <QProxyStyle>
class MyProxyStyle : public QProxyStyle
{
public:
int styleHint(StyleHint hint, const QStyleOption *option = 0,
const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
{
if (hint == QStyle::SH_UnderlineShortcut)
return 0;
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
};
int main(int argc, char **argv)
{
Q_INIT_RESOURCE(textedit);
QApplication a(argc, argv);
a.setStyle(new MyProxyStyle);
TextEdit mw;
mw.resize(700, 800);
mw.show();
//...
}
Warning: The common styles provided by Qt will respect this hint, because they call QStyle::proxy(), but there is no guarantee that QStyle::proxy() will be called for user defined or system controlled styles. It would not work on a Mac, for example, where menus are handled by the operating system.
See also QStyle.
|
protected |
QtGui.QProxyStyle.QProxyStyle | ( | QStyle | baseStyle = null | ) |
Constructs a QProxyStyle object for overriding behavior in style or in the current application style if style is 0 (default). Normally style is 0, because you want to override behavior in the system style.
Ownership of style is transferred to QProxyStyle.
|
virtual |
Reimplemented from QtGui.QCommonStyle.
new void QtGui.QProxyStyle.Dispose | ( | ) |
|
virtual |
Reimplemented from QStyle::drawComplexControl().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::drawControl().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::drawItemPixmap().
Reimplemented from QtGui.QStyle.
|
virtual |
Reimplemented from QStyle::drawItemText().
Reimplemented from QtGui.QStyle.
|
virtual |
Reimplemented from QStyle::drawPrimitive().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::generatedIconPixmap().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::hitTestComplexControl().
Reimplemented from QtGui.QCommonStyle.
Reimplemented from QStyle::itemPixmapRect().
Reimplemented from QtGui.QStyle.
|
virtual |
Reimplemented from QStyle::itemTextRect().
Reimplemented from QtGui.QStyle.
|
protected |
This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.
The default implementation returns -1.
See also layoutSpacing() and combinedLayoutSpacing().
|
virtual |
Reimplemented from QObject::event().
Reimplemented from QtCore.QObject.
|
virtual |
Reimplemented from QStyle::pixelMetric().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::polish().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::polish().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::polish().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::sizeFromContents().
Reimplemented from QtGui.QCommonStyle.
|
protected |
Returns an icon for the given standardIcon.
Reimplement this slot to provide your own icons in a QStyle subclass. The option argument can be used to pass extra information required to find the appropriate icon. The widget argument is optional and can also be used to help find the icon.
Note: Because of binary compatibility constraints, standardIcon() introduced in Qt 4.1 is not virtual. Therefore it must dynamically detect and call this slot. This default implementation simply calls standardIcon() with the given parameters.
See also standardIcon().
|
virtual |
Reimplemented from QStyle::standardPixmap().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::styleHint().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::subControlRect().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::subElementRect().
Reimplemented from QtGui.QCommonStyle.
|
static |
|
static |
|
static |
|
static |
|
virtual |
Reimplemented from QStyle::unpolish().
Reimplemented from QtGui.QCommonStyle.
|
virtual |
Reimplemented from QStyle::unpolish().
Reimplemented from QtGui.QCommonStyle.
|
getset |
Returns the proxy base style object. If no base style is set on the proxy style, QProxyStyle will create an instance of the application style instead.
Sets the base style that should be proxied.
Ownership of style is transferred to QProxyStyle.
If style is zero, a desktop-dependant style will be assigned automatically.
|
getprotected |
|
get |
Reimplemented from QStyle::standardPalette().
|
staticget |