Refactoring
Removed PrintReport and PrintPreview slots from mainwindow. Print actions will instead be directly connected to reultsview.
This commit is contained in:
parent
2eb0832ac2
commit
2ffffdfdd8
|
@ -77,8 +77,8 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
|
||||||
connect(mLineEditFilter, SIGNAL(textChanged(const QString&)), mFilterTimer, SLOT(start()));
|
connect(mLineEditFilter, SIGNAL(textChanged(const QString&)), mFilterTimer, SLOT(start()));
|
||||||
connect(mLineEditFilter, SIGNAL(returnPressed()), this, SLOT(FilterResults()));
|
connect(mLineEditFilter, SIGNAL(returnPressed()), this, SLOT(FilterResults()));
|
||||||
|
|
||||||
connect(mUI.mActionPrint, SIGNAL(triggered()), this, SLOT(PrintReport()));
|
connect(mUI.mActionPrint, SIGNAL(triggered()), mUI.mResults, SLOT(Print()));
|
||||||
connect(mUI.mActionPrintPreview, SIGNAL(triggered()), this, SLOT(PrintPreview()));
|
connect(mUI.mActionPrintPreview, SIGNAL(triggered()), mUI.mResults, SLOT(PrintPreview()));
|
||||||
connect(mUI.mActionQuit, SIGNAL(triggered()), this, SLOT(close()));
|
connect(mUI.mActionQuit, SIGNAL(triggered()), this, SLOT(close()));
|
||||||
connect(mUI.mActionCheckFiles, SIGNAL(triggered()), this, SLOT(CheckFiles()));
|
connect(mUI.mActionCheckFiles, SIGNAL(triggered()), this, SLOT(CheckFiles()));
|
||||||
connect(mUI.mActionCheckDirectory, SIGNAL(triggered()), this, SLOT(CheckDirectory()));
|
connect(mUI.mActionCheckDirectory, SIGNAL(triggered()), this, SLOT(CheckDirectory()));
|
||||||
|
@ -439,16 +439,6 @@ QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode)
|
||||||
return selected;
|
return selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::PrintReport()
|
|
||||||
{
|
|
||||||
mUI.mResults->Print();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::PrintPreview()
|
|
||||||
{
|
|
||||||
mUI.mResults->PrintPreview();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::CheckFiles()
|
void MainWindow::CheckFiles()
|
||||||
{
|
{
|
||||||
DoCheckFiles(SelectFilesToCheck(QFileDialog::ExistingFiles));
|
DoCheckFiles(SelectFilesToCheck(QFileDialog::ExistingFiles));
|
||||||
|
|
|
@ -72,18 +72,6 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Slot opening a print dialog to print the current report
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void PrintReport();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Slot opening a print preview dialogPrintPreview
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void PrintPreview();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot for check files menu item
|
* @brief Slot for check files menu item
|
||||||
*
|
*
|
||||||
|
|
|
@ -76,9 +76,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void Save(const QString &filename, Report::Type type) const;
|
void Save(const QString &filename, Report::Type type) const;
|
||||||
|
|
||||||
void Print();
|
|
||||||
void PrintPreview();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Update tree settings
|
* @brief Update tree settings
|
||||||
*
|
*
|
||||||
|
@ -226,8 +223,22 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void UpdateDetails(const QModelIndex &index);
|
void UpdateDetails(const QModelIndex &index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Slot opening a print dialog to print the current report
|
||||||
|
*/
|
||||||
|
void Print();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Slot printing the current report to the printer.
|
||||||
|
* @param printer The printer used for printing the report.
|
||||||
|
*/
|
||||||
void Print(QPrinter* printer);
|
void Print(QPrinter* printer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Slot opening a print preview dialog
|
||||||
|
*/
|
||||||
|
void PrintPreview();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Have any errors been found
|
* @brief Have any errors been found
|
||||||
|
|
Loading…
Reference in New Issue