mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-11 13:15:38 +02:00
More status bar use
This commit is contained in:
parent
73cc606ee2
commit
0ff3f5977f
@ -617,7 +617,7 @@ void MainWindow::on_actionUndo_triggered()
|
||||
void MainWindow::on_actionRedo_triggered()
|
||||
{
|
||||
QString str("Redo clicked");
|
||||
statusBar()->showMessage(str, 1000);
|
||||
displayStatus(str);
|
||||
|
||||
if (controller.map())
|
||||
{
|
||||
@ -628,7 +628,7 @@ void MainWindow::on_actionRedo_triggered()
|
||||
void MainWindow::on_actionPass_triggered(bool checked)
|
||||
{
|
||||
QString str("Passability clicked");
|
||||
statusBar()->showMessage(str, 1000);
|
||||
displayStatus(str);
|
||||
|
||||
if(controller.map())
|
||||
{
|
||||
@ -641,7 +641,7 @@ void MainWindow::on_actionPass_triggered(bool checked)
|
||||
void MainWindow::on_actionGrid_triggered(bool checked)
|
||||
{
|
||||
QString str("Grid clicked");
|
||||
statusBar()->showMessage(str, 1000);
|
||||
displayStatus(str);
|
||||
|
||||
if(controller.map())
|
||||
{
|
||||
@ -807,7 +807,7 @@ void MainWindow::on_filter_textChanged(const QString &arg1)
|
||||
void MainWindow::on_actionFill_triggered()
|
||||
{
|
||||
QString str("Fill clicked");
|
||||
statusBar()->showMessage(str, 1000);
|
||||
displayStatus(str);
|
||||
|
||||
if(!controller.map())
|
||||
return;
|
||||
@ -887,6 +887,10 @@ void MainWindow::onSelectionMade(int level, bool anythingSelected)
|
||||
ui->toolErase->setEnabled(anythingSelected);
|
||||
}
|
||||
}
|
||||
void MainWindow::displayStatus(const QString& message, int timeout /* = 2000 */)
|
||||
{
|
||||
statusBar()->showMessage(message, timeout);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionValidate_triggered()
|
||||
{
|
||||
|
@ -105,6 +105,7 @@ public slots:
|
||||
void enableUndo(bool enable);
|
||||
void enableRedo(bool enable);
|
||||
void onSelectionMade(int level, bool anythingSelected);
|
||||
void displayStatus(const QString& message, int timeout = 2000);
|
||||
|
||||
private:
|
||||
void preparePreview(const QModelIndex &index, bool createNew);
|
||||
|
Loading…
x
Reference in New Issue
Block a user