Added button to edit the current output path in a simple LineEdit control.

This commit is contained in:
LoRd_MuldeR 2012-03-26 22:02:11 +02:00
parent b4aaaccdf2
commit 1738ea5b6e
18 changed files with 990 additions and 780 deletions

View File

@ -21,6 +21,7 @@ a:visited { color: #0000EE; }
<li>Added Chinese and Taiwanese translations, thanks to 456Vv &lt;123@456vv.com&gt; <li>Added Chinese and Taiwanese translations, thanks to 456Vv &lt;123@456vv.com&gt;
<li>Added experimental support for dcaenc, created by Alexander E. Patrakov &lt;patrakov@gmail.com&gt; <li>Added experimental support for dcaenc, created by Alexander E. Patrakov &lt;patrakov@gmail.com&gt;
<li>Added CSV export/import for Meta tags (see context-menu on the "Source Files" tab) <li>Added CSV export/import for Meta tags (see context-menu on the "Source Files" tab)
<li>Added a button to modify the current output folder path in an edit box
<li>Updated Qt runtime libraries to v4.8.0 (2011-12-15), compiled with MSVC 10.0 <li>Updated Qt runtime libraries to v4.8.0 (2011-12-15), compiled with MSVC 10.0
<li>Updated LAME encoder to v3.99.5 Final (2012-02-28), compiled with ICL 12.1.7 and MSVC 10.0 (<a href="http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/history.html?revision=1.139" target="_blank">details</a>) <li>Updated LAME encoder to v3.99.5 Final (2012-02-28), compiled with ICL 12.1.7 and MSVC 10.0 (<a href="http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/history.html?revision=1.139" target="_blank">details</a>)
<li>Updated MediaInfo to v0.7.54 (2012-03-13), compiled with ICL 12.1.7 and MSVC 10.0 <li>Updated MediaInfo to v0.7.54 (2012-03-13), compiled with ICL 12.1.7 and MSVC 10.0

File diff suppressed because it is too large Load Diff

View File

@ -1834,6 +1834,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation>Aktueller AAC-Kodierer: %1</translation> <translation>Aktueller AAC-Kodierer: %1</translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation>Zielverzeichnis bearbeiten</translation>
</message>
<message>
<source>Show Favorites</source>
<translation>Favoriten anzeigen</translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1833,6 +1833,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1843,6 +1843,14 @@ Ouvrir le dossier récursivement...</translation>
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1834,6 +1834,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1833,6 +1833,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

File diff suppressed because it is too large Load Diff

View File

@ -1839,6 +1839,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1833,6 +1833,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1834,6 +1834,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation>Поточний кодер AAC: %1</translation> <translation>Поточний кодер AAC: %1</translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1833,6 +1833,14 @@
<source>Current AAC Encoder: %1</source> <source>Current AAC Encoder: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Edit Output Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Favorites</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -30,7 +30,7 @@
</font> </font>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<property name="usesScrollButtons"> <property name="usesScrollButtons">
<bool>false</bool> <bool>false</bool>
@ -340,6 +340,41 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLineEdit" name="outputFolderEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">($OUTDIR)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outputFoldersEditorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Edit Output Path</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../res/Icons.qrc">:/icons/drive_edit.png</pixmap>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="outputFoldersFovoritesLabel"> <widget class="QLabel" name="outputFoldersFovoritesLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -348,11 +383,14 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>Show Favorites</string>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="text"> <property name="text">
<string/> <string notr="true"/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="../res/Icons.qrc">:/icons/star.png</pixmap> <pixmap resource="../res/Icons.qrc">:/icons/star.png</pixmap>
@ -1265,8 +1303,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>604</width> <width>602</width>
<height>1524</height> <height>1515</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_22"> <layout class="QGridLayout" name="gridLayout_22">

View File

@ -46,6 +46,7 @@
<file>icons/drive.png</file> <file>icons/drive.png</file>
<file>icons/drive_cd.png</file> <file>icons/drive_cd.png</file>
<file>icons/drive_disk.png</file> <file>icons/drive_disk.png</file>
<file>icons/drive_edit.png</file>
<file>icons/drive_link.png</file> <file>icons/drive_link.png</file>
<file>icons/drive_network.png</file> <file>icons/drive_network.png</file>
<file>icons/exclamation.png</file> <file>icons/exclamation.png</file>

Binary file not shown.

View File

@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 8 #define VER_LAMEXP_PATCH 9
#define VER_LAMEXP_BUILD 920 #define VER_LAMEXP_BUILD 922
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -161,6 +161,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
outputFolderView->setMouseTracking(false); outputFolderView->setMouseTracking(false);
outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu); outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu);
outputFolderView->installEventFilter(this); outputFolderView->installEventFilter(this);
outputFoldersEditorLabel->installEventFilter(this);
outputFoldersFovoritesLabel->installEventFilter(this); outputFoldersFovoritesLabel->installEventFilter(this);
while(saveToSourceFolderCheckBox->isChecked() != m_settings->outputToSourceDir()) saveToSourceFolderCheckBox->click(); while(saveToSourceFolderCheckBox->isChecked() != m_settings->outputToSourceDir()) saveToSourceFolderCheckBox->click();
prependRelativePathCheckBox->setChecked(m_settings->prependRelativeSourcePath()); prependRelativePathCheckBox->setChecked(m_settings->prependRelativeSourcePath());
@ -174,6 +175,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(buttonGotoMusic, SIGNAL(clicked()), this, SLOT(gotoMusicFolderButtonClicked())); connect(buttonGotoMusic, SIGNAL(clicked()), this, SLOT(gotoMusicFolderButtonClicked()));
connect(saveToSourceFolderCheckBox, SIGNAL(clicked()), this, SLOT(saveToSourceFolderChanged())); connect(saveToSourceFolderCheckBox, SIGNAL(clicked()), this, SLOT(saveToSourceFolderChanged()));
connect(prependRelativePathCheckBox, SIGNAL(clicked()), this, SLOT(prependRelativePathChanged())); connect(prependRelativePathCheckBox, SIGNAL(clicked()), this, SLOT(prependRelativePathChanged()));
connect(outputFolderEdit, SIGNAL(editingFinished()), this, SLOT(outputFolderEditFinished()));
m_outputFolderContextMenu = new QMenu(); m_outputFolderContextMenu = new QMenu();
m_showFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/zoom.png"), "N/A"); m_showFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/zoom.png"), "N/A");
m_outputFolderFavoritesMenu = new QMenu(); m_outputFolderFavoritesMenu = new QMenu();
@ -182,6 +184,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(outputFolderView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(outputFolderContextMenu(QPoint))); connect(outputFolderView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(outputFolderContextMenu(QPoint)));
connect(m_showFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(showFolderContextActionTriggered())); connect(m_showFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(showFolderContextActionTriggered()));
connect(m_addFavoriteFolderAction, SIGNAL(triggered(bool)), this, SLOT(addFavoriteFolderActionTriggered())); connect(m_addFavoriteFolderAction, SIGNAL(triggered(bool)), this, SLOT(addFavoriteFolderActionTriggered()));
outputFolderEdit->setVisible(false);
outputFolderLabel->installEventFilter(this); outputFolderLabel->installEventFilter(this);
outputFolderView->setCurrentIndex(m_fileSystemModel->index(m_settings->outputDir())); outputFolderView->setCurrentIndex(m_fileSystemModel->index(m_settings->outputDir()));
outputFolderViewClicked(outputFolderView->currentIndex()); outputFolderViewClicked(outputFolderView->currentIndex());
@ -900,6 +903,39 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
break; break;
} }
} }
else if(obj == outputFoldersEditorLabel)
{
QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);
QPoint pos = (mouseEvent != NULL) ? mouseEvent->pos() : QPoint();
QWidget *sender = dynamic_cast<QLabel*>(obj);
switch(event->type())
{
case QEvent::Enter:
outputFoldersEditorLabel->setFrameShadow(QFrame::Raised);
break;
case QEvent::MouseButtonPress:
outputFoldersEditorLabel->setFrameShadow(QFrame::Sunken);
break;
case QEvent::MouseButtonRelease:
outputFoldersEditorLabel->setFrameShadow(QFrame::Raised);
if(sender && mouseEvent)
{
if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton)
{
outputFolderLabel->setVisible(false);
outputFolderEdit->setVisible(true);
outputFolderEdit->setText(outputFolderLabel->text());
outputFolderEdit->selectAll();
outputFolderEdit->setFocus();
}
}
break;
case QEvent::Leave:
outputFoldersEditorLabel->setFrameShadow(QFrame::Plain);
break;
}
}
return QMainWindow::eventFilter(obj, event); return QMainWindow::eventFilter(obj, event);
} }
@ -2537,6 +2573,47 @@ void MainWindow::addFavoriteFolderActionTriggered(void)
refreshFavorites(); refreshFavorites();
} }
/*
* Output folder edit finished
*/
void MainWindow::outputFolderEditFinished(void)
{
QString text = QDir::fromNativeSeparators(outputFolderEdit->text().trimmed());
outputFolderEdit->setVisible(false);
outputFolderLabel->setVisible(true);
while(!text.isEmpty())
{
while(text.startsWith('"') || text.startsWith('/')) text = text.right(text.length() - 1).trimmed();
while(text.endsWith('"') || text.endsWith('/')) text = text.left(text.length() - 1).trimmed();
QFileInfo info(text);
if(info.exists() && info.isDir())
{
QModelIndex index = m_fileSystemModel->index(info.canonicalFilePath());
if(index.isValid())
{
outputFolderView->setCurrentIndex(index);
return;
}
}
else if(info.exists() && info.isFile())
{
QModelIndex index = m_fileSystemModel->index(info.canonicalPath());
if(index.isValid())
{
outputFolderView->setCurrentIndex(index);
return;
}
}
text = text.left(text.length() - 1).trimmed();
}
MessageBeep(MB_ICONERROR);
}
/* /*
* Initialize file system model * Initialize file system model
*/ */

View File

@ -104,6 +104,7 @@ private slots:
void notifyOtherInstance(void); void notifyOtherInstance(void);
void openFolderActionActivated(void); void openFolderActionActivated(void);
void outputFolderContextMenu(const QPoint &pos); void outputFolderContextMenu(const QPoint &pos);
void outputFolderEditFinished(void);
void outputFolderViewClicked(const QModelIndex &index); void outputFolderViewClicked(const QModelIndex &index);
void outputFolderViewMoved(const QModelIndex &index); void outputFolderViewMoved(const QModelIndex &index);
void playlistEnabledChanged(void); void playlistEnabledChanged(void);