com.sibvisions.rad.ui.qt.ext
Class QVxButton

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.core.QObject
                  extended by com.trolltech.qt.gui.QWidget
                      extended by com.trolltech.qt.gui.QAbstractButton
                          extended by com.trolltech.qt.gui.QPushButton
                              extended by com.sibvisions.rad.ui.qt.ext.QVxButton
All Implemented Interfaces:
ISizableWidget, QPaintDeviceInterface, QtJambiInterface

public class QVxButton
extends QPushButton
implements ISizableWidget

A QVxButton button is rectangular and typically displays a text label describing its action.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget
QWidget.RenderFlag, QWidget.RenderFlags
 
Nested classes/interfaces inherited from class com.trolltech.qt.QtJambiObject
QtJambiObject.QPrivateConstructor
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1<A>, QSignalEmitter.PrivateSignal2<A,B>, QSignalEmitter.PrivateSignal3<A,B,C>, QSignalEmitter.PrivateSignal4<A,B,C,D>, QSignalEmitter.PrivateSignal5<A,B,C,D,E>, QSignalEmitter.PrivateSignal6<A,B,C,D,E,F>, QSignalEmitter.PrivateSignal7<A,B,C,D,E,F,G>, QSignalEmitter.PrivateSignal8<A,B,C,D,E,F,G,H>, QSignalEmitter.PrivateSignal9<A,B,C,D,E,F,G,H,I>, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.gui.QAbstractButton
clicked, pressed, released, toggled
 
Fields inherited from class com.trolltech.qt.gui.QWidget
customContextMenuRequested
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QVxButton()
          Constructs a new instance of QVxButton with no text and parent.
QVxButton(QIcon pIcon, String pText)
          Constructs a new instance of QVxButton with an icon and a text.
QVxButton(QIcon pIcon, String pText, QWidget pParent)
          Constructs a new instance of QVxButton with an icon, a text and a parent.
QVxButton(QWidget pParent)
          Creates a new instance of QVxButton with a parent.
QVxButton(String pText)
          Creates a new instance of QVxButton with a text.
QVxButton(String pText, QWidget pParent)
          Creates a new instance of QVxButton with a text and a parent.
 
Method Summary
 boolean event(QEvent pEvent)
          
 Qt.AlignmentFlag getHorizontalAlignment()
          Gets the horizontal alignment of the icon and text.
 Qt.AlignmentFlag getHorizontalTextPosition()
          Gets the horizontal text position relative to the icon.
 int getIconTextGap()
          Gets the gap between the icon and the text.
 QIcon getMouseOverIcon()
          Gets the icon for the button when the mouse is over.
 QIcon getMousePressedIcon()
          Gets the icon for the button when the mouse is pressed.
 Qt.AlignmentFlag getVerticalAlignment()
          Gets the vertical alignment of the icon and text.
 Qt.AlignmentFlag getVerticalTextPosition()
          Gets the vertical text position relative to the icon.
 boolean isBorderPainted()
          Gets whether the border will be painted.
 boolean isIgnoreIconSize()
          Gets the current state of icon size calculation.
 boolean isMaximumSizeHintSet()
          Determines if an user-defined maximum size is set.
 boolean isMinimumSizeHintSet()
          Determines if an user-defined minimum size is set.
 boolean isSizeHintSet()
          Determines if an user-defined preferred size is set.
 QSize maximumSizeHint()
          Get's the maximum size hint.
 QSize minimumSizeHint()
          
 void paintEvent(QPaintEvent pEvent)
          
 void setBorderPainted(boolean pBorderPainted)
          Sets whether the border will be painted.
 void setHorizontalAlignment(Qt.AlignmentFlag pAlignment)
          Sets the horizontal alignment of the icon and text.
 void setHorizontalTextPosition(Qt.AlignmentFlag pPosition)
          Sets the horizontal text position relative to the icon.
 void setIconTextGap(int pGap)
          Sets the gap between the icon and the text.
 void setIgnoreIconSize(boolean pIgnore)
          Sets the possibility to ignore the pre-calculated or user-defined icon size and use the originial icon size for drawing.
 void setMaximumSizeHint(QSize pSize)
          Sets a user-defined maximum size.
 void setMinimumSizeHint(QSize pSize)
          Sets a user-defined minimum size.
 void setMouseOverIcon(QIcon pIcon)
          Sets the icon for the button when the mouse is over.
 void setMousePressedIcon(QIcon pIcon)
          Sets the icon for the button when the mouse is pressed.
 void setSizeHint(QSize pSize)
          Sets a user-defined preferred size.
 void setVerticalAlignment(Qt.AlignmentFlag pAlignment)
          Sets the vertical alignment of the icon and text.
 void setVerticalTextPosition(Qt.AlignmentFlag pPosition)
          Sets the vertical text position relative to the icon.
 QSize sizeHint()
          
 
