"Fossies" - the Fresh Open Source Software Archive

Member "MP3Diags-unstable-1.5.01/src/AboutDlgImpl.cpp" (10 Feb 2019, 10858 Bytes) of package /linux/privat/MP3Diags-unstable-1.5.01.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AboutDlgImpl.cpp" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.3.04_vs_1.5.01.

    1 /***************************************************************************
    2  *   MP3 Diags - diagnosis, repairs and tag editing for MP3 files          *
    3  *                                                                         *
    4  *   Copyright (C) 2009 by Marian Ciobanu                                  *
    5  *   ciobi@inbox.com                                                       *
    6  *                                                                         *
    7  *   This program is free software; you can redistribute it and/or modify  *
    8  *   it under the terms of the GNU General Public License version 2 as     *
    9  *   published by the Free Software Foundation.                            *
   10  *                                                                         *
   11  *   This program is distributed in the hope that it will be useful,       *
   12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
   13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
   14  *   GNU General Public License for more details.                          *
   15  *                                                                         *
   16  *   You should have received a copy of the GNU General Public License     *
   17  *   along with this program; if not, write to the                         *
   18  *   Free Software Foundation, Inc.,                                       *
   19  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
   20  ***************************************************************************/
   21 
   22 
   23 #include  <QFile>
   24 #include  <QAction>
   25 
   26 #include  "AboutDlgImpl.h"
   27 
   28 #include  "Helpers.h"
   29 #include  "Version.h"
   30 
   31 
   32 using namespace Version;
   33 
   34 /*
   35 " + QString(::AboutDlgImpl::tr("QQQ")).arg("QQQ").arg("QQQ").arg("QQQ") + "
   36 " + QString(::AboutDlgImpl::tr("QQQ")).arg("QQQ").arg("QQQ") + "
   37 " + QString(::AboutDlgImpl::tr("QQQ")).arg("QQQ") + "
   38 
   39 " + ::AboutDlgImpl::tr("QQQ").arg("QQQ").arg("QQQ").arg("QQQ") + "
   40 " + ::AboutDlgImpl::tr("QQQ").arg("QQQ").arg("QQQ") + "
   41 " + ::AboutDlgImpl::tr("QQQ").arg("QQQ") + "
   42 
   43 */
   44 
   45 AboutDlgImpl::AboutDlgImpl(QWidget* pParent /* = 0*/) : QDialog(pParent, getDialogWndFlags()), Ui::AboutDlg()
   46 {
   47     setupUi(this);
   48 
   49     QPalette pal (m_pMainTextM->palette());
   50     pal.setColor(QPalette::Base, pal.color(QPalette::Disabled, QPalette::Window));
   51 
   52     m_pMainTextM->setPalette(pal);
   53 /*
   54 <a href=\"DDDDDDDDDDDDD\">NNNNNNNNNNNNNN</a>
   55 */
   56     m_pMainTextM->setHtml(
   57         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Written by %1, %2").arg("<a href=\"mailto:mp3diags@gmail.com?subject=000 MP3 Diags\">Marian Ciobanu (Ciobi)</a>").arg("2008 - 2016") + "</p>"
   58         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Command-line mode by %1, %2").arg("Michael Elsd&#xf6;rfer").arg("2011") + "</p>"
   59         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("%1 translation by %2, %3").arg(AboutDlgImpl::tr("Czech")).arg("<a href=\"http://fripohled.blogspot.com/\">Pavel Fric</a>").arg("2012") + "</p>"
   60         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("%1 translation by %2, %3").arg(AboutDlgImpl::tr("German")).arg("<a href=\"mailto:2711271+translate@gmail.com?subject=MP3 Diags translation\">Marco Krause</a>").arg("2012") + "</p>"
   61         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("%1 translation by %2, %3").arg(AboutDlgImpl::tr("French")).arg("<a href=\"mailto:gwilherm_b@hotmail.com?subject=MP3 Diags translation\">Gwilherm Baudic</a>").arg("2012") + "</p>"
   62         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Distributed under %1").arg("<a href=\"http://www.gnu.org/licenses/gpl-2.0.html#TOC1\">GPL V2</a>") + "</p>"
   63         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using %1, released under %2").arg("<a href=\"http://qt-project.org\">Qt</a>").arg("<a href=\"http://www.gnu.org/licenses/lgpl-2.1.html\">LGPL 2.1</a>") + "</p>"
   64         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using %1, released under the %2zlib License%3").arg("<a href=\"http://www.zlib.net/\">zlib</a>").arg("<a href=\"http://www.zlib.net/zlib_license.html\">").arg("</a>") + "</p>"
   65         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using %1 and %2, distributed under the %3Boost Software License%4").arg("<a href=\"http://www.boost.org/libs/serialization\">Boost Serialization</a>").arg("<a href=\"http://www.boost.org/libs/program_options\">Boost Program Options</a>").arg("<a href=\"http://www.boost.org/users/license.html\">").arg("</a>") + "</p>"
   66         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using original and modified icons from the %1 for %2, distributed under %3LGPL V3%4").arg("<a href=\"http://www.oxygen-icons.org/\">Oxygen Project</a>").arg("<a href=\"http://www.kde.org/\">KDE 4</a>").arg("<a href=\"http://www.gnu.org/licenses/lgpl.html\">").arg("</a>") + "</p>"
   67         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using web services provided by %1 to retrieve album data").arg("<a href=\"http://www.discogs.com/\">Discogs</a>") + "</p>"
   68         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Using web services provided by %1 to retrieve album data").arg("<a href=\"http://musicbrainz.org/\">MusicBrainz</a>") + "</p>"
   69         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Home page and documentation: %1").arg("<a href=\"http://mp3diags.sourceforge.net" + QString(getWebBranch()) + "/\">http://mp3diags.sourceforge.net" + QString(getWebBranch()) + "/</a>") + "</p>"
   70         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Feedback and support: %1 or %2 at SourceForge").arg("<a href=\"http://sourceforge.net/projects/mp3diags/forums/forum/947206\">Open Discussion Forum</a>").arg("<a href=\"http://sourceforge.net/projects/mp3diags/forums/forum/947207\">Help Forum</a>") + "</p>"
   71         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Bug reports and feature requests: %1 at SourceForge").arg("<a href=\"http://sourceforge.net/apps/mantisbt/mp3diags/\">MantisBT Issue Tracker</a>") + "</p>"
   72         "<p style=\"margin-bottom:8px; margin-top:1px; \">" + AboutDlgImpl::tr("Change log for the latest version: %1").arg("<a href=\"http://mp3diags.sourceforge.net" + QString(getWebBranch()) + "/015_changelog.html\">http://mp3diags.sourceforge.net" + QString(getWebBranch()) + "/015_changelog.html</a>") + "</p>"
   73         );
   74 
   75     m_pVersionL->setText(QString(getAppName()) + " " + getAppVer()); //ttt1 write "unstable" in red
   76 
   77     initText(m_pGplV2M, ":/licences/gplv2.txt");
   78     initText(m_pGplV3M, ":/licences/gplv3.txt");
   79     initText(m_pLgplV3M, ":/licences/lgplv3.txt");
   80     initText(m_pLgplV21M, ":/licences/lgpl-2.1.txt");
   81     initText(m_pBoostM, ":/licences/boost.txt");
   82     initText(m_pZlibM, ":/licences/zlib.txt");
   83 
   84     m_pSysInfoM->setText(getSystemInfo());
   85 
   86     m_pMainTextM->setFocus();
   87     //{ QAction* p (new QAction(this)); p->setShortcut(QKeySequence("Ctrl+N")); connect(p, SIGNAL(triggered()), this, SLOT(accept())); addAction(p); }
   88 
   89     { QAction* p (new QAction(this)); p->setShortcut(QKeySequence("F1")); connect(p, SIGNAL(triggered()), this, SLOT(onHelp())); addAction(p); }
   90 }
   91 
   92 
   93 
   94 void AboutDlgImpl::initText(QTextBrowser* p, const char* szFileName)
   95 {
   96     QFile f (szFileName);
   97     //QFile::FileError err (f.error());
   98     //qDebug("file: %d", (int)err);
   99     //qDebug("size : %d", (int)f.size());
  100     //QByteArray b (f.readAll());
  101     f.open(QIODevice::ReadOnly);
  102     //qDebug("read size : %d", (int)b.size());
  103     p->setText(QString::fromUtf8(f.readAll()));
  104 }
  105 
  106 
  107 AboutDlgImpl::~AboutDlgImpl()
  108 {
  109 }
  110 
  111 
  112 
  113 void AboutDlgImpl::onHelp()
  114 {
  115     openHelp("index.html");
  116 }
  117 
  118 
  119 
  120 
  121 // exist: mp3 insight, mp3 doctor, mp3 butcher, mp3 toolbox, mp3 mechanic, mp3 workshop;
  122 //ttt melt ? ice ? ? sorcerer ? exorcist ? healer ? ? MP3 Spy
  123 //"mp3 workshop", "mp3 atelier"
  124 //workshop synonyms:  foundry, laboratory, mill, plant, studio, works
  125 // deep understanding
  126 
  127 
  128 
  129 
  130 /*
  131 
  132 
  133 //bjam --toolset=gcc
  134 //PATH=D:\Qt\2009.02\mingw\bin;%PATH%
  135 bjam serialization toolset=gcc
  136 
  137 
  138 bjam toolset=gcc serialization threading=multi release
  139 
  140 http://stackoverflow.com/questions/718447/adding-external-library-into-qt-creator-project
  141 http://stackoverflow.com/questions/199092/compiling-a-qt-program-in-windows-xp-with-mingws-g
  142 */
  143 
  144 /*
  145 Finds problems in MP3 files and helps the user to fix many of them using included tools. Looks at both the audio part (VBR info, quality, normalization) and the tags containing track information (ID3.) Also includes a tag editor and a file renamer.
  146 */
  147 
  148 
  149 //PATH=D:\Qt\2009.02\qt\bin;%PATH%
  150 
  151 
  152 
  153 
  154 
  155 
  156 
  157 //ttt2 perhaps "Scan images in the current folder", checked by default
  158 //ttt2 perhaps something to remove image files after assigning them, or at least show them in a different color; it was suggested to add a "-" button to remove images, below the "v" for "assigning them", but not sure it's such great idea; perhaps some option to delete local images that were assigned (but perhaps the unassigned CD scan should go as well); // perhaps "-" works, though; should be enabled/visible only for local files
  159 
  160 
  161 
  162 
  163 
  164 
  165 
  166 
  167 
  168 //ttt2 some standard means to log only uncaught exceptions
  169 
  170 
  171 
  172 
  173 // backport jaunty 9.04 : https://bugs.launchpad.net/jaunty-backports/+bug/423560
  174 
  175 
  176 
  177 
  178 
  179 
  180 /*
  181 //ttt2 w7 8.3 names
  182 
  183 C:\Windows\system32>fsutil behavior query disable8dot3 c:
  184 The volume state for Disable8dot3 is 0 (8dot3 name creation is enabled).
  185 The registry state of NtfsDisable8dot3NameCreation is 2, the default (Volume level setting).
  186 Based on the above two settings, 8dot3 name creation is enabled on c:.
  187 */
  188 
  189 
  190 //ttt2 Perhaps linking Boost statically and Qt dynamically would solve most dependency issues - http://pages.cs.wisc.edu/~thomas/X/static-linking.html : "surround the libraries you wish to link statically with -static and -dynamic (in that order)"; OTOH "-dynamic" is not in man, and that page is from 1997; things have changed, and -static seems to be a global option, so it doesn't matter if you put it first or last; what should work is specifying the file name: -l:libboost_serialization.a rather than -lboost_serialization (!!! note the ":")
  191 
  192 
  193 
  194 //ttt2 mutt rips: https://sourceforge.net/projects/mp3diags/forums/forum/947206/topic/3441516 ; also, check for missing tracks and other album-related issues;
  195 
  196 
  197 //ttt0 might have to remove the program before switching packages; - in the fake mp3diags
  198 
  199 //ttt1 01 - The Privateer.mp3 - go to tag editor, change track, save; new image doesn't show, but there is the original "other" bmp and the new "cover" jpg
  200 
  201 //ttt2 maybe support for saving images to .directory files - point 7 at https://sourceforge.net/projects/mp3diags/forums/forum/947206/topic/3389395