|
|
@ -15,7 +15,7 @@
|
|
|
|
* *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/* Unfortunately KDE doesn't provide the class KAboutContainerBase
|
|
|
|
/* Unfortunately KDE doesn't provide the class TDEAboutContainerBase
|
|
|
|
to public programming, so we have to copy most of that code into
|
|
|
|
to public programming, so we have to copy most of that code into
|
|
|
|
an own class :(
|
|
|
|
an own class :(
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -39,7 +39,7 @@
|
|
|
|
#include <kurllabel.h>
|
|
|
|
#include <kurllabel.h>
|
|
|
|
|
|
|
|
|
|
|
|
// copied (and renamed) from kaboutdialog.cpp
|
|
|
|
// copied (and renamed) from kaboutdialog.cpp
|
|
|
|
// original: KAboutTabWidget
|
|
|
|
// original: TDEAboutTabWidget
|
|
|
|
|
|
|
|
|
|
|
|
class TDERadioAboutTabWidget : public TQTabWidget
|
|
|
|
class TDERadioAboutTabWidget : public TQTabWidget
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -52,7 +52,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// copied (renamed and extended) from kaboutdialog.cpp
|
|
|
|
// copied (renamed and extended) from kaboutdialog.cpp
|
|
|
|
// original: KAboutContainerBase
|
|
|
|
// original: TDEAboutContainerBase
|
|
|
|
|
|
|
|
|
|
|
|
TDERadioAboutWidget::TDERadioAboutWidget(const TDEAboutData &aboutData, int layoutType, TQWidget *_parent,
|
|
|
|
TDERadioAboutWidget::TDERadioAboutWidget(const TDEAboutData &aboutData, int layoutType, TQWidget *_parent,
|
|
|
|
char *_name )
|
|
|
|
char *_name )
|
|
|
@ -273,7 +273,7 @@ TQFrame *TDERadioAboutWidget::addLicensePage( const TQString &title,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *TDERadioAboutWidget::addContainerPage( const TQString &title,
|
|
|
|
TDEAboutContainer *TDERadioAboutWidget::addContainerPage( const TQString &title,
|
|
|
|
int childAlignment,
|
|
|
|
int childAlignment,
|
|
|
|
int innerAlignment )
|
|
|
|
int innerAlignment )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -283,7 +283,7 @@ KAboutContainer *TDERadioAboutWidget::addContainerPage( const TQString &title,
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *container = new KAboutContainer( mPageTab, "container",
|
|
|
|
TDEAboutContainer *container = new TDEAboutContainer( mPageTab, "container",
|
|
|
|
KDialog::spacingHint(), KDialog::spacingHint(), childAlignment,
|
|
|
|
KDialog::spacingHint(), KDialog::spacingHint(), childAlignment,
|
|
|
|
innerAlignment );
|
|
|
|
innerAlignment );
|
|
|
|
mPageTab->addTab( container, title );
|
|
|
|
mPageTab->addTab( container, title );
|
|
|
@ -302,7 +302,7 @@ KAboutContainer *TDERadioAboutWidget::addContainerPage( const TQString &title,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *TDERadioAboutWidget::addScrolledContainerPage(
|
|
|
|
TDEAboutContainer *TDERadioAboutWidget::addScrolledContainerPage(
|
|
|
|
const TQString &title,
|
|
|
|
const TQString &title,
|
|
|
|
int childAlignment,
|
|
|
|
int childAlignment,
|
|
|
|
int innerAlignment )
|
|
|
|
int innerAlignment )
|
|
|
@ -319,7 +319,7 @@ KAboutContainer *TDERadioAboutWidget::addScrolledContainerPage(
|
|
|
|
scrollView->viewport()->setBackgroundMode( PaletteBackground );
|
|
|
|
scrollView->viewport()->setBackgroundMode( PaletteBackground );
|
|
|
|
vbox->addWidget( scrollView );
|
|
|
|
vbox->addWidget( scrollView );
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *container = new KAboutContainer( scrollView, "container",
|
|
|
|
TDEAboutContainer *container = new TDEAboutContainer( scrollView, "container",
|
|
|
|
KDialog::spacingHint(), KDialog::spacingHint(), childAlignment,
|
|
|
|
KDialog::spacingHint(), KDialog::spacingHint(), childAlignment,
|
|
|
|
innerAlignment );
|
|
|
|
innerAlignment );
|
|
|
|
scrollView->addChild( container );
|
|
|
|
scrollView->addChild( container );
|
|
|
@ -350,10 +350,10 @@ TQFrame *TDERadioAboutWidget::addEmptyPage( const TQString &title )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *TDERadioAboutWidget::addContainer( int childAlignment,
|
|
|
|
TDEAboutContainer *TDERadioAboutWidget::addContainer( int childAlignment,
|
|
|
|
int innerAlignment )
|
|
|
|
int innerAlignment )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KAboutContainer *container = new KAboutContainer( this, "container",
|
|
|
|
TDEAboutContainer *container = new TDEAboutContainer( this, "container",
|
|
|
|
0, KDialog::spacingHint(), childAlignment, innerAlignment );
|
|
|
|
0, KDialog::spacingHint(), childAlignment, innerAlignment );
|
|
|
|
mTopLayout->addWidget( container, 0, childAlignment );
|
|
|
|
mTopLayout->addWidget( container, 0, childAlignment );
|
|
|
|
|
|
|
|
|
|
|
@ -487,7 +487,7 @@ void TDERadioAboutWidget::slotMailClick( const TQString &/*_name*/,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// copied (and renamed) from kaboutapplication.cpp
|
|
|
|
// copied (and renamed) from kaboutapplication.cpp
|
|
|
|
// original: KAboutApplication::buildDialog
|
|
|
|
// original: TDEAboutApplication::buildDialog
|
|
|
|
|
|
|
|
|
|
|
|
void TDERadioAboutWidget::setAboutData(const TDEAboutData &_aboutData)
|
|
|
|
void TDERadioAboutWidget::setAboutData(const TDEAboutData &_aboutData)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -505,7 +505,7 @@ void TDERadioAboutWidget::setAboutData(const TDEAboutData &_aboutData)
|
|
|
|
if (!aboutData->copyrightStatement().isEmpty())
|
|
|
|
if (!aboutData->copyrightStatement().isEmpty())
|
|
|
|
appPageText += "\n" + aboutData->copyrightStatement()+"\n";
|
|
|
|
appPageText += "\n" + aboutData->copyrightStatement()+"\n";
|
|
|
|
|
|
|
|
|
|
|
|
KAboutContainer *appPage = addContainerPage( i18n("&About"));
|
|
|
|
TDEAboutContainer *appPage = addContainerPage( i18n("&About"));
|
|
|
|
|
|
|
|
|
|
|
|
TQLabel *appPageLabel = new TQLabel( appPageText, 0 );
|
|
|
|
TQLabel *appPageLabel = new TQLabel( appPageText, 0 );
|
|
|
|
appPage->addWidget( appPageLabel );
|
|
|
|
appPage->addWidget( appPageLabel );
|
|
|
@ -525,9 +525,9 @@ void TDERadioAboutWidget::setAboutData(const TDEAboutData &_aboutData)
|
|
|
|
if (authorCount) {
|
|
|
|
if (authorCount) {
|
|
|
|
TQString authorPageTitle = authorCount == 1 ?
|
|
|
|
TQString authorPageTitle = authorCount == 1 ?
|
|
|
|
i18n("A&uthor") : i18n("A&uthors");
|
|
|
|
i18n("A&uthor") : i18n("A&uthors");
|
|
|
|
KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle );
|
|
|
|
TDEAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle );
|
|
|
|
TQValueList<KAboutPerson>::ConstIterator it = aboutData->authors().begin();
|
|
|
|
TQValueList<TDEAboutPerson>::ConstIterator it = aboutData->authors().begin();
|
|
|
|
TQValueList<KAboutPerson>::ConstIterator end = aboutData->authors().end();
|
|
|
|
TQValueList<TDEAboutPerson>::ConstIterator end = aboutData->authors().end();
|
|
|
|
for (; it != end; ++it) {
|
|
|
|
for (; it != end; ++it) {
|
|
|
|
authorPage->addPerson( (*it).name(), (*it).emailAddress(),
|
|
|
|
authorPage->addPerson( (*it).name(), (*it).emailAddress(),
|
|
|
|
(*it).webAddress(), (*it).task() );
|
|
|
|
(*it).webAddress(), (*it).task() );
|
|
|
@ -537,24 +537,24 @@ void TDERadioAboutWidget::setAboutData(const TDEAboutData &_aboutData)
|
|
|
|
int creditsCount = aboutData->credits().count();
|
|
|
|
int creditsCount = aboutData->credits().count();
|
|
|
|
|
|
|
|
|
|
|
|
if (creditsCount) {
|
|
|
|
if (creditsCount) {
|
|
|
|
KAboutContainer *creditsPage =
|
|
|
|
TDEAboutContainer *creditsPage =
|
|
|
|
addScrolledContainerPage( i18n("&Thanks To") );
|
|
|
|
addScrolledContainerPage( i18n("&Thanks To") );
|
|
|
|
TQValueList<KAboutPerson>::ConstIterator it = aboutData->credits().begin();
|
|
|
|
TQValueList<TDEAboutPerson>::ConstIterator it = aboutData->credits().begin();
|
|
|
|
TQValueList<KAboutPerson>::ConstIterator end = aboutData->credits().end();
|
|
|
|
TQValueList<TDEAboutPerson>::ConstIterator end = aboutData->credits().end();
|
|
|
|
for (; it != end; ++it) {
|
|
|
|
for (; it != end; ++it) {
|
|
|
|
creditsPage->addPerson( (*it).name(), (*it).emailAddress(),
|
|
|
|
creditsPage->addPerson( (*it).name(), (*it).emailAddress(),
|
|
|
|
(*it).webAddress(), (*it).task() );
|
|
|
|
(*it).webAddress(), (*it).task() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const TQValueList<KAboutTranslator> translatorList = aboutData->translators();
|
|
|
|
const TQValueList<TDEAboutTranslator> translatorList = aboutData->translators();
|
|
|
|
|
|
|
|
|
|
|
|
if(translatorList.count() > 0) {
|
|
|
|
if(translatorList.count() > 0) {
|
|
|
|
KAboutContainer *translatorPage =
|
|
|
|
TDEAboutContainer *translatorPage =
|
|
|
|
addScrolledContainerPage( i18n("T&ranslation") );
|
|
|
|
addScrolledContainerPage( i18n("T&ranslation") );
|
|
|
|
|
|
|
|
|
|
|
|
TQValueList<KAboutTranslator>::ConstIterator it = translatorList.begin();
|
|
|
|
TQValueList<TDEAboutTranslator>::ConstIterator it = translatorList.begin();
|
|
|
|
TQValueList<KAboutTranslator>::ConstIterator end = translatorList.end();
|
|
|
|
TQValueList<TDEAboutTranslator>::ConstIterator end = translatorList.end();
|
|
|
|
for(; it != end; ++it) {
|
|
|
|
for(; it != end; ++it) {
|
|
|
|
translatorPage->addPerson((*it).name(), (*it).emailAddress(),
|
|
|
|
translatorPage->addPerson((*it).name(), (*it).emailAddress(),
|
|
|
|
0,0);
|
|
|
|
0,0);
|
|
|
|