26 #include <kaboutapplication.h>
27 #include <kaboutdialog_private.h>
28 #include <kaboutdata.h>
29 #include <kapplication.h>
32 #include <kurllabel.h>
33 #include <kactivelabel.h>
34 #include "ktextedit.h"
39 kapp ? kapp->caption() : TQString::null,
47 const char *name,
bool modal )
48 :
KAboutDialog( AbtTabbed|AbtProduct, aboutData->programName(), Close, Close,
51 buildDialog(aboutData);
54 void KAboutApplication::buildDialog(
const KAboutData *aboutData )
63 setProduct( kapp ? kapp->caption() : TQString::null, i18n(
"??"), TQString::null, TQString::null );
66 TQString appPageText =
67 i18n(
"No information available.\n"
68 "The supplied KAboutData object does not exist.");
69 TQLabel *appPageLabel =
new TQLabel(
"\n\n\n\n"+appPageText+
"\n\n\n\n", 0 );
70 appPage->addWidget( appPageLabel );
75 TQString::null, TQString::null );
83 appPageText +=
"\n" + aboutData->
otherText()+
"\n";
90 TQLabel *appPageLabel =
new TQLabel( appPageText, 0 );
91 appPage->addWidget( appPageLabel );
93 if (!aboutData->
homepage().isEmpty())
98 appPage->addWidget( url );
99 connect( url, TQT_SIGNAL(leftClickedURL(
const TQString &)),
103 int authorCount = aboutData->
authors().count();
106 TQString authorPageTitle = authorCount == 1 ?
107 i18n(
"A&uthor") : i18n(
"A&uthors");
116 if ( aboutData->
bugAddress().isEmpty() || aboutData->
bugAddress() ==
"submit@bugs.pearsoncomputing.net")
117 text = i18n(
"Please use <a href=\"http://bugs.pearsoncomputing.net\">http://bugs.pearsoncomputing.net</a> to report bugs.\n" );
119 if( aboutData->
authors().count() == 1 && ( aboutData->
authors().first().emailAddress() == aboutData->
bugAddress() ) )
121 text = i18n(
"Please report bugs to <a href=\"mailto:%1\">%2</a>.\n" ).arg( aboutData->
authors().first().emailAddress() ).arg( aboutData->
authors().first().emailAddress() );
124 text = i18n(
"Please report bugs to <a href=\"mailto:%1\">%2</a>.\n" ).arg(aboutData->
bugAddress()).arg(aboutData->
bugAddress() );
132 activeLabel->setText( text );
133 authorPage->addWidget( activeLabel );
136 TQValueList<KAboutPerson>::ConstIterator it;
137 for (it = aboutData->
authors().begin();
138 it != aboutData->
authors().end(); ++it)
140 authorPage->addPerson( (*it).name(), (*it).emailAddress(),
141 (*it).webAddress(), (*it).task() );
145 int creditsCount = aboutData->
credits().count();
150 TQValueList<KAboutPerson>::ConstIterator it;
151 for (it = aboutData->
credits().begin();
152 it != aboutData->
credits().end(); ++it)
154 creditsPage->addPerson( (*it).name(), (*it).emailAddress(),
155 (*it).webAddress(), (*it).task() );
159 const TQValueList<KAboutTranslator> translatorList = aboutData->
translators();
161 if(translatorList.count() > 0)
163 TQString text =
"<qt>";
165 TQValueList<KAboutTranslator>::ConstIterator it;
166 for(it = translatorList.begin(); it != translatorList.end(); ++it)
168 text += TQString(
"<p>%1<br> "
169 "<a href=\"mailto:%2\">%2</a></p>")
171 .arg((*it).emailAddress())
172 .arg((*it).emailAddress());
179 if (!aboutData->
license().isEmpty() )