QtGain/0000755000175000017500000000000011362301707012027 5ustar michaelmichaelQtGain/Icons/0000755000175000017500000000000011326616342013106 5ustar michaelmichaelQtGain/src/0000755000175000017500000000000011311440441012607 5ustar michaelmichaelQtGain/ui/0000755000175000017500000000000011326614404012445 5ustar michaelmichaelQtGain/QtGain.pro0000770000175000017500000000054011220753567013743 0ustar michaelmichaelHEADERS += src/Preferences.h \ src/QtGain.h \ src/Core.h \ src/gradient.h SOURCES += src/main.cpp \ src/Preferences.cpp \ src/QtGain.cpp \ src/Core.cpp \ src/gradient.cpp FORMS += ui/Preferences.ui \ ui/QtGain.ui OBJECTS_DIR = build MOC_DIR = build UI_DIR = build DESTDIR = bin TEMPLATE = app RESOURCES = Ressourcen.qrc QtGain/LICENSE0000644000175000017500000004310311204531771013036 0ustar michaelmichael GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. QtGain/Ressourcen.qrc0000770000175000017500000000033011326616532014667 0ustar michaelmichael Icons/lsongs.png Icons/available.png Icons/unavailable.png Icons/reset.png QtGain/Icons/available.png0000750000175000017500000000114410512525054015525 0ustar michaelmichaelPNG  IHDRa+IDAT8]HSa98[jDb4JֈĺK$( ҺꪏnBȆ6-Ksu,)6t45u;{Dl\'ZHtPn_2gVvv!c $kD2d߭Í:%!' p?x< _Fr'* a}=2>WU忉Op1Y/ &f*ԒLG{`C!Փ?%:~4ހ^-! G#hlD}Q.KեզŤ'YqWS=tHYs䲭= :B#$&8pL8 ?,QOѪsg/=poL;A.KJ4Ovj/1b t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gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-gAMA|Q cHRMz%u0`:o_FIDATxڌSKTq=}xQr'V%V!&$dѪ\*. "[-zHI Bj>FSG\;ZLRl|8(c ;AKi[wZF<+.owF.pSs,r(@eVцR{@[o7|;Q_`(jx eCsb*X}R.:/r!ޙ)`"@Lj_P} TgWȲ!lcI2tbh'\,,urI|vbȼɉ-nJײB#`fCceae= ’ 7.,Q1ã6;ԕ.k$"!0~ft6 y,Fmn -ٙ b9{̕ttll(XW=9j'=#Y.6 R#P"@dX3Ѱ'^re'>ٿepRV8X<FPwMk.ٚsvR!w=ʞ=oaIENDB`QtGain/src/main.cpp0000770000175000017500000000306311362301623014245 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "QtGain.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QtGain w; a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); return a.exec(); } QtGain/src/QtGain.h0000750000175000017500000000456311362301623014155 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef QTGAIN_H #define QTGAIN_H #include #include "ui_QtGain.h" #include "Core.h" class QtGain : public QMainWindow, private Core { Q_OBJECT public: QtGain(QWidget *parent = 0, Qt::WFlags flags = 0); ~QtGain(); private: Ui::QtGainClass ui; QTimer *Timer; QProcess *myProcess; QAction *actionAbout; QAction *actionCancelOperation; QAction *actionShowSettings; QAction *actionQuit; void startupInitiations(); void processOutput(); void findFiles(const QString &dirName); void openDirectoryDialog(); void loadSettings(); void saveSettings(); void ContextmenuSetModus(bool isIdle); void showErrors(); public slots: void processFiles(); void showPreferencesDialog(); void Quit(); void cancelOperation(){Core::setOperationCanceled(true);} void showAboutDialog(); void updateGUI(); protected: void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); void closeEvent(QCloseEvent *event); }; #endif // QTGAIN_H QtGain/src/Core.h0000644000175000017500000001172411362301551013661 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef CORE_H #define CORE_H #include #include #include class Core{ public: Core(); ~Core(){}; QListallFiles; void resetVariables(); QString FilenameWithoutPath(const int &Nummer); QString TimeUpdateString(); void setStartTime(){m_Now = QDateTime::currentDateTime();} void addFinishedFiles() { ++m_finishedFiles; ++m_filesProcessed; ++m_filesGained; } int finishedFiles() const {return m_finishedFiles;} void addSkippedFiles() { ++m_skippedFiles; --m_filesGained; } int skippedFiles() const {return m_skippedFiles;} void addErrors() { ++m_Errors; --m_filesGained; } int Errors() const {return m_Errors;} void setVolume(const int &val) {m_Volume = val;} int Volume() const {return m_Volume;} void setTrackGain(const bool &val) {m_isTrackGain = val;} bool isTrackGain() const {return m_isTrackGain;} void setShowBrowserAtStatup(const bool &val) {m_isShowBrowser = val;} bool isShowBrowserAtStatup() const {return m_isShowBrowser;} void setOperationCanceled(const bool &val) {m_isCancel = val;} bool isOperationCanceled() const {return m_isCancel;} void addToErrorlog(const QString &Error) {m_Errorlog.append(Error);} QString ErrorLog() const {return m_Errorlog;} bool isLogSkippedFiles() const {return m_isLogSkippedFiles;} void setIsLogSkippedFiles(const bool &val) {m_isLogSkippedFiles = val;} void setCurrentFileName(const QString &val) {m_Filename = val;} QString currentFileName() const {return m_Filename;} bool isMP3GainFound() const {return m_isMP3Gain_found;} void setIsMP3GainFound(const bool &val) {m_isMP3Gain_found = val;} bool isMP4Gain_found() const {return m_isMP4Gain_found;} void setIsMP4GainFound(const bool &val) {m_isMP4Gain_found = val;} bool isVorbisGainFound() const {return m_isVorbisGain_found;} void setIsVorbisGainFound(const bool &val) {m_isVorbisGain_found = val;} bool isFlacGainFound() const {return m_isFlacGain_found;} void setIsFlacGainFound(const bool &val) {m_isFlacGain_found = val;} QString MP3GainBinaryPath() const {return m_MP3GainBinaryPath;} void setMP3GainBinaryPath(const QString &Pfad){m_MP3GainBinaryPath = Pfad;} QString MP4GainBinaryPath() const {return m_MP4GainBinaryPath;} void setMP4GainBinaryPath(const QString &Pfad){m_MP4GainBinaryPath = Pfad;} QString VorbisGainBinaryPath() const {return m_VorbisGainBinaryPath;} void setVorbisGainBinaryPath(const QString &Pfad){m_VorbisGainBinaryPath = Pfad;} QString FlacGainBinaryPath() const {return m_FlacGainBinaryPath;} void setFlacGainBinaryPath(const QString &Pfad){m_FlacGainBinaryPath = Pfad;} void Statistic(int &filesProcessed, int &filesGained, QDate &installDate) { filesProcessed = m_filesProcessed; filesGained = m_filesGained; installDate = m_installDate; } void setStatistic(const int &filesProcessed, const int &filesGained, const QDate installDate) { m_filesProcessed = filesProcessed; m_filesGained = filesGained; m_installDate = installDate; } private: bool m_isTrackGain, m_isShowBrowser, m_isCancel, m_isMP3Gain_found, m_isMP4Gain_found, m_isVorbisGain_found, m_isFlacGain_found, m_isLogSkippedFiles; int m_finishedFiles, m_Errors, m_skippedFiles, m_Volume, m_filesProcessed, m_filesGained; QString m_MP3GainBinaryPath, m_VorbisGainBinaryPath, m_FlacGainBinaryPath, m_MP4GainBinaryPath; QString m_Errorlog, m_Filename; QDateTime m_Now; QDate m_installDate; }; #endif // CORE_H QtGain/src/Preferences.cpp0000750000175000017500000000760511362301551015566 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "Preferences.h" #include "QtGain.h" #include Preferences::Preferences(QWidget *parent) : QDialog(parent){ setupUi(this); } Preferences::~Preferences(){ } // Various file dialogs void Preferences::on_SelectMP3Binary_clicked(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Please select the MP3Gain binary"), "mp3gain", tr("All Files (*)")); if (!fileName.isEmpty()) MP3GainPfad->setText(fileName); setIcons(); } void Preferences::on_SelectMP4Binary_clicked(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Please select the aacgain binary"), "aacgain", tr("All Files (*)")); if (!fileName.isEmpty()) MP4GainPfad->setText(fileName); setIcons(); } void Preferences::on_SelectVorbisBinary_clicked(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Please select the VorbisGain binary"), "vorbisgain", tr("All Files (*)")); if (!fileName.isEmpty()) VorbisGainPfad->setText(fileName); setIcons(); } void Preferences::on_SelectFlacBinary_clicked(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Please select the Metaflac binary"), "metaflac", tr("All Files (*)")); if (!fileName.isEmpty()) FlacGainPfad->setText(fileName); setIcons(); } // Sets the right icon in the tabs void Preferences::setIcons(){ tabWidget->setTabIcon(1, QFile::exists(MP3GainPfad->text()) ? QIcon(":/Icons/available.png") : QIcon(":/Icons/unavailable.png")); tabWidget->setTabIcon(2, QFile::exists(MP4GainPfad->text()) ? QIcon(":/Icons/available.png") : QIcon(":/Icons/unavailable.png")); tabWidget->setTabIcon(3, QFile::exists(VorbisGainPfad->text()) ? QIcon(":/Icons/available.png") : QIcon(":/Icons/unavailable.png")); tabWidget->setTabIcon(4, QFile::exists(FlacGainPfad->text()) ? QIcon(":/Icons/available.png") : QIcon(":/Icons/unavailable.png")); } // Reset target volume to default void Preferences::on_pushButton_Reset_clicked(){ Pegel->setValue(89); } QtGain/src/QtGain.cpp0000750000175000017500000004704111362023152014504 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include #include #include #include #include #include #include #include "QtGain.h" #include "Preferences.h" QtGain::QtGain(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags){ ui.setupUi(this); startupInitiations(); loadSettings(); setWindowTitle("QtGain 0.8.2"); show(); if (isShowBrowserAtStatup()) openDirectoryDialog(); } QtGain::~QtGain(){ } // ********************************************************************************************* // Generate Contextmenu, Timer etc. // ********************************************************************************************* void QtGain::startupInitiations(){ actionAbout = new QAction(tr("About..."), this); connect(actionAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog())); actionCancelOperation = new QAction(tr("&Stop..."), this); actionCancelOperation->setShortcut(tr("Ctrl+S")); connect(actionCancelOperation, SIGNAL(triggered()), this, SLOT(cancelOperation())); actionShowSettings = new QAction(tr("&Configure"), this); actionShowSettings->setShortcut(tr("Ctrl+C")); connect(actionShowSettings, SIGNAL(triggered()), this, SLOT(showPreferencesDialog())); QAction *Separator = new QAction(this); Separator->setSeparator(true); actionQuit = new QAction(tr("E&xit"), this); actionQuit->setShortcut(tr("Ctrl+X")); connect(actionQuit, SIGNAL(triggered()), this, SLOT(Quit())); this->addAction(actionAbout); this->addAction(actionCancelOperation); this->addAction(actionShowSettings); this->addAction(Separator); this->addAction(actionQuit); actionCancelOperation->setEnabled(false); ui.centralWidget->setContextMenuPolicy(Qt::ActionsContextMenu); // Timer Timer = new QTimer(this); connect(Timer, SIGNAL(timeout()), this, SLOT(updateGUI())); myProcess = new QProcess(this); myProcess->setReadChannelMode(QProcess::MergedChannels); connect (myProcess, SIGNAL(finished(int)), this, SLOT(processFiles())); } // ********************************************************************************************* // Change state of context menu // ********************************************************************************************* void QtGain::ContextmenuSetModus(bool isIdle){ if (isIdle){ actionCancelOperation->setEnabled(false); Timer->stop(); } else { actionCancelOperation->setEnabled(true); setStartTime(); Timer->start(1000); ui.progressBar->setValue(0); ui.Fertig->setNum(0); ui.Uebersprungen->setNum(0); ui.Errors->setNum(0); ui.AnzahlDateien->display(0); ui.Status->setText("Working..."); ui.Zeitanzeige->setText("00:00:00"); } actionAbout->setEnabled(isIdle); actionShowSettings->setEnabled(isIdle); actionQuit->setEnabled(isIdle); } // ********************************************************************************************* // Start gaining of files // ********************************************************************************************* void QtGain::processFiles(){ // Cancel gaining if (isOperationCanceled()){ resetVariables(); ContextmenuSetModus(true); ui.Status->setText("Operation aborted..."); ui.Dateiname->clear(); ui.Folder->clear(); showErrors(); return; } // Check output of replay gain tools processOutput(); if (finishedFiles() < allFiles.size()){ QStringList Parameter; QFileInfo file(allFiles[finishedFiles()]); ui.Folder->setText(file.path().mid(file.path().lastIndexOf("/") + 1)); // current folder // MP3 if (allFiles[finishedFiles()].endsWith(".mp3", Qt::CaseInsensitive)){ (isTrackGain()) ? Parameter << "-r" : Parameter << "-a"; if (Volume() != 89) Parameter << "-m" << QString::number(Volume() - 89); Parameter << "-k" << "-c" << allFiles[finishedFiles()]; myProcess->start(MP3GainBinaryPath(), Parameter); } // MP4 / m4a else if (allFiles[finishedFiles()].contains(QRegExp("\\.(mp4|m4a)$", Qt::CaseInsensitive))){ (isTrackGain()) ? Parameter << "-r" : Parameter << "-a"; if (Volume() != 89) Parameter << "-m" << QString::number(Volume() - 89); Parameter << "-k" << "-c" << allFiles[finishedFiles()]; myProcess->start(MP4GainBinaryPath(), Parameter); } // Ogg-Vorbis else if (allFiles[finishedFiles()].endsWith(".ogg", Qt::CaseInsensitive)){ if (!isTrackGain()) Parameter << "-g " << QString::number(Volume() - 89); Parameter << "-f" << allFiles[finishedFiles()]; myProcess->start(VorbisGainBinaryPath(), Parameter); } // FLAC else if (allFiles[finishedFiles()].endsWith(".flac", Qt::CaseInsensitive)){ Parameter << "--add-replay-gain" << allFiles[finishedFiles()]; myProcess->start(FlacGainBinaryPath(), Parameter); } ui.Dateiname->setText(FilenameWithoutPath(finishedFiles())); } ui.Fertig->setNum(finishedFiles() - skippedFiles() - Errors()); ui.Uebersprungen->setNum(skippedFiles()); ui.AnzahlDateien->display(allFiles.size() - finishedFiles()); ui.Errors->setNum(Errors()); ui.progressBar->setValue((finishedFiles() * 100) / allFiles.size()); if (allFiles.size() == finishedFiles()) { ContextmenuSetModus(true); ui.Dateiname->clear(); ui.Folder->clear(); ui.Status->setText("Finished..."); showErrors(); resetVariables(); } else { setCurrentFileName(allFiles.at(finishedFiles())); addFinishedFiles(); } } // ********************************************************************************************* // Check the output of Replay gain tools // ********************************************************************************************* void QtGain::processOutput(){ QString Dummy(myProcess->readAll()); // No media file if (Dummy.contains("not a layer III file") || Dummy.contains("File does not contain Vorbis data") || Dummy.contains("The file does not appear to be a FLAC file.") || Dummy.contains("Can't find any valid MP3 frames in file") ){ addErrors(); addToErrorlog(QString("Not a valid media file :: %1
").arg(currentFileName())); } // Cannot access file else if (Dummy.contains("for reading")){ addErrors(); addToErrorlog(QString("Cannot read file :: %1
").arg(currentFileName())); } // Cannot write else if (Dummy.contains("Permission denied") || Dummy.contains("for modifying")){ addErrors(); addToErrorlog(QString("Cannot write file :: %1
").arg(currentFileName())); } // File already gained (only MP3 and Ogg-Vorbis) else if (Dummy.contains("are necessary") || Dummy.contains("Tags present;")){ addSkippedFiles(); if (isLogSkippedFiles()) addToErrorlog(QString("File already gained -> skipped :: %1
").arg(currentFileName())); } } // ********************************************************************************************* // Search for all files, including subdirs // ********************************************************************************************* void QtGain::findFiles(const QString &dirName){ if (!Timer->isActive()) ContextmenuSetModus(false); ui.Status->setText("Scanning directories..."); QDirIterator it(dirName, QDirIterator::Subdirectories); while (it.hasNext()) { qApp->processEvents(QEventLoop::ExcludeUserInputEvents); ui.AnzahlDateien->display(allFiles.size()); if (isOperationCanceled()) return; QString temp = it.next(); if ( ((temp.endsWith(".mp3", Qt::CaseInsensitive) && isMP3GainFound()) || (temp.endsWith(".ogg", Qt::CaseInsensitive) && isVorbisGainFound()) || (temp.endsWith(".flac", Qt::CaseInsensitive) && isFlacGainFound()) || (temp.contains(QRegExp("\\.(mp4|m4a)$", Qt::CaseInsensitive)) && isMP4Gain_found()) ) && !allFiles.contains(temp)) allFiles << temp; } ui.AnzahlDateien->display(allFiles.size()); } void QtGain::dragEnterEvent(QDragEnterEvent *event){ if (event->mimeData()->hasFormat("text/uri-list")) event->acceptProposedAction(); } // ********************************************************************************************* // Add files/directories via drag & drop // ********************************************************************************************* void QtGain::dropEvent(QDropEvent *event){ QFileInfo Tempfile; QList urls = event->mimeData()->urls(); if (urls.isEmpty()) return; for (int i=0; i 0){ ContextmenuSetModus(false); processFiles(); } else { ui.Status->setText("No media files found..."); ContextmenuSetModus(true); } } // ********************************************************************************************* // Show file dialog at startup // ********************************************************************************************* void QtGain::openDirectoryDialog(){ QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose a directory"), "", QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly); if (directory.isEmpty()) return; findFiles(directory); if (allFiles.size() > 0){ ContextmenuSetModus(false); processFiles(); } else { resetVariables(); ContextmenuSetModus(true); ui.Status->setText("No media files found..."); } } // ********************************************************************************************* // Show settings dialog // ********************************************************************************************* void QtGain::showPreferencesDialog(){ Preferences Preferences(this); Preferences.MP3GainPfad->setText(MP3GainBinaryPath()); Preferences.MP4GainPfad->setText(MP4GainBinaryPath()); Preferences.VorbisGainPfad->setText(VorbisGainBinaryPath()); Preferences.FlacGainPfad->setText(FlacGainBinaryPath()); Preferences.setIcons(); Preferences.Pegel->setValue(Volume()); if (!isTrackGain()) Preferences.isAlbumGain->setChecked(true); Preferences.isStartBrowserAtStartup->setChecked(isShowBrowserAtStatup()); Preferences.isLogSkippedFiles->setChecked(isLogSkippedFiles()); Preferences.exec(); if (Preferences.result()){ setMP3GainBinaryPath(Preferences.MP3GainPfad->text()); setMP4GainBinaryPath(Preferences.MP4GainPfad->text()); setVorbisGainBinaryPath(Preferences.VorbisGainPfad->text()); setVolume(Preferences.Pegel->value()); setTrackGain(Preferences.isTrackGain->isChecked()); setShowBrowserAtStatup(Preferences.isStartBrowserAtStartup->isChecked()); setIsLogSkippedFiles(Preferences.isLogSkippedFiles->isChecked()); // Check if Replay gain tools are available setIsMP3GainFound(QFile::exists(MP3GainBinaryPath())); setIsMP4GainFound(QFile::exists(MP4GainBinaryPath())); setIsVorbisGainFound(QFile::exists(VorbisGainBinaryPath())); setIsFlacGainFound(QFile::exists(FlacGainBinaryPath())); } } // ********************************************************************************************* // Load settings // ********************************************************************************************* void QtGain::loadSettings(){ QSettings settings("Vegeta", "QtGain"); move(settings.value("pos", QPoint(200, 200)).toPoint()); setMP3GainBinaryPath (settings.value("MP3Gain", "/usr/bin/mp3gain").toString()); setMP4GainBinaryPath (settings.value("aacgain", "/usr/bin/aacgain").toString()); setVorbisGainBinaryPath(settings.value("VorbisGain", "/usr/bin/vorbisgain").toString()); setFlacGainBinaryPath (settings.value("FlacGain", "/usr/bin/metaflac").toString()); setVolume(settings.value("Volume", 89).toInt()); setTrackGain(settings.value("TrackGain", true).toBool()); setShowBrowserAtStatup(settings.value("ShowBrowser", false).toBool()); setStatistic(settings.value("filesProcessed", 0).toInt(), settings.value("filesGained", 0).toInt(), settings.value("installDate", QDate::currentDate()).toDate()); setIsLogSkippedFiles(settings.value("isLogSkippedFiles", false).toBool()); // Fallback falls Replay-Gain-Tools über die geladenen Infos nicht gefunden werden können if (!QFile::exists(MP3GainBinaryPath())) setMP3GainBinaryPath("/usr/bin/mp3gain"); if (!QFile::exists(MP4GainBinaryPath())) setMP4GainBinaryPath("/usr/bin/aacgain"); if (!QFile::exists(VorbisGainBinaryPath())) setVorbisGainBinaryPath("/usr/bin/vorbisgain"); if (!QFile::exists(FlacGainBinaryPath())) setFlacGainBinaryPath("/usr/bin/metaflac"); // Check if Replay gain tools are available setIsMP3GainFound (QFile::exists(MP3GainBinaryPath())); setIsMP4GainFound (QFile::exists(MP4GainBinaryPath())); setIsVorbisGainFound(QFile::exists(VorbisGainBinaryPath())); setIsFlacGainFound (QFile::exists(FlacGainBinaryPath())); if (!isMP3GainFound() && !isMP3GainFound() && !isVorbisGainFound() && !isFlacGainFound()) { ui.Status->setText("Error"); ui.Dateiname->setText("No replay gain tools found!"); } } // ********************************************************************************************* // Save settings // ********************************************************************************************* void QtGain::saveSettings(){ QSettings settings("Vegeta", "QtGain"); settings.setValue("pos", pos()); settings.setValue("MP3Gain", MP3GainBinaryPath()); settings.setValue("aacgain", MP4GainBinaryPath()); settings.setValue("VorbisGain", VorbisGainBinaryPath()); settings.setValue("FlacGain", FlacGainBinaryPath()); settings.setValue("Volume", Volume()); settings.setValue("TrackGain", isTrackGain()); settings.setValue("ShowBrowser", isShowBrowserAtStatup()); settings.setValue("isLogSkippedFiles", isLogSkippedFiles()); int filesProcessed, filesGained; QDate installDate; Statistic(filesProcessed, filesGained, installDate); settings.setValue("filesProcessed", filesProcessed); settings.setValue("filesGained", filesGained); settings.setValue("installDate", installDate); } // ********************************************************************************************* // Close the application and save settings // ********************************************************************************************* void QtGain::Quit() { saveSettings(); QApplication::quit(); } void QtGain::closeEvent(QCloseEvent *event){ Q_UNUSED(event); Quit(); } // ********************************************************************************************* // About dialog // ********************************************************************************************* void QtGain::showAboutDialog() { int filesProcessed, filesGained; QDate installDate; Statistic(filesProcessed, filesGained, installDate); QMessageBox::information(this, "About QtGain", QString("Mp3Gain, VorbisGain, AACGain and Metaflac frontend

