KDEUI
kpagedialog.h
Go to the documentation of this file.
00001 /* 00002 * This file is part of the KDE Libraries 00003 * Copyright (C) 1999-2001 Mirko Boehm (mirko@kde.org) and 00004 * Espen Sand (espen@kde.org) 00005 * Holger Freyther <freyther@kde.org> 00006 * 2005-2006 Olivier Goffart <ogoffart at kde.org> 00007 * 2006 Tobias Koenig <tokoe@kde.org> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Library General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Library General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Library General Public License 00020 * along with this library; see the file COPYING.LIB. If not, write to 00021 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 * Boston, MA 02110-1301, USA. 00023 * 00024 */ 00025 #ifndef KPAGEDIALOG_H 00026 #define KPAGEDIALOG_H 00027 00028 #include <kdialog.h> 00029 #include <kpagewidget.h> 00030 00031 class KPageDialogPrivate; 00032 00065 class KDEUI_EXPORT KPageDialog : public KDialog 00066 { 00067 Q_OBJECT 00068 Q_DECLARE_PRIVATE(KPageDialog) 00069 00070 public: 00071 00087 enum FaceType 00088 { 00089 Auto = KPageView::Auto, 00090 Plain = KPageView::Plain, 00091 List = KPageView::List, 00092 Tree = KPageView::Tree, 00093 Tabbed = KPageView::Tabbed 00094 }; 00095 00096 public: 00100 explicit KPageDialog( QWidget *parent = 0, Qt::WFlags flags = 0 ); 00101 00105 ~KPageDialog(); 00106 00110 void setFaceType( FaceType faceType ); 00111 00120 KPageWidgetItem* addPage( QWidget *widget, const QString &name ); 00121 00127 void addPage( KPageWidgetItem *item ); 00128 00139 KPageWidgetItem* insertPage( KPageWidgetItem *before, QWidget *widget, const QString &name ); 00140 00149 void insertPage( KPageWidgetItem *before, KPageWidgetItem *item ); 00150 00160 KPageWidgetItem* addSubPage( KPageWidgetItem *parent, QWidget *widget, const QString &name ); 00161 00169 void addSubPage( KPageWidgetItem *parent, KPageWidgetItem *item ); 00170 00174 void removePage( KPageWidgetItem *item ); 00175 00180 void setCurrentPage( KPageWidgetItem *item ); 00181 00186 KPageWidgetItem* currentPage() const; 00187 00188 Q_SIGNALS: 00194 void currentPageChanged( KPageWidgetItem *current, KPageWidgetItem *before ); 00195 00201 void pageRemoved( KPageWidgetItem *page ); 00202 00203 protected: 00210 KPageDialog(KPageWidget *widget, QWidget *parent, Qt::WFlags flags = 0); 00211 KPageDialog(KPageDialogPrivate &dd, KPageWidget *widget, QWidget *parent, Qt::WFlags flags = 0); 00212 00216 KPageWidget *pageWidget(); 00217 00221 const KPageWidget *pageWidget() const; 00222 00231 void setPageWidget(KPageWidget *widget); 00232 00233 }; 00234 00235 #endif
KDE 4.6 API Reference