kdeui Library API Documentation

kaboutdialog_private.h

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., 59 Temple Place - Suite 330, 00019 * Boston, MA 02111-1307, USA. 00020 * 00021 */ 00022 00023 #ifndef _KABOUTDIALOG_PRIVATE_H_ 00024 #define _KABOUTDIALOG_PRIVATE_H_ 00025 00026 #include <qlabel.h> 00027 class QFrame; 00028 class QTabWidget; 00029 class QVBoxLayout; 00030 00035 class KImageTrackLabel : public QLabel 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 enum MouseMode 00041 { 00042 MousePress = 1, 00043 MouseRelease, 00044 MouseDoubleClick, 00045 MouseMove 00046 }; 00047 00048 public: 00049 KImageTrackLabel( QWidget * parent, const char * name=0, WFlags f=0 ); 00050 00051 signals: 00052 void mouseTrack( int mode, const QMouseEvent *e ); 00053 00054 protected: 00055 virtual void mousePressEvent( QMouseEvent *e ); 00056 virtual void mouseReleaseEvent( QMouseEvent *e ); 00057 virtual void mouseDoubleClickEvent( QMouseEvent *e ); 00058 virtual void mouseMoveEvent ( QMouseEvent *e ); 00059 }; 00060 00061 class KAboutContainer; 00062 00063 class KAboutContainerBasePrivate; 00064 00069 class KAboutContainerBase : public QWidget 00070 { 00071 Q_OBJECT 00072 00073 public: 00074 enum LayoutType 00075 { 00076 AbtPlain = 0x0001, 00077 AbtTabbed = 0x0002, 00078 AbtTitle = 0x0004, 00079 AbtImageLeft = 0x0008, 00080 AbtImageRight = 0x0010, 00081 AbtImageOnly = 0x0020, 00082 AbtProduct = 0x0040, 00083 AbtKDEStandard = AbtTabbed|AbtTitle|AbtImageLeft, 00084 AbtAppStandard = AbtTabbed|AbtTitle|AbtProduct, 00085 AbtImageAndTitle = AbtPlain|AbtTitle|AbtImageOnly 00086 }; 00087 00088 public: 00089 KAboutContainerBase( int layoutType, QWidget *parent = 0, char *name = 0 ); 00090 virtual void show( void ); 00091 virtual QSize sizeHint( void ) const; 00092 00093 void setTitle( const QString &title ); 00094 void setImage( const QString &fileName ); 00095 void setImageBackgroundColor( const QColor &color ); 00096 void setImageFrame( bool state ); 00097 void setProduct( const QString &appName, const QString &version, 00098 const QString &author, const QString &year ); 00099 00100 QFrame *addTextPage( const QString &title, const QString &text, 00101 bool richText=false, int numLines=10 ); 00102 QFrame *addLicensePage( const QString &title, const QString &text, 00103 int numLines=10 ); 00104 KAboutContainer *addContainerPage( const QString &title, 00105 int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); 00106 KAboutContainer *addScrolledContainerPage( const QString &title, 00107 int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); 00108 00109 QFrame *addEmptyPage( const QString &title ); 00110 00111 KAboutContainer *addContainer( int childAlignment, int innerAlignment ); 00112 00113 public slots: 00114 virtual void slotMouseTrack( int mode, const QMouseEvent *e ); 00115 virtual void slotUrlClick( const QString &url ); 00116 virtual void slotMailClick( const QString &name, const QString &address ); 00117 00118 protected: 00119 virtual void fontChange( const QFont &oldFont ); 00120 00121 signals: 00122 void mouseTrack( int mode, const QMouseEvent *e ); 00123 void urlClick( const QString &url ); 00124 void mailClick( const QString &name, const QString &address ); 00125 00126 private: 00127 QMemArray<QWidget*> mContainerList; 00128 00129 QVBoxLayout *mTopLayout; 00130 KImageTrackLabel *mImageLabel; 00131 QLabel *mTitleLabel; 00132 QLabel *mIconLabel; 00133 QLabel *mVersionLabel; 00134 QLabel *mAuthorLabel; 00135 QFrame *mImageFrame; 00136 QTabWidget *mPageTab; 00137 QFrame *mPlainSpace; 00138 00139 KAboutContainerBasePrivate *d; 00140 }; 00141 00142 00143 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:48:42 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003