51{
53
54 QColor white(255, 255, 255);
55 QColor darkBlue(35, 75, 139);
56 QColor black(0, 0, 0);
57
58
60
61
62 setCaption( tr("About Album Shaper"));
63
64
66 logoFrame->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
69
70
72 if(((
Window*)(qApp->mainWidget()))->getConfig()->getBool(
"alerts",
"showSoftwareUpdateAlerts"))
73 {
74
75 http.setHost(
"albumshaper.sourceforge.net" );
77
78
79
80
82 http.get(
"/webService/releases.xml");
83 }
84
85
86 QDate currentDate = QDate::currentDate();
87 int copyYearFirst = QMIN( currentDate.year(), 2003 );
88 int copyYearLast = QMAX( currentDate.year(), 2004 );
89
90
93 ", © %1-%2 Will Stokes").arg(copyYearFirst).arg(copyYearLast),
94 logoFrame );
95
96 progURL =
new QLabel(
"http://albumshaper.sourceforge.net", logoFrame );
97
98
100 textFont.setWeight(QFont::Bold);
103
104
106
107
109 credits->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
111 credits->setSource(
"about.html");
113 QIcon( QPixmap(QString(
IMAGE_PATH)+
"tabIcons/credits.png") ),
114 tr("Credits") );
115
116
118 history->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
120 history->setSource(
"history.html");
122 QIcon( QPixmap(QString(
IMAGE_PATH)+
"tabIcons/history.png") ),
123 tr("History") );
124
125
127
128 #ifndef Q_OS_MACX
129 QPixmap(QString(
IMAGE_PATH)+
"buttonIcons/button_ok.png"),
130 #endif
131 tr("Close"),
132 this );
133 closeButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
135 connect(
closeButton, SIGNAL(clicked()), SLOT(close()) );
136
137 logoFrame->setPaletteBackgroundColor( darkBlue );
138 progDesc->setPaletteForegroundColor( white );
139 progDesc->setPaletteBackgroundColor( darkBlue );
140 progURL->setPaletteForegroundColor( white );
141 progURL->setPaletteBackgroundColor( darkBlue );
142 tabWidget->setPaletteForegroundColor( black );
143
144 Q3GridLayout* logoGrid = new Q3GridLayout( logoFrame, 4, 3, 0);
147 logoGrid->addWidget(
progDesc, 2, 1, Qt::AlignCenter );
148 logoGrid->addWidget(
progURL, 3, 1, Qt::AlignCenter );
149
150 grid =
new Q3GridLayout(
this, 3, 1, 0);
152 grid->addWidget( logoFrame, 0, 0 );
156
157
158 if( currentDate.year() > 2003 && currentDate.month() == 4 && currentDate.day() <= 3)
159 {
161 cakeLogo->setPixmap( QPixmap( QString(
IMAGE_PATH)+
"miscImages/birthdayL.png" ) );
163 cakeLogo2->setPixmap( QPixmap( QString(
IMAGE_PATH)+
"miscImages/birthdayR.png" ) );
164 QLabel* cakeMessage =
new QLabel( QString( tr(
"Happy Birthday Album Shaper!") +
165 QString(" %1 ").arg(currentDate.year() - 2003) +
166 ( currentDate.year()-2003 == 1 ? tr("Year Old!") : tr("Years Old!")) ), logoFrame );
167 cakeMessage->setFont(textFont);
168 cakeMessage->setPaletteForegroundColor( white );
169
170 logoGrid->addWidget( cakeLogo, 0, 0, Qt::AlignCenter );
171 logoGrid->addWidget( cakeLogo2, 0, 2, Qt::AlignCenter );
172 logoGrid->addMultiCellWidget( cakeMessage, 1, 1, 0, 2, Qt::AlignCenter );
173 }
174
175
176 this->show();
177 setFixedSize(size());
178
179}
QPushButton * closeButton
Close button.
void fileFetched(bool error)
Top level widget, encapsulates the title widget, the layout widget, and the toolbar widget.
#define ALBUMSHAPER_VERSION