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

KDEUI

Public Member Functions | List of all members
KDialogButtonBox Class Reference

#include <kdialogbuttonbox.h>

Inheritance diagram for KDialogButtonBox:
QDialogButtonBox

Public Member Functions

 KDialogButtonBox (QWidget *parent, Qt::Orientation _orientation=Qt::Horizontal)
 
 ~KDialogButtonBox ()
 
KPushButton * addButton (const KGuiItem &guiitem, ButtonRole role, QObject *receiver=0, const char *slot=0)
 
QPushButton * addButton (const QString &text, ButtonRole role, QObject *receiver, const char *slot)
 

Detailed Description

Container widget for buttons.

An extension of QDialogButtonBox which allow the use of KGuiItem and conveniance slot connection.

Various KDE Dialog Button Boxes with different buttons
Author
Mario Weilguni mweil.nosp@m.guni.nosp@m.@sime.nosp@m..com
Olivier Goffart ogoff.nosp@m.art@.nosp@m.kde.o.nosp@m.rg

Definition at line 45 of file kdialogbuttonbox.h.

Constructor & Destructor Documentation

◆ KDialogButtonBox()

KDialogButtonBox::KDialogButtonBox ( QWidget *  parent,
Qt::Orientation  _orientation = Qt::Horizontal 
)
explicit

Create an empty container for buttons.

If _orientation is Vertical, the buttons inserted with addButton() are laid out from top to bottom, otherwise they are laid out from left to right.

Definition at line 29 of file kdialogbuttonbox.cpp.

◆ ~KDialogButtonBox()

KDialogButtonBox::~KDialogButtonBox ( )

Free private data field.

Definition at line 34 of file kdialogbuttonbox.cpp.

Member Function Documentation

◆ addButton() [1/2]

KPushButton * KDialogButtonBox::addButton ( const KGuiItem &  guiitem,
ButtonRole  role,
QObject *  receiver = 0,
const char *  slot = 0 
)

Creates a push button with the given KUiItem, adds it to the button box for the specified role, and returns the corresponding push button.

If role is invalid, the button is created, but not added.

The clicked signal of the button is automatically connected to the slot

Parameters
guiitemtext and icon on the button
rolethe button role
receiverAn object to connect to.
slotA Qt slot to connect the 'clicked()' signal to.
Returns
A pointer to the new button.

Definition at line 46 of file kdialogbuttonbox.cpp.

◆ addButton() [2/2]

QPushButton * KDialogButtonBox::addButton ( const QString &  text,
ButtonRole  role,
QObject *  receiver,
const char *  slot 
)

Creates a push button with the given text, adds it to the button box for the specified role, and returns the corresponding push button.

If role is invalid, no button is created, and zero is returned.

The clicked signal of the button is automatically connected to the slot

Parameters
textthe text of the button to add.
rolethe button role
receiverAn object to connect to.
slotA Qt slot to connect the 'clicked()' signal to.
Returns
A pointer to the new button.

Definition at line 36 of file kdialogbuttonbox.cpp.


The documentation for this class was generated from the following files:
  • kdialogbuttonbox.h
  • kdialogbuttonbox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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