Improve output folder selection update code.
This commit is contained in:
parent
c0aa37205c
commit
12a6cd1c25
@ -155,14 +155,14 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
|||||||
outputFolderView->header()->hideSection(3);
|
outputFolderView->header()->hideSection(3);
|
||||||
outputFolderView->setHeaderHidden(true);
|
outputFolderView->setHeaderHidden(true);
|
||||||
outputFolderView->setAnimated(true);
|
outputFolderView->setAnimated(true);
|
||||||
outputFolderView->installEventFilter(this);
|
|
||||||
outputFolderView->setMouseTracking(false);
|
outputFolderView->setMouseTracking(false);
|
||||||
outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu);
|
outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
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());
|
||||||
connect(outputFolderView, SIGNAL(clicked(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
connect(outputFolderView, SIGNAL(clicked(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
||||||
connect(outputFolderView, SIGNAL(activated(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
connect(outputFolderView, SIGNAL(activated(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
||||||
connect(outputFolderView, SIGNAL(entered(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
connect(outputFolderView, SIGNAL(pressed(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
|
||||||
|
connect(outputFolderView, SIGNAL(entered(QModelIndex)), this, SLOT(outputFolderViewMoved(QModelIndex)));
|
||||||
outputFolderView->setCurrentIndex(m_fileSystemModel->index(m_settings->outputDir()));
|
outputFolderView->setCurrentIndex(m_fileSystemModel->index(m_settings->outputDir()));
|
||||||
outputFolderViewClicked(outputFolderView->currentIndex());
|
outputFolderViewClicked(outputFolderView->currentIndex());
|
||||||
connect(buttonMakeFolder, SIGNAL(clicked()), this, SLOT(makeFolderButtonClicked()));
|
connect(buttonMakeFolder, SIGNAL(clicked()), this, SLOT(makeFolderButtonClicked()));
|
||||||
@ -459,10 +459,6 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
|
|||||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
QTimer::singleShot(250, this, SLOT(restoreCursor()));
|
QTimer::singleShot(250, this, SLOT(restoreCursor()));
|
||||||
}
|
}
|
||||||
else if(obj == outputFolderView && (event->type() == QEvent::KeyRelease || event->type() == QEvent::KeyPress))
|
|
||||||
{
|
|
||||||
outputFolderViewClicked(outputFolderView->currentIndex());
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -882,7 +878,7 @@ void MainWindow::styleActionActivated(QAction *action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Output folder changed
|
* Output folder changed (mouse clicked)
|
||||||
*/
|
*/
|
||||||
void MainWindow::outputFolderViewClicked(const QModelIndex &index)
|
void MainWindow::outputFolderViewClicked(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
@ -896,6 +892,17 @@ void MainWindow::outputFolderViewClicked(const QModelIndex &index)
|
|||||||
m_settings->outputDir(selectedDir);
|
m_settings->outputDir(selectedDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Output folder changed (mouse moved)
|
||||||
|
*/
|
||||||
|
void MainWindow::outputFolderViewMoved(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
if(QApplication::mouseButtons() & Qt::LeftButton)
|
||||||
|
{
|
||||||
|
outputFolderViewClicked(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Goto desktop button
|
* Goto desktop button
|
||||||
*/
|
*/
|
||||||
|
@ -61,6 +61,7 @@ private slots:
|
|||||||
void tabActionActivated(QAction *action);
|
void tabActionActivated(QAction *action);
|
||||||
void styleActionActivated(QAction *action);
|
void styleActionActivated(QAction *action);
|
||||||
void outputFolderViewClicked(const QModelIndex &index);
|
void outputFolderViewClicked(const QModelIndex &index);
|
||||||
|
void outputFolderViewMoved(const QModelIndex &index);
|
||||||
void makeFolderButtonClicked(void);
|
void makeFolderButtonClicked(void);
|
||||||
void gotoHomeFolderButtonClicked(void);
|
void gotoHomeFolderButtonClicked(void);
|
||||||
void gotoDesktopButtonClicked(void);
|
void gotoDesktopButtonClicked(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user