Methods inherited from class com.trolltech.qt.gui.QPushButton
autoDefault, focusInEvent, focusOutEvent, fromNativePointer, initStyleOption, isDefault, isFlat, keyPressEvent, menu, setAutoDefault, setDefault, setFlat, setMenu, showMenu
 
Methods inherited from class com.trolltech.qt.gui.QAbstractButton
__qt_signalInitialization, animateClick, animateClick, autoExclusive, autoRepeat, autoRepeatDelay, autoRepeatInterval, changeEvent, checkStateSet, click, group, hitButton, icon, iconSize, isCheckable, isChecked, isDown, keyReleaseEvent, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, nextCheckState, setAutoExclusive, setAutoRepeat, setAutoRepeatDelay, setAutoRepeatInterval, setCheckable, setChecked, setDown, setIcon, setIconSize, setShortcut, setShortcut, setShortcut, setText, shortcut, text, timerEvent, toggle
 
Methods inherited from class com.trolltech.qt.gui.QWidget
__qt_cast_to_QPaintDevice, acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsRect, contextMenuEvent, contextMenuPolicy, createWinId, cursor, depth, destroy, destroy, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, focusNextChild, focusNextPrevChild, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, graphicsProxyWidget, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, hideEvent, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseDoubleClickEvent, mouseGrabber, move, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, overrideWindowState, overrideWindowState, paintEngine, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, widthMM, window, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y
 
Methods inherited from class com.trolltech.qt.core.QObject
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, toString, userProperty
 
Methods inherited from class com.trolltech.qt.QtJambiObject
disableGarbageCollection, dispose, disposed, equals, finalize, nativeId, nativePointer, reassignNativeResources, reenableGarbageCollection, setJavaOwnership, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
disconnect, disconnect, signalSender
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QVxButton

public QVxButton()
Constructs a new instance of QVxButton with no text and parent.


QVxButton

public QVxButton(QIcon pIcon,
                 String pText)
Constructs a new instance of QVxButton with an icon and a text.

Parameters:
pIcon - the icon for the button
pText - the text for the button

QVxButton

public QVxButton(QIcon pIcon,
                 String pText,
                 QWidget pParent)
Constructs a new instance of QVxButton with an icon, a text and a parent.

Parameters:
pIcon - the icon for the button
pText - the text for the button
pParent - the parent widget

QVxButton

public QVxButton(QWidget pParent)
Creates a new instance of QVxButton with a parent.

Parameters:
pParent - the parent widget

QVxButton

public QVxButton(String pText)
Creates a new instance of QVxButton with a text.

Parameters:
pText - the text for the button

QVxButton

public QVxButton(String pText,
                 QWidget pParent)
Creates a new instance of QVxButton with a text and a parent.

Parameters:
pText - the text for the button
pParent - the parent widget
Method Detail

setSizeHint

public void setSizeHint(QSize pSize)
Sets a user-defined preferred size.

Specified by:
setSizeHint in interface ISizableWidget
Parameters:
pSize - the size
See Also:
QWidget.sizeHint()

isSizeHintSet

public boolean isSizeHintSet()
Determines if an user-defined preferred size is set.

Specified by:
isSizeHintSet in interface ISizableWidget
Returns:
true if an user-defined preferred size is set

setMinimumSizeHint

public void setMinimumSizeHint(QSize pSize)
Sets a user-defined minimum size.

Specified by:
setMinimumSizeHint in interface ISizableWidget
Parameters:
pSize - the size
See Also:
QWidget.minimumSizeHint()

isMinimumSizeHintSet

public boolean isMinimumSizeHintSet()
Determines if an user-defined minimum size is set.

Specified by:
isMinimumSizeHintSet in interface ISizableWidget
Returns:
true if an user-defined minimum size is set

setMaximumSizeHint

public void setMaximumSizeHint(QSize pSize)
Sets a user-defined maximum size.

Specified by:
setMaximumSizeHint in interface ISizableWidget
Parameters:
pSize - the size

isMaximumSizeHintSet

public boolean isMaximumSizeHintSet()
Determines if an user-defined maximum size is set.

