40 const char* name ) :
QWidget(parent,name)
59 http.setHost(
"albumshaper.sourceforge.net" );
61 if(((
Window*)parentWidget())->getConfig()->getBool(
"alerts",
"showSoftwareUpdateAlerts"))
67 grid =
new Q3GridLayout(
this, 1, 6, 0 );
72 grid->setColStretch( 3, 1 );
79 #if defined(Q_OS_MACX) || defined(Q_OS_WIN)
80 QSizeGrip* sizeGrip =
new QSizeGrip(
this );
81 grid->addWidget( sizeGrip, 0, 5, Qt::AlignBottom );
157 QFile fetchedDoc(
TEMP_DIR + QString(
"/releases.xml") );
158 if(fetchedDoc.open(QIODevice::WriteOnly))
162 Q3TextStream stream( &fetchedDoc );
163 stream.setEncoding( Q3TextStream::UnicodeUTF8 );
164 stream << QString(
http.readAll() );
169 if( !fetchedDoc.open( QIODevice::ReadOnly ) )
176 if( !xmlDom.setContent( &fetchedDoc ) )
189 QStringList releases;
190 QDomElement root = xmlDom.documentElement();
191 QDomNode node = root.firstChild();
193 bool thisVersionFound =
false;
194 while( !node.isNull() )
196 if( node.isElement() && node.nodeName() ==
"release" )
198 val = node.firstChild().toText();
202 releases.append( QString(val.nodeValue()) );
206 thisVersionFound =
true;
209 node = node.nextSibling();
217 QMovie *m =
new QMovie( QString(
IMAGE_PATH)+
"miscImages/updateAvailable.mng");
219 QToolTip::add( uA, tr(
"Your copy of Album Shaper is not up to date! Click here for details") );
220 grid->addWidget( uA, 0, 4, Qt::AlignVCenter );
221 connect( uA, SIGNAL(clicked()),
222 ((
Window*)parentWidget())->getTitle(), SLOT(aboutProgram()) );