kdeui Library API Documentation

kdialog.h

00001 /*  This file is part of the KDE Libraries
00002  *  Copyright (C) 1998 Thomas Tanghus (tanghus@earthling.net)
00003  *  Additions 1999-2000 by Espen Sand (espen@kde.org)
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to
00017  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  *  Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef _KDIALOG_H_
00022 #define _KDIALOG_H_
00023 
00024 class QLayoutItem;
00025 
00026 #include <qdialog.h>
00027 
00051 class KDialog : public QDialog
00052 {
00053   Q_OBJECT
00054 
00055   public:
00056 
00062     KDialog(QWidget *parent = 0, const char *name = 0,
00063         bool modal = false, WFlags f = 0);
00064 
00069     static int marginHint();
00070 
00075     static int spacingHint();
00076 
00083     static void resizeLayout( QWidget *widget, int margin, int spacing );
00084 
00091     static void resizeLayout( QLayoutItem *lay, int margin, int spacing );
00092 
00099     static void centerOnScreen( QWidget *widget, int screen = -1 );
00100 
00101   public slots:
00102     // If the dialog starts with focus in a QLineEdit child,
00103     //  then call selectAll() on the child.
00104     virtual void polish();
00105 
00113     virtual void setCaption( const QString &caption );
00114 
00121     virtual void setPlainCaption( const QString &caption );
00122 
00123 
00124   protected:
00128     virtual void keyPressEvent(QKeyEvent*);
00129 
00130 
00131    signals:
00139     void layoutHintChanged();
00140 
00141   private:
00142     static int mMarginSize;
00143     static int mSpacingSize;
00144 
00145   protected:
00146     virtual void virtual_hook( int id, void* data );
00147   private:
00148     class KDialogPrivate;
00149     KDialogPrivate *d;
00150 
00151 };
00152 
00153 
00169 class KDialogQueuePrivate;
00170 class KDialogQueue : public QObject
00171 {
00172       Q_OBJECT
00173 
00174 public:
00175 
00176       static void queueDialog(QDialog *);
00177 
00178       ~KDialogQueue();
00179 
00180 protected:
00181       KDialogQueue();
00182       static KDialogQueue *self();
00183 
00184 private slots:
00185       void slotShowQueuedDialog();
00186 
00187 protected:
00188       KDialogQueuePrivate *d;
00189       static KDialogQueue *_self;
00190 };
00191 
00192 #endif // __KDIALOG_H
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:15:02 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001