#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
+// Neutral resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "src\\Resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// WAVE
-//
-
-IDR_WAVE_ABOUT WAVE "res\\sounds\\uuaarrgh.wav"
-
/////////////////////////////////////////////////////////////////////////////
//
// Version
VALUE "Comments", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY"
VALUE "CompanyName", "Free Software Foundation"
VALUE "FileDescription", "LameXP - Audio Encoder Front-End"
- VALUE "FileVersion", VER_LAMEXP_STR
+ VALUE "FileVersion", VER_LAMEXP_STR
VALUE "InternalName", "LameXP Qt"
VALUE "LegalCopyright", "Copyright (C) 2004-2010 LoRd_MuldeR <MuldeR2@GMX.de>"
VALUE "LegalTrademarks", "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License <http://www.gnu.org/>"
END
END
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Germany) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "src\\Resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// WAVE
+//
+
+IDR_WAVE_ABOUT WAVE "res\\sounds\\uuaarrgh.wav"
/////////////////////////////////////////////////////////////////////////////
//
<property name="title">
<string>View</string>
</property>
+ <widget class="QMenu" name="menuStyle">
+ <property name="title">
+ <string>Style</string>
+ </property>
+ <addaction name="actionStylePlastique"/>
+ <addaction name="actionStyleCleanlooks"/>
+ <addaction name="actionStyleWindows"/>
+ <addaction name="actionStyleClassic"/>
+ </widget>
<addaction name="actionSourceFiles"/>
<addaction name="actionOutputDirectory"/>
<addaction name="actionCompression"/>
<addaction name="actionMetaData"/>
<addaction name="actionAdvancedOptions"/>
+ <addaction name="separator"/>
+ <addaction name="menuStyle"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuView"/>
<normaloff>:/icons/world.png</normaloff>:/icons/world.png</iconset>
</property>
<property name="text">
- <string>Visit Official Homepage</string>
+ <string>Visit Official Web-Site</string>
</property>
<property name="toolTip">
<string>Visit Official Web-Site</string>
<string>Clear All</string>
</property>
</action>
+ <action name="actionStylePlastique">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Plastique</string>
+ </property>
+ </action>
+ <action name="actionStyleCleanlooks">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Cleanlooks</string>
+ </property>
+ </action>
+ <action name="actionStyleWindows">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Windows</string>
+ </property>
+ </action>
+ <action name="actionStyleClassic">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Classic</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="../res/Icons.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
+ <include location="../res/Images.qrc"/>
+ <include location="../res/Images.qrc"/>
</resources>
<connections>
<connection>
#include <QFileSystemModel>
#include <QDesktopServices>
#include <QUrl>
+#include <QPlastiqueStyle>
+#include <QCleanlooksStyle>
+#include <QWindowsVistaStyle>
+#include <QWindowsStyle>
//Win32 includes
#include <Windows.h>
actionSourceFiles->setChecked(true);
connect(m_tabActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(tabActionActivated(QAction*)));
+ //Activate style menu actions
+ m_styleActionGroup = new QActionGroup(this);
+ m_styleActionGroup->addAction(actionStylePlastique);
+ m_styleActionGroup->addAction(actionStyleCleanlooks);
+ m_styleActionGroup->addAction(actionStyleWindows);
+ m_styleActionGroup->addAction(actionStyleClassic);
+ actionStylePlastique->setChecked(true);
+ connect(m_styleActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
+
//Activate help menu actions
connect(actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated()));
connect(actionVisitHomepage, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
MainWindow::~MainWindow(void)
{
LAMEXP_DELETE(m_tabActionGroup);
+ LAMEXP_DELETE(m_styleActionGroup);
LAMEXP_DELETE(m_fileListModel);
LAMEXP_DELETE(m_banner);
LAMEXP_DELETE(m_fileSystemModel);
*/
void MainWindow::openFolderActionActivated(void)
{
+ tabWidget->setCurrentIndex(0);
QString selectedFolder = QFileDialog::getExistingDirectory(this, "Add folder", QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
if(!selectedFolder.isEmpty())
}
/*
+ * Style action triggered
+ */
+void MainWindow::styleActionActivated(QAction *action)
+{
+ if(action == actionStylePlastique) QApplication::setStyle(new QPlastiqueStyle());
+ else if(action == actionStyleCleanlooks) QApplication::setStyle(new QCleanlooksStyle());
+ else if(action == actionStyleWindows) QApplication::setStyle(new QWindowsVistaStyle());
+ else if(action == actionStyleClassic) QApplication::setStyle(new QWindowsStyle());
+}
+
+/*
* Output folder changed
*/
void MainWindow::outputFolderViewClicked(const QModelIndex &index)
void editMetaButtonClicked(void);
void tabPageChanged(int idx);
void tabActionActivated(QAction *action);
+ void styleActionActivated(QAction *action);
void outputFolderViewClicked(const QModelIndex &index);
void makeFolderButtonClicked(void);
void gotoHomeFolderButtonClicked(void);
FileListModel *m_fileListModel;
QFileSystemModel *m_fileSystemModel;
QActionGroup *m_tabActionGroup;
+ QActionGroup *m_styleActionGroup;
WorkingBanner *m_banner;
};
//print license info
qDebug("This program is free software: you can redistribute it and/or modify");
- qDebug("it under the terms of the GNU General Public License <http://www.gnu.org/>.");
+ qDebug("it under the terms of the GNU General Public License <http://www.gnu.org/>.");
qDebug("This program comes with ABSOLUTELY NO WARRANTY.\n");
//Print warning, if this is a "debug" build
qDebug("Analyzing: %s", currentFile.toUtf8().constData());
emit fileSelected(QFileInfo(currentFile).fileName());
AudioFileModel file = analyzeFile(currentFile);
- if(file.formatContainerType().isEmpty() || file.formatAudioType().isEmpty())
+ if(file.fileName().isEmpty() || file.formatContainerType().isEmpty() || file.formatAudioType().isEmpty())
{
qDebug("Skipped: %s", file.filePath().toUtf8().constData());
continue;
AudioFileModel audioFile(filePath);
m_currentSection = sectionOther;
+ QFile readTest(filePath);
+ if(!readTest.open(QIODevice::ReadOnly))
+ {
+ qWarning("Cannot access file for reading, skipping!");
+ return audioFile;
+ }
+ else
+ {
+ readTest.close();
+ }
+
QProcess process;
process.setProcessChannelMode(QProcess::MergedChannels);
process.setReadChannel(QProcess::StandardOutput);
while(process.state() != QProcess::NotRunning)
{
- process.waitForReadyRead(1000);
+ if(!process.waitForReadyRead())
+ {
+ if(process.state() == QProcess::Running)
+ {
+ qWarning("MediaInfo time out. Killing process and skipping file!");
+ process.kill();
+ process.waitForFinished(-1);
+ return audioFile;
+ }
+ }
+
QByteArray data = process.readLine().constData();
while(data.size() > 0)
{
audioFile.setFileName(baseName);
}
-
+
return audioFile;
}
// EVENTS
////////////////////////////////////////////////////////////
-/*NONE*/
\ No newline at end of file
+/*NONE*/