KDE3Support
k3aboutdialog_p.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 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 * 00021 */ 00022 00023 #ifndef K3ABOUTDIALOG_P_H 00024 #define K3ABOUTDIALOG_P_H 00025 00026 #include <QtGui/QWidget> 00027 00028 class QLabel; 00029 class QFrame; 00030 class QTabWidget; 00031 class QVBoxLayout; 00032 class K3AboutContainer; 00033 class K3AboutContainerBasePrivate; 00034 00039 class K3AboutContainerBase : public QWidget 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 enum LayoutType 00045 { 00046 AbtPlain = 0x0001, 00047 AbtTabbed = 0x0002, 00048 AbtTitle = 0x0004, 00049 AbtImageLeft = 0x0008, 00050 AbtImageRight = 0x0010, 00051 AbtImageOnly = 0x0020, 00052 AbtProduct = 0x0040, 00053 AbtKDEStandard = AbtTabbed|AbtTitle|AbtImageLeft, 00054 AbtAppStandard = AbtTabbed|AbtTitle|AbtProduct, 00055 AbtImageAndTitle = AbtPlain|AbtTitle|AbtImageOnly 00056 }; 00057 00058 public: 00059 K3AboutContainerBase( int layoutType, QWidget *parent = 0 ); 00060 QSize sizeHint( void ) const; 00061 00062 void setTitle( const QString &title ); 00063 void setImage( const QString &fileName ); 00064 void setImageBackgroundColor( const QColor &color ); 00065 void setImageFrame( bool state ); 00066 void setProgramLogo( const QString &fileName ); 00067 void setProgramLogo( const QPixmap &pixmap ); 00068 void setProduct( const QString &appName, const QString &version, 00069 const QString &author, const QString &year ); 00070 00071 QFrame *addTextPage( const QString &title, const QString &text, 00072 bool richText=false, int numLines=10 ); 00073 QFrame *addLicensePage( const QString &title, const QString &text, 00074 int numLines=10 ); 00075 K3AboutContainer *addContainerPage( const QString &title, 00076 Qt::Alignment childAlignment = Qt::AlignCenter, Qt::Alignment innerAlignment = Qt::AlignCenter ); 00077 K3AboutContainer *addScrolledContainerPage( const QString &title, 00078 Qt::Alignment childAlignment = Qt::AlignCenter, Qt::Alignment innerAlignment = Qt::AlignCenter ); 00079 00080 QFrame *addEmptyPage( const QString &title ); 00081 00082 K3AboutContainer *addContainer( Qt::Alignment childAlignment, Qt::Alignment innerAlignment ); 00083 00084 protected: 00085 void fontChange( const QFont &oldFont ); 00086 00087 private: 00088 QVBoxLayout *mTopLayout; 00089 QLabel *mImageLabel; 00090 QLabel *mTitleLabel; 00091 QLabel *mIconLabel; 00092 QLabel *mVersionLabel; 00093 QLabel *mAuthorLabel; 00094 QFrame *mImageFrame; 00095 QTabWidget *mPageTab; 00096 QFrame *mPlainSpace; 00097 00098 K3AboutContainerBasePrivate* const d; 00099 }; 00100 00101 #endif 00102
KDE 4.6 API Reference