Specified by:
isMaximumSizeHintSet in interface ISizableWidget
Returns:
true if an user-defined maximum size is set

paintEvent

public void paintEvent(QPaintEvent pEvent)

Overrides:
paintEvent in class QPushButton

sizeHint

public QSize sizeHint()

Overrides:
sizeHint in class QPushButton

minimumSizeHint

public QSize minimumSizeHint()

Overrides:
minimumSizeHint in class QPushButton

event

public boolean event(QEvent pEvent)

Overrides:
event in class QPushButton

maximumSizeHint

public QSize maximumSizeHint()
Get's the maximum size hint.

Specified by:
maximumSizeHint in interface ISizableWidget
Returns:
the maximum size hint.

setHorizontalAlignment

public void setHorizontalAlignment(Qt.AlignmentFlag pAlignment)
Sets the horizontal alignment of the icon and text.

Parameters:
pAlignment - Qt.AlignmentFlag.AlignLeft, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignRight

getHorizontalAlignment

public Qt.AlignmentFlag getHorizontalAlignment()
Gets the horizontal alignment of the icon and text.

Returns:
Qt.AlignmentFlag.AlignLeft, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignRight

setVerticalAlignment

public void setVerticalAlignment(Qt.AlignmentFlag pAlignment)
Sets the vertical alignment of the icon and text.

Parameters:
pAlignment - Qt.AlignmentFlag.AlignTop, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignBottom

getVerticalAlignment

public Qt.AlignmentFlag getVerticalAlignment()
Gets the vertical alignment of the icon and text.

Returns:
Qt.AlignmentFlag.AlignTop, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignBottom

setHorizontalTextPosition

public void setHorizontalTextPosition(Qt.AlignmentFlag pPosition)
Sets the horizontal text position relative to the icon.

Parameters:
pPosition - Qt.AlignmentFlag.AlignLeft, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignRight

getHorizontalTextPosition

public Qt.AlignmentFlag getHorizontalTextPosition()
Gets the horizontal text position relative to the icon.

Returns:
Qt.AlignmentFlag.AlignLeft, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignRight

setVerticalTextPosition

public void setVerticalTextPosition(Qt.AlignmentFlag pPosition)
Sets the vertical text position relative to the icon.

Parameters:
pPosition - Qt.AlignmentFlag.AlignTop, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignBottom

getVerticalTextPosition

public Qt.AlignmentFlag getVerticalTextPosition()
Gets the vertical text position relative to the icon.

Returns:
Qt.AlignmentFlag.AlignTop, Qt.AlignmentFlag.AlignCenter or Qt.AlignmentFlag.AlignBottom

setIgnoreIconSize

public void setIgnoreIconSize(boolean pIgnore)
Sets the possibility to ignore the pre-calculated or user-defined icon size and use the originial icon size for drawing.

Parameters:
pIgnore - true to use the original icon size, otherwise false

isIgnoreIconSize

public boolean isIgnoreIconSize()
Gets the current state of icon size calculation.

Returns:
true if the original icon size will be used for icon representation; false if the user-defined or pre-calculated size will be used

setIconTextGap

public void setIconTextGap(int pGap)
Sets the gap between the icon and the text.

Parameters:
pGap - the gap in pixel

getIconTextGap

public int getIconTextGap()
Gets the gap between the icon and the text.

Returns:
the gap in pixel

setBorderPainted

public void setBorderPainted(boolean pBorderPainted)
Sets whether the border will be painted. If true, the border will be painted. The default value is that the border will be painted.

Parameters:
pBorderPainted - true to paint the border, otherwise false
See Also:
QPushButton.setFlat(boolean)

isBorderPainted

public boolean isBorderPainted()
Gets whether the border will be painted.

Returns:
true when the border will be painted, otherwise false
See Also:
QPushButton.isFlat()

setMouseOverIcon

public void setMouseOverIcon(QIcon pIcon)
Sets the icon for the button when the mouse is over.

Parameters:
pIcon - the mouse over icon

getMouseOverIcon

public QIcon getMouseOverIcon()
Gets the icon for the button when the mouse is over.

Returns:
the mouse over icon

setMousePressedIcon

public void setMousePressedIcon(QIcon pIcon)
Sets the icon for the button when the mouse is pressed.

Parameters:
pIcon - the mouse pressed icon

getMousePressedIcon

public QIcon getMousePressedIcon()
Gets the icon for the button when the mouse is pressed.

Returns:
the mouse pressed icon


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.