- enhancement: add 'run all problem cases' / 'run current problem case' / 'batch set cases' to the option dialog's shortcut panel
This commit is contained in:
parent
1e865a775b
commit
fb18a1f1a3
1
NEWS.md
1
NEWS.md
|
@ -11,6 +11,7 @@ Red Panda C++ Version 1.1.0
|
||||||
- fix: undo doesn't work correctly after rename symbole & reformat
|
- fix: undo doesn't work correctly after rename symbole & reformat
|
||||||
- fix: can't remove a shortcut
|
- fix: can't remove a shortcut
|
||||||
- enhancement: hide all menu actions in the option dialog's shortcut panel
|
- enhancement: hide all menu actions in the option dialog's shortcut panel
|
||||||
|
- enhancement: add 'run all problem cases' / 'run current problem case' / 'batch set cases' to the option dialog's shortcut panel
|
||||||
|
|
||||||
Red Panda C++ Version 1.0.10
|
Red Panda C++ Version 1.0.10
|
||||||
- fix: modify watch doesn't work
|
- fix: modify watch doesn't work
|
||||||
|
|
|
@ -6898,6 +6898,17 @@ bool MainWindow::openningFiles() const
|
||||||
return mOpenningFiles;
|
return mOpenningFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QAction *> MainWindow::listShortCutableActions()
|
||||||
|
{
|
||||||
|
QList<QAction*> actions = findChildren<QAction *>(QString(), Qt::FindDirectChildrenOnly);
|
||||||
|
actions.append(mProblem_RunAllCases);
|
||||||
|
actions.append(mProblem_RunCurrentCase);
|
||||||
|
actions.append(mProblem_batchSetCases);
|
||||||
|
actions.append(mProblem_Properties);
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionTool_Window_Bars_triggered()
|
void MainWindow::on_actionTool_Window_Bars_triggered()
|
||||||
{
|
{
|
||||||
bool state = ui->tabExplorer->isVisible();
|
bool state = ui->tabExplorer->isVisible();
|
||||||
|
@ -6907,7 +6918,6 @@ void MainWindow::on_actionTool_Window_Bars_triggered()
|
||||||
ui->actionTool_Window_Bars->setChecked(state);
|
ui->actionTool_Window_Bars->setChecked(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionStatus_Bar_triggered()
|
void MainWindow::on_actionStatus_Bar_triggered()
|
||||||
{
|
{
|
||||||
bool state = ui->statusbar->isVisible();
|
bool state = ui->statusbar->isVisible();
|
||||||
|
@ -6916,7 +6926,6 @@ void MainWindow::on_actionStatus_Bar_triggered()
|
||||||
ui->actionStatus_Bar->setChecked(state);
|
ui->actionStatus_Bar->setChecked(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionProject_triggered()
|
void MainWindow::on_actionProject_triggered()
|
||||||
{
|
{
|
||||||
bool state = ui->actionProject->isChecked();
|
bool state = ui->actionProject->isChecked();
|
||||||
|
|
|
@ -189,6 +189,8 @@ public:
|
||||||
|
|
||||||
bool openningFiles() const;
|
bool openningFiles() const;
|
||||||
|
|
||||||
|
QList<QAction*> listShortCutableActions();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void logToolsOutput(const QString& msg);
|
void logToolsOutput(const QString& msg);
|
||||||
void onCompileIssue(PCompileIssue issue);
|
void onCompileIssue(PCompileIssue issue);
|
||||||
|
|
|
@ -463,7 +463,7 @@
|
||||||
<enum>QTabWidget::West</enum>
|
<enum>QTabWidget::West</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="usesScrollButtons">
|
<property name="usesScrollButtons">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -64,7 +64,7 @@ void EnvironmentShortcutModel::reload()
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
mShortcuts.clear();
|
mShortcuts.clear();
|
||||||
QList<QMenu*> menus = pMainWindow->menuBar()->findChildren<QMenu*>();
|
QList<QMenu*> menus = pMainWindow->menuBar()->findChildren<QMenu*>();
|
||||||
QList<QAction*> actions = pMainWindow->findChildren<QAction*>(QString(), Qt::FindDirectChildrenOnly);
|
QList<QAction*> actions = pMainWindow->listShortCutableActions();
|
||||||
foreach( const QMenu* menu, menus) {
|
foreach( const QMenu* menu, menus) {
|
||||||
if (menu->title().isEmpty())
|
if (menu->title().isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -22,8 +22,3 @@ CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QFileSystemModel
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CustomFileSystemModel::data(const QModelIndex &index, int role) const
|
|
||||||
{
|
|
||||||
return QFileSystemModel::data(index,role);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include <QFileSystemModel>
|
#include <QFileSystemModel>
|
||||||
|
|
||||||
|
|
||||||
class GitRepository;
|
class GitRepository;
|
||||||
class GitManager;
|
class GitManager;
|
||||||
class CustomFileSystemModel : public QFileSystemModel
|
class CustomFileSystemModel : public QFileSystemModel
|
||||||
|
@ -28,9 +27,6 @@ class CustomFileSystemModel : public QFileSystemModel
|
||||||
public:
|
public:
|
||||||
explicit CustomFileSystemModel(QObject *parent = nullptr);
|
explicit CustomFileSystemModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
// QAbstractItemModel interface
|
|
||||||
public:
|
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CUSTOMFILESYSTEMMODEL_H
|
#endif // CUSTOMFILESYSTEMMODEL_H
|
||||||
|
|
Loading…
Reference in New Issue