GUI: Renamed LowView methods

This commit is contained in:
Daniel Marjamäki 2017-07-28 11:37:17 +02:00
parent 95a280f43f
commit 1f0720db3f
3 changed files with 13 additions and 13 deletions

View File

@ -32,9 +32,9 @@ LogView::LogView(QWidget *parent)
setWindowFlags(Qt::Tool); setWindowFlags(Qt::Tool);
mUI.mButtonBox->button(QDialogButtonBox::Reset)->setText(tr("Clear")); mUI.mButtonBox->button(QDialogButtonBox::Reset)->setText(tr("Clear"));
connect(mUI.mButtonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(CloseButtonClicked())); connect(mUI.mButtonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
connect(mUI.mButtonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()), this, SLOT(ClearButtonClicked())); connect(mUI.mButtonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()), this, SLOT(clearButtonClicked()));
connect(mUI.mButtonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(SaveButtonClicked())); connect(mUI.mButtonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(saveButtonClicked()));
QSettings settings; QSettings settings;
resize(settings.value(SETTINGS_LOG_VIEW_WIDTH, 400).toInt(), resize(settings.value(SETTINGS_LOG_VIEW_WIDTH, 400).toInt(),
@ -48,22 +48,22 @@ LogView::~LogView()
settings.setValue(SETTINGS_LOG_VIEW_HEIGHT, size().height()); settings.setValue(SETTINGS_LOG_VIEW_HEIGHT, size().height());
} }
void LogView::AppendLine(const QString &line) void LogView::appendLine(const QString &line)
{ {
mUI.mLogEdit->appendPlainText(line); mUI.mLogEdit->appendPlainText(line);
} }
void LogView::CloseButtonClicked() void LogView::closeButtonClicked()
{ {
close(); close();
} }
void LogView::ClearButtonClicked() void LogView::clearButtonClicked()
{ {
mUI.mLogEdit->clear(); mUI.mLogEdit->clear();
} }
void LogView::SaveButtonClicked() void LogView::saveButtonClicked()
{ {
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Log"), QString fileName = QFileDialog::getSaveFileName(this, tr("Save Log"),
"", tr("Text files (*.txt *.log);;All files (*.*)")); "", tr("Text files (*.txt *.log);;All files (*.*)"));

View File

@ -40,7 +40,7 @@ public:
* @param line String to add. * @param line String to add.
* *
*/ */
void AppendLine(const QString &line); void appendLine(const QString &line);
protected slots: protected slots:
@ -48,19 +48,19 @@ protected slots:
* @brief Called when close button is clicked. * @brief Called when close button is clicked.
* *
*/ */
void CloseButtonClicked(); void closeButtonClicked();
/** /**
* @brief Called when clear button is clicked. * @brief Called when clear button is clicked.
* *
*/ */
void ClearButtonClicked(); void clearButtonClicked();
/** /**
* @brief Called when save button is clicked. * @brief Called when save button is clicked.
* *
*/ */
void SaveButtonClicked(); void saveButtonClicked();
private: private:
Ui::LogView mUI; Ui::LogView mUI;

View File

@ -1448,14 +1448,14 @@ void MainWindow::showLibraryEditor()
void MainWindow::log(const QString &logline) void MainWindow::log(const QString &logline)
{ {
if (mLogView) { if (mLogView) {
mLogView->AppendLine(logline); mLogView->appendLine(logline);
} }
} }
void MainWindow::debugError(const ErrorItem &item) void MainWindow::debugError(const ErrorItem &item)
{ {
if (mLogView) { if (mLogView) {
mLogView->AppendLine(item.ToString()); mLogView->appendLine(item.ToString());
} }
} }