|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.ui.qt.ext.QVxUtil
public final class QVxUtil
The QVxUtil is a utility class with often used
functionality encapsulated in useful methods.
| Method Summary | |
|---|---|
static ICellEditor |
getDefaultCellEditor(Class pClass)
Gets the default ICellEditor for the given class. |
static String |
getImageMapping(String pMappingName)
Gets the image name for the given mapping name. |
static String[] |
getImageMappingNames()
Gets all used mapping names. |
static QPixmap |
getPixmap(String pImageName)
Gets a pixmap from the resource bundle. |
static QPixmap |
getPixmap(String pImageName,
byte[] pData)
Gets a pixmap with a specific name and byte data. |
static QColor |
getSystemColor(String pType)
Gets the system color. |
static void |
setBackground(QWidget pWidget,
QColor pColor)
Sets the background for a widget. |
static void |
setDefaultCellEditor(Class pClass,
ICellEditor pCellEditor)
Sets the default ICellEditor for the given class. |
static void |
setImageMapping(String pMappingName,
String pImageName)
Gets the image name for the given mapping name. |
static void |
setReadOnly(QWidget pWidget,
boolean pReadOnly)
Sets a text widget readonly. |
static void |
setSystemColor(String pType,
QColor pSystemColor)
Sets the system color. |
static QSize |
sizeHint(QLayoutItemInterface pWidget)
Gets the sizeHint of a widget. |
static QSize |
sizeHint(QWidget pWidget)
Gets the sizeHint of a widget. |
static Date |
toDate(QDateTime pDateTime)
Gets the java date for a QT date time. |
static QDateTime |
toDateTime(Date pDate)
Gets the QT date time for a java date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static QSize sizeHint(QLayoutItemInterface pWidget)
pWidget - the widget
public static QSize sizeHint(QWidget pWidget)
pWidget - the widget
public static ICellEditor getDefaultCellEditor(Class pClass)
ICellEditor for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
pClass - the class type to be edited.
ICellEditorICellEditor
public static void setDefaultCellEditor(Class pClass,
ICellEditor pCellEditor)
ICellEditor for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
If the given ICellEditor is null, it is removed as editor for the given class.
pClass - the class type to be edited.pCellEditor - the ICellEditorICellEditorpublic static QColor getSystemColor(String pType)
pType - the color type
public static void setSystemColor(String pType,
QColor pSystemColor)
pType - the color typepSystemColor - the system colorpublic static QPixmap getPixmap(String pImageName)
pImageName - the image resource name
QPixmap or null if the resource is not available
public static QPixmap getPixmap(String pImageName,
byte[] pData)
pImageName - the image name (used for cache mechanism) or null if
the image should not be cachedpData - the image byte data
null if the byData == nullpublic static String getImageMapping(String pMappingName)
pMappingName - the mapping name.
public static void setImageMapping(String pMappingName,
String pImageName)
pMappingName - the mapping name.pImageName - the image name.public static String[] getImageMappingNames()
public static QDateTime toDateTime(Date pDate)
pDate - the java date
public static Date toDate(QDateTime pDateTime)
pDateTime - the QT date time
public static void setReadOnly(QWidget pWidget,
boolean pReadOnly)
pWidget - a line or text edit widget.pReadOnly - true to set the widget read only, false otherwise
public static void setBackground(QWidget pWidget,
QColor pColor)
pWidget - a line or text edit widget.pColor - the color to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||