30 #ifndef _TDEABOUTDIALOG_H_
31 #define _TDEABOUTDIALOG_H_
33 #include <kdialogbase.h>
44 class TDEAboutWidgetPrivate;
46 class TDEAboutContainerPrivate;
56 int margin=0,
int spacing=0,
57 int childAlignment = AlignCenter,
58 int innerAlignment = AlignCenter );
60 void addWidget( TQWidget *widget );
61 void addPerson(
const TQString &name,
const TQString &email,
62 const TQString &url,
const TQString &task,
63 bool showHeader =
false,
bool showframe =
false,
64 bool showBold =
false );
65 void addTitle(
const TQString &title,
int alignment=AlignLeft,
66 bool showframe =
false,
bool showBold =
false );
67 void addImage(
const TQString &fileName,
int alignment=AlignLeft );
69 virtual TQSize sizeHint(
void )
const;
70 virtual TQSize minimumSizeHint(
void )
const;
73 virtual void childEvent( TQChildEvent *e );
76 void urlClick(
const TQString &url );
77 void mailClick(
const TQString &name,
const TQString &address );
83 TDEAboutContainerPrivate*
const d;
86 class TDEAboutContributorPrivate;
98 const TQString &username=TQString::null,
99 const TQString &email=TQString::null,
100 const TQString &url=TQString::null,
101 const TQString &work=TQString::null,
102 bool showHeader=
false,
bool showFrame=
true,
103 bool showBold=
false );
105 void setName(
const TQString &text,
const TQString &header=TQString::null,
106 bool update =
true );
107 void setEmail(
const TQString &text,
const TQString &header=TQString::null,
108 bool update =
true );
109 void setURL(
const TQString &text,
const TQString &header=TQString::null,
110 bool update =
true );
111 void setWork(
const TQString &text,
const TQString &header=TQString::null,
112 bool update =
true );
113 TQString getName(
void )
const;
114 TQString getEmail(
void )
const;
115 TQString getURL(
void )
const;
116 TQString getWork(
void )
const;
118 virtual TQSize sizeHint(
void )
const;
121 virtual void fontChange(
const TQFont &oldFont );
124 void urlClickedSlot(
const TQString& );
125 void emailClickedSlot(
const TQString& emailaddress );
128 void updateLayout(
void );
131 void sendEmail(
const TQString& name,
const TQString& email);
132 void openURL(
const TQString& url);
140 TDEAboutContributorPrivate*
const d;
142 virtual void setName(
const char *_name) { TQFrame::setName(_name); }
170 void setLogo(
const TQPixmap&);
174 void setAuthor(
const TQString& name,
const TQString& email,
175 const TQString& url,
const TQString& work);
179 void setMaintainer(
const TQString& name,
const TQString& email,
180 const TQString& url,
const TQString& work);
184 void addContributor(
const TQString& name,
const TQString& email,
185 const TQString& url,
const TQString& work);
189 void setVersion(
const TQString& name);
195 void sendEmailSlot(
const TQString& name,
const TQString& email);
199 void openURLSlot(
const TQString& url);
205 void sendEmail(
const TQString& name,
const TQString& email);
216 void resizeEvent(TQResizeEvent*);
248 TDEAboutWidgetPrivate*
const d;
251 class TDEAboutDialogPrivate;
296 AbtImageLeft = 0x0008,
297 AbtImageRight = 0x0010,
298 AbtImageOnly = 0x0020,
300 AbtKDEStandard = AbtTabbed|AbtTitle|AbtImageLeft,
301 AbtAppStandard = AbtTabbed|AbtTitle|AbtProduct,
302 AbtImageAndTitle = AbtPlain|AbtTitle|AbtImageOnly
314 TDEAboutDialog( TQWidget *parent=0,
const char *name=0,
bool modal=
true );
341 TDEAboutDialog(
int dialogLayout,
const TQString &caption,
int buttonMask,
342 ButtonCode defaultButton, TQWidget *parent=0,
343 const char *name=0,
bool modal=
false,
bool separator =
false,
344 const TQString &user1 = TQString::null,
345 const TQString &user2 = TQString::null,
346 const TQString &user3 = TQString::null );
364 virtual void show(
void );
374 virtual void show( TQWidget *centerParent );
382 void setTitle(
const TQString &title );
391 void setImage(
const TQString &fileName );
405 void setIcon(
const TQString &fileName ) TDE_DEPRECATED;
412 void setProgramLogo(
const TQString &fileName );
425 void setProgramLogo(
const TQPixmap &pixmap );
435 void setImageBackgroundColor(
const TQColor &color );
444 void setImageFrame(
bool state );
457 void setProduct(
const TQString &appName,
const TQString &version,
458 const TQString &author,
const TQString &year );
472 TQFrame *addTextPage(
const TQString &title,
const TQString &text,
473 bool richText=
false,
int numLines=10 );
485 TQFrame *addLicensePage(
const TQString &title,
const TQString &text,
501 int childAlignment = AlignCenter,
int innerAlignment = AlignCenter );
516 int childAlignment = AlignCenter,
int innerAlignment = AlignCenter );
537 TQFrame *addPage(
const TQString &title );
544 void setLogo(
const TQPixmap&);
550 void setAuthor(
const TQString& name,
const TQString& email,
551 const TQString& url,
const TQString& work);
557 void setMaintainer(
const TQString& name,
const TQString& email,
558 const TQString& url,
const TQString& work);
564 void addContributor(
const TQString& name,
const TQString& email,
565 const TQString& url,
const TQString& work);
571 void setVersion(
const TQString& name);
577 static void imageURL( TQWidget *parent,
const TQString &caption,
578 const TQString &path,
const TQColor &imageColor,
579 const TQString &url );
588 void sendEmail(
const TQString& name,
const TQString& email);
612 void sendEmailSlot(
const TQString& name,
const TQString& email);
617 void openURLSlot(
const TQString& url);
624 virtual void mouseTrackSlot(
int mode,
const TQMouseEvent *e );
628 virtual void virtual_hook(
int id,
void* data );
630 TDEAboutDialogPrivate*
const d;
A dialog base class with standard buttons and predefined layouts.
A drop-in replacement for TQLabel that displays hyperlinks.
Used internally by TDEAboutDialog.
TDEAboutContainer can be used to make a application specific AboutDialog.
Used internally by TDEAboutWidget.
A KDialogBase with predefined main widget.
void sendEmail(const TQString &name, const TQString &email)
Send an email to this person.
void openURL(const TQString &url)
Open the selected URL.
TDEAboutContainerBase * mContainerBase
The main widget (Constructor II)
LayoutType
Layout formats.
TDEAboutWidget * about
The main widget (Constructor I)