Qyoto
4.0.5
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 Public Member Functions inherited from QtGui.QCommonStyle | |
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 Public Member Functions inherited from QtGui.QStyle | |
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 Public Member Functions inherited from QtCore.QObject | |
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 arg5=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 uint | RegisterUserData () |
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 Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
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 arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
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 arg1) |
static string | qAppName () |
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) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
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 (sbyte 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 double | qInf () |
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 double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
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 string | qVersion () |
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 int | Qrand () |
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 arg1) |
static int | Qstricmp (string arg1, string arg2) |
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 arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Properties | |
new QStyle | BaseStyle [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQProxyStyleSignals | Emit [get] |
Properties inherited from QtGui.QCommonStyle | |
static new QMetaObject | StaticMetaObject [get] |
new IQCommonStyleSignals | Emit [get] |
Properties inherited from QtGui.QStyle | |
static new QMetaObject | StaticMetaObject [get] |
new IQStyleSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
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 |
| |
new QObject | Parent [get, set] |
| |
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] |
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.
new int QtGui.QProxyStyle.pixelMetric | ( | QStyle.PixelMetric | metric | ) |
Reimplemented from QStyle::pixelMetric().
new int QtGui.QProxyStyle.pixelMetric | ( | QStyle.PixelMetric | metric, |
QStyleOption | option = null |
||
) |
Reimplemented from QStyle::pixelMetric().
|
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::standardPalette().
Reimplemented from QtGui.QStyle.
new QPixmap QtGui.QProxyStyle.standardPixmap | ( | QStyle.StandardPixmap | standardPixmap, |
QStyleOption | opt | ||
) |
Reimplemented from QStyle::standardPixmap().
|
virtual |
Reimplemented from QStyle::standardPixmap().
Reimplemented from QtGui.QCommonStyle.
new int QtGui.QProxyStyle.styleHint | ( | QStyle.StyleHint | hint | ) |
Reimplemented from QStyle::styleHint().
new int QtGui.QProxyStyle.styleHint | ( | QStyle.StyleHint | hint, |
QStyleOption | option = null |
||
) |
Reimplemented from QStyle::styleHint().
new int QtGui.QProxyStyle.styleHint | ( | QStyle.StyleHint | hint, |
QStyleOption | option = null , |
||
QWidget | widget = null |
||
) |
Reimplemented from QStyle::styleHint().
|
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 |
|
staticget |