• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • KStyle
  • PushButton
Public Types | List of all members
KStyle::PushButton Struct Reference
KStyle widget representation

#include <kstyle.h>

Public Types

enum  LayoutProp {
  ContentsMargin, FocusMargin = ContentsMargin + MarginInc, DefaultIndicatorMargin = FocusMargin + MarginInc, PressedShiftHorizontal = DefaultIndicatorMargin + MarginInc,
  PressedShiftVertical, MenuIndicatorSize, TextToIconSpace
}
 
enum  Primitive { Panel, DefaultButtonFrame }
 

Detailed Description

Describes widgets like QPushButton.

See also
WT_PushButton

Definition at line 497 of file kstyle.h.

Member Enumeration Documentation

enum KStyle::PushButton::LayoutProp

The layout of a PushButton is structured as follows:

  1. Between the very outside and the bevel is the default indicator area, controlled by the PushButton::DefaultIndicatorMargin .

  1. From the bevel, the content and focus rect margins are measured. Only the content margin is used to size the content area.
  2. Inside the content area, PushButton::MenuIndicatorSize is allocated to the down arrow if there is a popup menu.
  3. PushButton::TextToIconSpace is allocated between icon and text if both exist
See also
setWidgetLayoutProp()
Enumerator
ContentsMargin 

(5) space between the bevel and the button contents

FocusMargin 

(3) Used to calculate the area of the focus indicator. Measured from the bevel.

DefaultIndicatorMargin 

(0 ?) Default indicator between the very outside and the bevel. KStyle may reserve this for auto-default buttons, too, for consistency's sake. [the MainMargin sets QStyle::PM_ButtonDefaultIndicator]

PressedShiftHorizontal 

(2) horizontal contents shift for pressed buttons [sets QStyle::PM_ButtonShiftHorizontal]

PressedShiftVertical 

(2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical]

MenuIndicatorSize 

(8) Space inside the content area, which is allocated to the down arrow if there is a popup menu [sets QStyle::PM_MenuButtonIndicator, except for toolbuttons]

TextToIconSpace 

(6) space between the icon and the text if both exist

Definition at line 511 of file kstyle.h.

enum KStyle::PushButton::Primitive

Relevant Generic elements:

  • Generic::Text the button's text
  • Generic::FocusIndicator indicating that the button has keyboard focus
  • Generic::ArrowDown indicating that the button has a popup menu associated to it

[KStyle implements QStyle::CE_PushButtonBevel to compose the primitives]

See also
drawKStylePrimitive()
Enumerator
Panel 

the pushbutton panel [implements QStyle::PE_PanelButtonCommand]

DefaultButtonFrame 

frame indicating a default button, painted before the button Panel [implements QStyle::PE_FrameDefaultButton]

Definition at line 532 of file kstyle.h.


The documentation for this struct was generated from the following file:
  • kstyle.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal