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

KDEUI

Public Slots | Signals | Public Member Functions | Properties | List of all members
KPageWidgetItem Class Reference

#include <kpagewidgetmodel.h>

Inheritance diagram for KPageWidgetItem:
Inheritance graph
[legend]

Public Slots

void setChecked (bool checked)
 
void setEnabled (bool)
 

Signals

void changed ()
 
void toggled (bool checked)
 

Public Member Functions

 KPageWidgetItem (QWidget *widget)
 
 KPageWidgetItem (QWidget *widget, const QString &name)
 
 ~KPageWidgetItem ()
 
QString header () const
 
KIcon icon () const
 
bool isCheckable () const
 
bool isChecked () const
 
bool isEnabled () const
 
QString name () const
 
void setCheckable (bool checkable)
 
void setHeader (const QString &header)
 
void setIcon (const KIcon &icon)
 
void setName (const QString &name)
 
QWidget * widget () const
 

Properties

bool checkable
 
bool checked
 
bool enabled
 
QString header
 
KIcon icon
 
QString name
 

Detailed Description

KPageWidgetItem is used by KPageWidget and represents a page.

Example:

ColorPage *page = new ColorPage;
KPageWidgetItem *item = new KPageWidgetItem( page, i18n( "Colors" ) );
item->setHeader( i18n( "Colors of Main Window" ) );
item->setIcon( KIcon( "colors" ) );
KPageWidget *pageWidget = new KPageWidget( this );
pageWidget->addPage( item );
Author
Tobias Koenig (tokoe.nosp@m.@kde.nosp@m..org)

Definition at line 50 of file kpagewidgetmodel.h.

Constructor & Destructor Documentation

KPageWidgetItem::KPageWidgetItem ( QWidget *  widget)

Creates a new page widget item.

Parameters
widgetThe widget that is shown as page in the KPageWidget.

Hide the widget, otherwise when the widget has this KPageView as parent the widget is shown outside the QStackedWidget if the page was not selected ( and reparented ) yet.

Definition at line 53 of file kpagewidgetmodel.cpp.

KPageWidgetItem::KPageWidgetItem ( QWidget *  widget,
const QString &  name 
)

Creates a new page widget item.

Parameters
widgetThe widget that is shown as page in the KPageWidget.
nameThe localized string that is show in the navigation view of the KPageWidget.

Hide the widget, otherwise when the widget has this KPageView as parent the widget is shown outside the QStackedWidget if the page was not selected ( and reparented ) yet.

Definition at line 67 of file kpagewidgetmodel.cpp.

KPageWidgetItem::~KPageWidgetItem ( )

Destroys the page widget item.

Definition at line 82 of file kpagewidgetmodel.cpp.

Member Function Documentation

void KPageWidgetItem::changed ( )
signal

This signal is emitted whenever the icon or header is changed.

QString KPageWidgetItem::header ( ) const

Returns the header of the page widget item.

KIcon KPageWidgetItem::icon ( ) const

Returns the icon of the page widget item.

bool KPageWidgetItem::isCheckable ( ) const

Returns whether the page widget item is checkable.

Definition at line 149 of file kpagewidgetmodel.cpp.

bool KPageWidgetItem::isChecked ( ) const

Returns whether the page widget item is checked.

Definition at line 162 of file kpagewidgetmodel.cpp.

bool KPageWidgetItem::isEnabled ( ) const

Returns whether the page widget item is enabled.

Definition at line 96 of file kpagewidgetmodel.cpp.

QString KPageWidgetItem::name ( ) const

Returns the name of the page widget item.

void KPageWidgetItem::setCheckable ( bool  checkable)

Sets whether the page widget item is checkable in the view.

Parameters
checkableTrue if the page widget is checkable, otherwise false.

Definition at line 142 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::setChecked ( bool  checked)
slot

Sets whether the page widget item is checked.

Definition at line 154 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::setEnabled ( bool  enabled)
slot

Sets whether the page widget item is enabled.

Definition at line 87 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::setHeader ( const QString &  header)

Sets the header of the page widget item.

If setHeader(QString()) is used, what is the default if the header does not got set explicit, then the defined name() will also be used for the header. If setHeader("") is used, the header will be hidden even if the KPageView::FaceType is something else then Tabbed.

Parameters
headerHeader of the page widget item.

Definition at line 118 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::setIcon ( const KIcon &  icon)

Sets the icon of the page widget item.

Parameters
iconIcon of the page widget item.

Definition at line 130 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::setName ( const QString &  name)

Sets the name of the item as shown in the navigation view of the page widget.

Definition at line 106 of file kpagewidgetmodel.cpp.

void KPageWidgetItem::toggled ( bool  checked)
signal

This signal is emitted whenever the user checks or unchecks the item of.

See also
setChecked() is called.
QWidget * KPageWidgetItem::widget ( ) const

Returns the widget of the page widget item.

Definition at line 101 of file kpagewidgetmodel.cpp.

Property Documentation

bool KPageWidgetItem::checkable
readwrite

Definition at line 56 of file kpagewidgetmodel.h.

bool KPageWidgetItem::checked
readwrite

Definition at line 57 of file kpagewidgetmodel.h.

bool KPageWidgetItem::enabled
readwrite

This property holds whether the item is enabled.

It dis-/enables both the widget and the item in the list-/treeview.

Definition at line 63 of file kpagewidgetmodel.h.

QString KPageWidgetItem::header
readwrite

Definition at line 54 of file kpagewidgetmodel.h.

KIcon KPageWidgetItem::icon
readwrite

Definition at line 55 of file kpagewidgetmodel.h.

QString KPageWidgetItem::name
readwrite

Definition at line 53 of file kpagewidgetmodel.h.


The documentation for this class was generated from the following files:
  • kpagewidgetmodel.h
  • kpagewidgetmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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