From 533055e17757c5c78bcf89149f53cd8e1717437a Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sat, 27 Nov 2010 19:41:58 +0100 Subject: [PATCH] New update dialog. Not actually checking for updates yet. --- LameXP.vcproj | 82 ++++++++- gui/UpdateDialog.ui | 353 ++++++++++++++++++++++++++++++++++++++ res/Images.qrc | 1 + res/images/Wizard.png | Bin 0 -> 9752 bytes src/Config.h | 2 +- src/Dialog_MainWindow.cpp | 42 +++-- src/Dialog_Update.cpp | 69 ++++++++ src/Dialog_Update.h | 45 +++++ src/Encoder_Vorbis.cpp | 7 + 9 files changed, 586 insertions(+), 15 deletions(-) create mode 100644 gui/UpdateDialog.ui create mode 100644 res/images/Wizard.png create mode 100644 src/Dialog_Update.cpp create mode 100644 src/Dialog_Update.h diff --git a/LameXP.vcproj b/LameXP.vcproj index 2c57f400..73bd0112 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -314,6 +314,10 @@ RelativePath=".\src\Dialog_SplashScreen.cpp" > + + @@ -604,6 +608,40 @@ /> + + + + + + + + + + + @@ -715,7 +753,7 @@ @@ -725,7 +763,7 @@ @@ -735,7 +773,7 @@ @@ -1074,6 +1112,10 @@ RelativePath=".\tmp\MOC_Dialog_SplashScreen.cpp" > + + @@ -1426,6 +1468,40 @@ /> + + + + + + + + + + + diff --git a/gui/UpdateDialog.ui b/gui/UpdateDialog.ui new file mode 100644 index 00000000..35b4af31 --- /dev/null +++ b/gui/UpdateDialog.ui @@ -0,0 +1,353 @@ + + + UpdateDialog + + + + 0 + 0 + 622 + 364 + + + + LameXP Update Manager + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + + + + 164 + 314 + + + + + 164 + 314 + + + + + + + :/images/Wizard.png + + + + + + + + 0 + 314 + + + + + 16777215 + 314 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + true + + + QFrame::NoFrame + + + QFrame::Raised + + + 0 + + + + 18 + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 40 + + + + + + + + + 75 + true + + + + Please wait... + + + + + + + 24 + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + 0 + 2 + + + + + 16777215 + 2 + + + + QFrame::HLine + + + QFrame::Sunken + + + + + + + 6 + + + 10 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 140 + 0 + + + + Download && Install + + + + :/icons/accept.png:/icons/accept.png + + + + + + + + 90 + 0 + + + + Close + + + + :/icons/cross.png:/icons/cross.png + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + 0 + + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + closeButton + clicked() + UpdateDialog + reject() + + + 565 + 340 + + + 310 + 181 + + + + + diff --git a/res/Images.qrc b/res/Images.qrc index 6249dadd..47d7d308 100644 --- a/res/Images.qrc +++ b/res/Images.qrc @@ -13,5 +13,6 @@ images/Cogwheels.png images/Qt.svg images/Working.gif + images/Wizard.png diff --git a/res/images/Wizard.png b/res/images/Wizard.png new file mode 100644 index 0000000000000000000000000000000000000000..9cdec3c622885479a221fd181b1d2b65811beb0d GIT binary patch literal 9752 zcmV+zCg<6SP)Px#1ZP1_K>z@;j|==^1poj808mU+MF0Q*0s;X90|EvG0|y2K2nPfX3kD7i3lR_v z8y5~B9TzGi7BDO%Jv1anJS$m38C6Iwb5k8-R5xv0J9%L@d15trVm5kXIC^9`dSp9$ zW<5(wOI=)AZDLS$V?lUjKzwIFd}u>yXlQeDaejV%jc6yTd@hA=M~`<&n14`!bzz^0 zVWx>wu##G!i({*kWw@GRvYT?bp>oENH{78*?W{Y*pBN8V!EN%xZt}u!^2BTM#clG$Z}Y})^22fR#BuV)a`VS<^Tu=X z#B}k+cJsz`^T&4d$8q$>a`VS}^T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o6!Ffp2zhCJ9&fhrar5Bs-i|Nx zkfNVw)m~yzA*oyX7L3n$gK5YMX7VnQ>9@#u$t5DMvEc?L0&?a|k@=aSuUVBmK9-G7 zNoJZ>y=Zj-tBha!nn-L6eD(F?$pWM(oy^R7%aqgoQd94k0LU34@iT)LSysI|K4wiB zkJ5^hGsH9@v)(e~MN)}p`8(r#X$5koG637K@*;T@4>%7wL$NZeewJmOrz!CT@nprx z88ehd7qHAYYt~F@e9Wqj16geaa;9Wu$Oh#!nX)4$Wk;4J$eF5@ejAXpLa+=M%8NzW znP(MJ&B|Ikl+ySJC9dmbC)jPx$(b{im(R0NJF{k0NmJl}E+j6htU{_;AGBlTEX^vn zb3te1S0#Q5%aCd_wo^N^W@$=1>aWREQ>QIM&g6?*SWnrqvR+!{=0*O|n+`U3T8C6e z-*Q`&(keGAC&Ehp0W3q#n4zxw>;+sdai4}#m~0smI=YfhzH@DPDX($^5~Y$*)*)vq zQ?{%udlep0;sTQvw#}TJAqU)6OP^J*SK_R&?L(>o&#{-5_44>wL#^b6Z4+`PWTo0H z{r1vQo&x)@5p_tNDT_eVY)H-dz_Sdc7gV+OC}l3q&*#~Ol+rRQG{X+2W(usv+CR+!NNM273E6?1E|<6hnS-C) zZn&Z7)Y#LA6T9{06C*R+bPOm1Z9v##tFz7 zp&X|u)u7-j`g!&^0y#s9lf8&flPP^r*v>f#y9H{T>`_WVQJaM`PHHIabt3iSs)K`5 mkTay5w?|pUgHolov;PAs()efLyO+2C0000show("Checking for updates, please be patient..."); - - for(int i = 0; i < 300; i++) - { - QApplication::processEvents(); - Sleep(5); - } - - m_banner->close(); - - QMessageBox::information(this, "Update Check", "Your version of LameXP is still up-to-date. There are no updates available.\nPlease remember to check for updates at regular intervals!"); + UpdateDialog *updateDialog = new UpdateDialog(this); + updateDialog->exec(); + LAMEXP_DELETE(updateDialog); + + //m_banner->show("Checking for updates, please be patient..."); + // + //for(int i = 0; i < 300; i++) + //{ + // QApplication::processEvents(); + // Sleep(5); + //} + // + //QNetworkAccessManager networkMgr; + //QNetworkReply *reply = networkMgr.get(QNetworkRequest(QUrl( "http://mulder.dummwiedeutsch.de/update.ver"))); + + //QEventLoop loop; + //connect(reply, SIGNAL(readyRead()), &loop, SLOT(quit())); + //connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), &loop, SLOT(quit())); + //connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); + + //while(!reply->isFinished()) + //{ + // loop.exec(QEventLoop::ExcludeUserInputEvents); + // QByteArray buffer = reply->readAll(); + // qDebug("%s", buffer.constData()); + //} + + //m_banner->close(); + // + //QMessageBox::information(this, "Update Check", "Your version of LameXP is still up-to-date. There are no updates available.\nPlease remember to check for updates at regular intervals!"); } /* diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp new file mode 100644 index 00000000..0d86a2fd --- /dev/null +++ b/src/Dialog_Update.cpp @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2010 LoRd_MuldeR +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#include "Dialog_Update.h" + +#include +#include +#include + +#include + +UpdateDialog::UpdateDialog(QWidget *parent) +: + QDialog(parent) +{ + //Init the dialog, from the .ui file + setupUi(this); + setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); + setMinimumSize(size()); + setMaximumHeight(height()); + + //Disable "X" button + HMENU hMenu = GetSystemMenu((HWND) winId(), FALSE); + EnableMenuItem(hMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED); + + //Init flags + m_clipboardUsed = false; +} + +UpdateDialog::~UpdateDialog(void) +{ + if(m_clipboardUsed) + { + QApplication::clipboard()->clear(); + } +} + +void UpdateDialog::showEvent(QShowEvent *event) +{ + statusLabel->setText("Checking for new updates online, please wait..."); + QTimer::singleShot(8000, this, SLOT(updateCompleted())); + installButton->setEnabled(false); + closeButton->setEnabled(false); +} + +void UpdateDialog::updateCompleted(void) +{ + statusLabel->setText("No new updates avialbale. Your version of LameXP is up-to-date."); + closeButton->setEnabled(true); +} + diff --git a/src/Dialog_Update.h b/src/Dialog_Update.h new file mode 100644 index 00000000..5958594a --- /dev/null +++ b/src/Dialog_Update.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2010 LoRd_MuldeR +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "..\tmp\UIC_UpdateDialog.h" + +#include + +class UpdateDialog : public QDialog, private Ui::UpdateDialog +{ + Q_OBJECT + +public: + UpdateDialog(QWidget *parent = 0); + ~UpdateDialog(void); + +private slots: + void updateCompleted(void); + +protected: + void showEvent(QShowEvent *event); + + +private: + bool m_clipboardUsed; +}; diff --git a/src/Encoder_Vorbis.cpp b/src/Encoder_Vorbis.cpp index ee8c846b..525d7db0 100644 --- a/src/Encoder_Vorbis.cpp +++ b/src/Encoder_Vorbis.cpp @@ -156,6 +156,13 @@ bool VorbisEncoder::isFormatSupported(const QString &containerType, const QStrin return true; } } + else if(containerType.compare("FLAC", Qt::CaseInsensitive) == 0) + { + if(formatType.compare("FLAC", Qt::CaseInsensitive) == 0) + { + return true; + } + } return false; }