Added "Folder Up" button to the "Output Folder" tab. Also some code refactoring.

This commit is contained in:
LoRd_MuldeR 2012-12-14 00:34:10 +01:00
parent 30507937de
commit 12db5d2c81
22 changed files with 1723 additions and 1650 deletions

View File

@ -21,6 +21,7 @@ a:visited { color: #0000EE; }
<li>Upgraded build environment to Microsoft Visual Studio 2012 with Update-1
<li>Added option to select the "overwrite mode" to advanced options tab
<li>Added option to filter the log entries on the "processing" dialog (see context menu)
<li>Added "Up One Level" button to the output folder tab
<li>Updated Qt runtime libraries to v4.8.4 (2012-11-29), compiled with MSVC 11.0
<li>Updated Opus encoder/decoder libraries to v1.1.x and Opus-Tools to v0.1.6 (2012-12-07)
<li>Fixed handling of certain characters when passing meta tags on the command-line

File diff suppressed because it is too large Load Diff

View File

@ -1978,6 +1978,10 @@
<source>Revert</source>
<translation>Zurück</translation>
</message>
<message>
<source>Up One Level</source>
<translation>Aufwärts</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1977,6 +1977,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1987,6 +1987,10 @@ Ouvrir le dossier récursivement...</translation>
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1978,6 +1978,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1977,6 +1977,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

File diff suppressed because it is too large Load Diff

View File

@ -1983,6 +1983,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

File diff suppressed because it is too large Load Diff

View File

@ -1977,6 +1977,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1978,6 +1978,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1977,6 +1977,10 @@
<source>Revert</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Up One Level</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -353,6 +353,28 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outputFoldersGoUpLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Up One Level</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../res/Icons.qrc">:/icons/folder_up.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outputFoldersEditorLabel">
<property name="sizePolicy">

View File

@ -62,6 +62,7 @@
<file>icons/folder_explore.png</file>
<file>icons/folder_page.png</file>
<file>icons/folder_table.png</file>
<file>icons/folder_up.png</file>
<file>icons/font.png</file>
<file>icons/group.png</file>
<file>icons/heart.png</file>

BIN
res/icons/folder_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
res/icons/jump.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
res/icons/step_over_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
res/icons/step_over_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 7
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 6
#define VER_LAMEXP_BUILD 1214
#define VER_LAMEXP_BUILD 1216
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)

View File

@ -242,6 +242,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
ui->outputFolderView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
m_evenFilterOutputFolderMouse = new CustomEventFilter;
ui->outputFoldersGoUpLabel->installEventFilter(m_evenFilterOutputFolderMouse);
ui->outputFoldersEditorLabel->installEventFilter(m_evenFilterOutputFolderMouse);
ui->outputFoldersFovoritesLabel->installEventFilter(m_evenFilterOutputFolderMouse);
ui->outputFolderLabel->installEventFilter(m_evenFilterOutputFolderMouse);
@ -3089,65 +3090,62 @@ void MainWindow::outputFolderMouseEventOccurred(QWidget *sender, QEvent *event)
break;
}
}
else if(sender == ui->outputFoldersFovoritesLabel)
if((sender == ui->outputFoldersFovoritesLabel) || (sender == ui->outputFoldersEditorLabel) || (sender == ui->outputFoldersGoUpLabel))
{
switch(event->type())
{
case QEvent::Enter:
ui->outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised);
dynamic_cast<QLabel*>(sender)->setFrameShadow(QFrame::Raised);
break;
case QEvent::MouseButtonPress:
ui->outputFoldersFovoritesLabel->setFrameShadow(QFrame::Sunken);
dynamic_cast<QLabel*>(sender)->setFrameShadow(QFrame::Sunken);
break;
case QEvent::MouseButtonRelease:
ui->outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised);
if(mouseEvent)
{
if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton)
{
if(ui->outputFolderView->isEnabled())
{
m_outputFolderFavoritesMenu->popup(sender->mapToGlobal(pos));
}
}
}
dynamic_cast<QLabel*>(sender)->setFrameShadow(QFrame::Raised);
break;
case QEvent::Leave:
ui->outputFoldersFovoritesLabel->setFrameShadow(QFrame::Plain);
dynamic_cast<QLabel*>(sender)->setFrameShadow(QFrame::Plain);
break;
}
}
else if(sender == ui->outputFoldersEditorLabel)
{
switch(event->type())
if((event->type() == QEvent::MouseButtonRelease) && ui->outputFolderView->isEnabled() && (mouseEvent))
{
case QEvent::Enter:
ui->outputFoldersEditorLabel->setFrameShadow(QFrame::Raised);
break;
case QEvent::MouseButtonPress:
ui->outputFoldersEditorLabel->setFrameShadow(QFrame::Sunken);
break;
case QEvent::MouseButtonRelease:
ui->outputFoldersEditorLabel->setFrameShadow(QFrame::Raised);
if(mouseEvent)
if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton)
{
if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton)
if(sender == ui->outputFoldersFovoritesLabel)
{
if(ui->outputFolderView->isEnabled())
m_outputFolderFavoritesMenu->popup(sender->mapToGlobal(pos));
}
else if(sender == ui->outputFoldersEditorLabel)
{
ui->outputFolderView->setEnabled(false);
ui->outputFolderLabel->setVisible(false);
ui->outputFolderEdit->setVisible(true);
ui->outputFolderEdit->setText(ui->outputFolderLabel->text());
ui->outputFolderEdit->selectAll();
ui->outputFolderEdit->setFocus();
}
else if(sender == ui->outputFoldersGoUpLabel)
{
QModelIndex current = ui->outputFolderView->currentIndex();
if(current.isValid() && current.parent().isValid())
{
ui->outputFolderView->setEnabled(false);
ui->outputFolderLabel->setVisible(false);
ui->outputFolderEdit->setVisible(true);
ui->outputFolderEdit->setText(ui->outputFolderLabel->text());
ui->outputFolderEdit->selectAll();
ui->outputFolderEdit->setFocus();
QModelIndex parent = current.parent();
ui->outputFolderView->setCurrentIndex(parent);
outputFolderViewClicked(parent);
}
else
{
MessageBeep(MB_ICONWARNING);
}
CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
}
else
{
throw "Oups, this is not supposed to happen!";
}
}
break;
case QEvent::Leave:
ui->outputFoldersEditorLabel->setFrameShadow(QFrame::Plain);
break;
}
}
}