" "(c) 2007-2010, Vegeta
" "Project page

" "QtGain is free software; you can redistribute it and/or modify it " "under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

" "Statistic:
QtGain has %1 files processed (%2 files were replay gained) since %3.").arg(filesProcessed).arg(filesGained).arg(installDate.toString("dd.MM.yyyy")) ); } // ********************************************************************************************* // Updates the time that has left since starting gaining // ********************************************************************************************* void QtGain::updateGUI() { ui.Zeitanzeige->setText(TimeUpdateString()); } // ********************************************************************************************* // Show Error-Log // ********************************************************************************************* void QtGain::showErrors() { if (ErrorLog().isEmpty()) return; QDialog window(this); QTextEdit Text; Text.setReadOnly(true); Text.setText(ErrorLog()); window.setWindowTitle("Errorlog"); window.setMinimumSize(850, 500); QPushButton showMessageButton("Close"); showMessageButton.setDefault(true); QGridLayout messageLayout; messageLayout.addWidget(&Text,0,0); messageLayout.addWidget(&showMessageButton); window.setLayout(&messageLayout); connect(&showMessageButton, SIGNAL(clicked()), &window, SLOT(close())); window.exec(); } QtGain/src/Preferences.h0000750000175000017500000000353311362301551015227 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef Preferences_H #define Preferences_H #include "ui_Preferences.h" #include "ui_QtGain.h" using namespace Ui; class Preferences : public QDialog, public PreferencesClass { Q_OBJECT public: Preferences(QWidget *parent = 0); ~Preferences(); void setIcons(); private slots: void on_SelectMP3Binary_clicked(); void on_SelectMP4Binary_clicked(); void on_SelectVorbisBinary_clicked(); void on_SelectFlacBinary_clicked(); void on_pushButton_Reset_clicked(); }; #endif // Preferences_H QtGain/src/gradient.cpp0000644000175000017500000000411211362301551015112 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "gradient.h" #include Gradient::Gradient(QWidget *parent) : QLabel(parent){ } // Subclassed QPaintEvent, see http://daniel.molkentin.de/blog/archives/2007/03.html // for further information void Gradient::paintEvent(QPaintEvent *event){ Q_UNUSED(event) QPainter p(this); QFontMetrics fm(font()); if (fm.width(text()) > contentsRect().width()) { QLinearGradient gradient(contentsRect().topLeft(), contentsRect().topRight()); gradient.setColorAt(0.8, palette().color(QPalette::WindowText)); gradient.setColorAt(1.0, palette().color(QPalette::Window)); QPen pen; pen.setBrush(QBrush(gradient)); p.setPen(pen); } p.drawText(rect(), Qt::TextSingleLine, text()); } QtGain/src/gradient.h0000644000175000017500000000303711362301547014571 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef GRADIENT_H #define GRADIENT_H #include class Gradient : public QLabel { public: Gradient(QWidget *parent = 0); void paintEvent(QPaintEvent *event); }; #endif // GRADIENT_H QtGain/src/Core.cpp0000644000175000017500000000467411362301551014222 0ustar michaelmichael/*************************************************************************** * Copyright (C) 2007-2010 by Vegeta * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "Core.h" Core::Core(){ m_Volume = 0; m_isVorbisGain_found = false; m_isMP3Gain_found = false; m_isMP4Gain_found = false; m_isFlacGain_found = false; resetVariables(); } void Core::resetVariables(){ m_finishedFiles = 0; m_Errors = 0; m_skippedFiles = 0; m_isCancel = false; m_Errorlog.clear(); allFiles.clear(); } // Calculates the time QString Core::TimeUpdateString(){ int total = m_Now.secsTo(QDateTime::currentDateTime()); int hours = total / 3600; total = total % 3600; int minutes = total / 60; int seconds = total % 60; return (QString("%1:%2:%3") .arg(hours, 2, 10, QChar('0')) .arg(minutes, 2, 10, QChar('0')) .arg(seconds, 2, 10, QChar('0'))); } QString Core::FilenameWithoutPath(const int &Nummer){ if (allFiles.size() > 0){ QFileInfo Dummy(allFiles[Nummer]); QString Temp = Dummy.fileName(); if (Temp.length() > 60) Temp = Temp.left(40) + "..."; return Temp; } else return "Ready..."; } QtGain/ui/QtGain.ui0000750000175000017500000002431711327023226014171 0ustar michaelmichael QtGainClass Qt::ApplicationModal 0 0 181 163 0 0 181 163 181 163 Qt::ActionsContextMenu true QtGain :/Icons/lsongs.png:/Icons/lsongs.png 10 65 157 20 Qt::Horizontal 20 35 138 16 Qt::Horizontal 33 47 113 25 6 0 75 true ToDo: Qt::LeftToRight false QFrame::NoFrame QFrame::Sunken 2 1 QLCDNumber::Flat 3 145 175 15 16777215 15 0 Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Qt::Horizontal QProgressBar::BottomToTop 3 81 177 59 7 41 16777215 8 Status: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 8 Ready... 175 0 Sans Serif 8 16777215 14 Sans Serif 8 3 4 81 34 8 Gained: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 25 0 8 0 8 Skipped: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 25 0 8 0 87 4 94 34 8 Error: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 20 0 8 0 8 Time: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 55 0 8 00:00:00 Gradient QLabel
src/gradient.h
QtGain/ui/Preferences.ui0000750000175000017500000003323011362026725015247 0ustar michaelmichael PreferencesClass 0 0 430 205 0 0 430 205 430 205 Settings :/Icons/lsongs.png:/Icons/lsongs.png 10 9 411 151 QTabWidget::North QTabWidget::Rounded 0 General 270 16 131 18 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For more information visit <a href="http://en.wikipedia.org/wiki/Replay_Gain"><span style=" text-decoration: underline; color:#0000ff;">Wikipedia</span></a></p></td></tr></table></body></html> Replay Gain Mode 270 40 103 54 AlbumGain TrackGain true 12 11 196 28 Target volume 43 26 80 89 dB 21 21 Reset target volume to default value :/Icons/reset.png:/Icons/reset.png true 10 50 241 52 Opens a file dialog at startup where you can select folders. Open a file dialog at startup Turn this on if you want that QtGain shows skipped files and errors in the log window. Show skipped files in Errorlog MP3 10 20 361 30 74 0 74 16777215 MP3Gain: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 21 16777215 ... MP4 10 20 361 30 74 0 74 16777215 aacgain: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 21 16777215 ... Ogg/Vorbis 10 20 361 30 74 0 74 16777215 VorbisGain: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 21 16777215 ... FLAC 10 20 361 30 74 0 74 16777215 Metaflac: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 21 16777215 ... 240 170 176 28 QDialogButtonBox::Cancel|QDialogButtonBox::Ok tabWidget Pegel pushButton_Reset isAlbumGain isTrackGain isStartBrowserAtStartup isLogSkippedFiles SelectMP3Binary VorbisGainPfad SelectVorbisBinary FlacGainPfad SelectFlacBinary buttonBox MP3GainPfad MP4GainPfad SelectMP4Binary buttonBox accepted() PreferencesClass accept() 416 183 462 153 buttonBox rejected() PreferencesClass reject() 298 179 242 179