NoButton = 0x00000000,
LeftButton = 0x00000001,
RightButton = 0x00000002,
- MidButton = 0x00000004, // ### Qt 5: remove me
- MiddleButton = MidButton,
+ MiddleButton = 0x00000004,
XButton1 = 0x00000008,
XButton2 = 0x00000010,
MouseButtonMask = 0x000000ff
Horizontal = 0x1,
Vertical = 0x2
};
-
Q_DECLARE_FLAGS(Orientations, Orientation)
enum FocusPolicy {
// Text formatting flags for QPainter::drawText and QLabel.
// The following two enums can be combined to one integer which
// is passed as 'flags' to drawText and qt_format_text.
-
enum AlignmentFlag {
AlignLeft = 0x0001,
AlignLeading = AlignLeft,
AlignCenter = AlignVCenter | AlignHCenter
};
-
Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
enum TextFlag {
TextForceRightToLeft = 0x40000,
TextLongestVariant = 0x80000,
TextBypassShaping = 0x100000
-
};
enum TextElideMode {
WindowFullScreen = 0x00000004,
WindowActive = 0x00000008
};
-
Q_DECLARE_FLAGS(WindowStates, WindowState)
enum WidgetAttribute {
AA_AttributeCount
};
-
// Image conversion flags. The unusual ordering is caused by
// compatibility and default requirements.
-
enum ImageConversionFlag {
ColorMode_Mask = 0x00000003,
AutoColor = 0x00000000,
OpaqueMode
};
-
enum Key {
Key_Escape = 0x01000000, // misc keys
Key_Tab = 0x01000001,
RightArrow
};
- enum PenStyle { // pen style
+ enum PenStyle {
NoPen,
SolidLine,
DashLine,
#endif
};
- enum PenCapStyle { // line endcap style
+ // line endcap style
+ enum PenCapStyle {
FlatCap = 0x00,
SquareCap = 0x10,
RoundCap = 0x20,
MPenCapStyle = 0x30
};
- enum PenJoinStyle { // line join style
+ // line join style
+ enum PenJoinStyle {
MiterJoin = 0x00,
BevelJoin = 0x40,
RoundJoin = 0x80,
MPenJoinStyle = 0x1c0
};
- enum BrushStyle { // brush style
+ enum BrushStyle {
NoBrush,
SolidPattern,
Dense1Pattern,
RelativeSize
};
-
enum UIEffect {
UI_General,
UI_AnimateMenu,
enum DockWidgetAreaSizes {
NDockWidgetAreas = 4
};
-
Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
enum ToolBarArea {
enum ToolBarAreaSizes {
NToolBarAreas = 4
};
-
Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
-
enum DateFormat {
TextDate, // default Qt
ISODate, // ISO 8601
ScrollBarAlwaysOn
};
-
enum CaseSensitivity {
CaseInsensitive,
CaseSensitive
AnchorBottom
};
-
-
enum DropAction {
CopyAction = 0x1,
MoveAction = 0x2,
Printer = 4,
CustomRaster = 5
};
+
enum RelayoutType {
RelayoutNormal,
RelayoutDragging,
RelayoutDropped
};
-
enum Callback {
ConnectCallback,
DisconnectCallback,
static bool callFunction(InternalFunction func, void **);
};
-
QT_END_NAMESPACE
QT_END_HEADER
to the left button. (The left button may be the right button on
left-handed mice.)
\value RightButton The right button.
- \value MidButton The middle button.
\value MiddleButton The middle button.
\value XButton1 The first X button.
\value XButton2 The second X button.
core()->formWindowManager()->setActiveFormWindow(this);
const Qt::MouseButtons buttons = e->buttons();
- if (buttons != Qt::LeftButton && buttons != Qt::MidButton)
+ if (buttons != Qt::LeftButton && buttons != Qt::MiddleButton)
return true;
m_startPos = mapFromGlobal(e->globalPos());
if (debugFormWindow)
qDebug() << "handleMousePressEvent:" << widget << ',' << managedWidget;
- if (buttons == Qt::MidButton || isMainContainer(managedWidget) == true) { // press was on the formwindow
+ if (buttons == Qt::MiddleButton || isMainContainer(managedWidget) == true) { // press was on the formwindow
clearObjectInspectorSelection(m_core); // We might have a toolbar or non-widget selected in the object inspector.
clearSelection(false);
* MousePressEvent. */
switch (e->button()) {
case Qt::LeftButton:
- case Qt::MidButton:
+ case Qt::MiddleButton:
case Qt::RightButton:
emitSelectionChanged();
break;
if (s & Button1Mask)
ret |= Qt::LeftButton;
if (s & Button2Mask)
- ret |= Qt::MidButton;
+ ret |= Qt::MiddleButton;
if (s & Button3Mask)
ret |= Qt::RightButton;
// X11 has no special state for XButton1 and XButton2, so we need to use
modifiers = qt_x11Data->translateModifiers(event->xbutton.state);
switch (event->xbutton.button) {
case Button1: button = Qt::LeftButton; break;
- case Button2: button = Qt::MidButton; break;
+ case Button2: button = Qt::MiddleButton; break;
case Button3: button = Qt::RightButton; break;
case Button4:
case Button5:
Returns the button state when the event was generated. The button
state is a combination of Qt::LeftButton, Qt::RightButton,
- Qt::MidButton using the OR operator. For mouse move events,
+ Qt::MiddleButton using the OR operator. For mouse move events,
this is all buttons that are pressed down. For mouse press and
double click events this includes the button that caused the
event. For mouse release events this excludes the button that
The returned value is a selection of the following values,
combined with the OR operator:
- Qt::LeftButton, Qt::RightButton, Qt::MidButton,
+ Qt::LeftButton, Qt::RightButton, Qt::MiddleButton,
Qt::ShiftButton, Qt::ControlButton, and Qt::AltButton.
*/
ret = false;
break;
case SH_Slider_AbsoluteSetButtons:
- ret = Qt::MidButton;
+ ret = Qt::MiddleButton;
break;
case SH_Slider_PageSetButtons:
ret = Qt::LeftButton;
#ifndef QT_NO_CLIPBOARD
setClipboardSelection();
selectionChanged(true);
- } else if (button == Qt::MidButton
+ } else if (button == Qt::MiddleButton
&& (interactionFlags & Qt::TextEditable)
&& QApplication::clipboard()->supportsSelection()) {
setCursorPosition(pos);
emit q->activated(QSystemTrayIcon::Trigger);
else if (ev->button() == Qt::RightButton)
emit q->activated(QSystemTrayIcon::Context);
- else if (ev->button() == Qt::MidButton)
+ else if (ev->button() == Qt::MiddleButton)
emit q->activated(QSystemTrayIcon::MiddleClick);
}
if (QApplication::clipboard()->supportsSelection()) {
if (ev->button() == Qt::LeftButton) {
copy(QClipboard::Selection);
- } else if (!isReadOnly() && ev->button() == Qt::MidButton) {
+ } else if (!isReadOnly() && ev->button() == Qt::MiddleButton) {
deselect();
insert(QApplication::clipboard()->text(QClipboard::Selection));
}
if (QApplication::clipboard()->supportsSelection()) {
if (e->button() == Qt::LeftButton) {
d->control->copy(QClipboard::Selection);
- } else if (!d->control->isReadOnly() && e->button() == Qt::MidButton) {
+ } else if (!d->control->isReadOnly() && e->button() == Qt::MiddleButton) {
deselect();
insert(QApplication::clipboard()->text(QClipboard::Selection));
}
*/
void QMdiAreaTabBar::mousePressEvent(QMouseEvent *event)
{
- if (event->button() != Qt::MidButton) {
+ if (event->button() != Qt::MiddleButton) {
QTabBar::mousePressEvent(event);
return;
}
if (d->maximum == d->minimum // no range
|| (e->buttons() & (~e->button())) // another button was clicked before
- || !(e->button() == Qt::LeftButton || (midButtonAbsPos && e->button() == Qt::MidButton)))
+ || !(e->button() == Qt::LeftButton || (midButtonAbsPos && e->button() == Qt::MiddleButton)))
return;
d->pressedControl = style()->hitTestComplexControl(QStyle::CC_ScrollBar, &opt, e->pos(), this);
if ((d->pressedControl == QStyle::SC_ScrollBarAddPage
|| d->pressedControl == QStyle::SC_ScrollBarSubPage)
- && ((midButtonAbsPos && e->button() == Qt::MidButton)
+ && ((midButtonAbsPos && e->button() == Qt::MiddleButton)
|| (style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, &opt, this)
&& e->button() == Qt::LeftButton))) {
int sliderLength = HORIZONTAL ? sr.width() : sr.height();
QStyleOptionSlider opt;
initStyleOption(&opt);
if (!(e->buttons() & Qt::LeftButton
- || ((e->buttons() & Qt::MidButton)
+ || ((e->buttons() & Qt::MiddleButton)
&& style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, &opt, this))))
return;