16 #include <q3progressbar.h> 19 #include <qstringlist.h> 25 #include <qsizegrip.h> 27 #include <Q3GridLayout> 28 #include <Q3TextStream> 35 #include "../config.h" 36 #include "../configuration/configuration.h" 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 );
99 this->message->setText( message );
111 if(newMessage != QString::null)
113 this->
message->setText( newMessage );
136 this->message->setText( message );
138 timer->start( 2000, TRUE );
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()) );
224 updateAvailable = uA;
237 http.get(
"/webService/releases.xml");
Top level widget, encapsulates the title widget, the layout widget, and the toolbar widget...
#define ALBUMSHAPER_VERSION