forked from qt-creator/qt-creator
Squish: De-Q_OBJECT-ify SquishNavigationWidgetFactory
Change-Id: I9c86ce75855a45f32f3752016acb1c8cc8c2d8ee Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -24,11 +24,35 @@
|
||||
#include <QMenu>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace Squish {
|
||||
namespace Internal {
|
||||
namespace Squish::Internal {
|
||||
|
||||
const int defaultSectionSize = 17;
|
||||
|
||||
class SquishNavigationWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
explicit SquishNavigationWidget(QWidget *parent = nullptr);
|
||||
~SquishNavigationWidget() override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
static QList<QToolButton *> createToolButtons();
|
||||
|
||||
private:
|
||||
void onItemActivated(const QModelIndex &idx);
|
||||
void onExpanded(const QModelIndex &idx);
|
||||
void onCollapsed(const QModelIndex &idx);
|
||||
void onRowsInserted(const QModelIndex &parent, int, int);
|
||||
void onRowsRemoved(const QModelIndex &parent, int, int);
|
||||
void onRemoveSharedFolderTriggered(int row, const QModelIndex &parent);
|
||||
void onRemoveAllSharedFolderTriggered();
|
||||
void onRecordTestCase(const QString &suiteName, const QString &testCase);
|
||||
void onNewTestCaseTriggered(const QModelIndex &index);
|
||||
|
||||
SquishTestTreeView *m_view;
|
||||
SquishTestTreeModel *m_model; // not owned
|
||||
SquishTestTreeSortModel *m_sortModel;
|
||||
};
|
||||
|
||||
|
||||
SquishNavigationWidget::SquishNavigationWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
@@ -346,5 +370,4 @@ Core::NavigationView SquishNavigationWidgetFactory::createWidget()
|
||||
return view;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Squish
|
||||
} // Squish::Internal
|
||||
|
@@ -5,47 +5,10 @@
|
||||
|
||||
#include <coreplugin/inavigationwidgetfactory.h>
|
||||
|
||||
#include <utils/navigationtreeview.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QToolButton;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Squish {
|
||||
namespace Internal {
|
||||
|
||||
class SquishTestTreeModel;
|
||||
class SquishTestTreeSortModel;
|
||||
class SquishTestTreeView;
|
||||
|
||||
class SquishNavigationWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SquishNavigationWidget(QWidget *parent = nullptr);
|
||||
~SquishNavigationWidget() override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
static QList<QToolButton *> createToolButtons();
|
||||
|
||||
private:
|
||||
void onItemActivated(const QModelIndex &idx);
|
||||
void onExpanded(const QModelIndex &idx);
|
||||
void onCollapsed(const QModelIndex &idx);
|
||||
void onRowsInserted(const QModelIndex &parent, int, int);
|
||||
void onRowsRemoved(const QModelIndex &parent, int, int);
|
||||
void onRemoveSharedFolderTriggered(int row, const QModelIndex &parent);
|
||||
void onRemoveAllSharedFolderTriggered();
|
||||
void onRecordTestCase(const QString &suiteName, const QString &testCase);
|
||||
void onNewTestCaseTriggered(const QModelIndex &index);
|
||||
|
||||
SquishTestTreeView *m_view;
|
||||
SquishTestTreeModel *m_model; // not owned
|
||||
SquishTestTreeSortModel *m_sortModel;
|
||||
};
|
||||
namespace Squish::Internal {
|
||||
|
||||
class SquishNavigationWidgetFactory : public Core::INavigationWidgetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SquishNavigationWidgetFactory();
|
||||
|
||||
@@ -53,5 +16,4 @@ private:
|
||||
Core::NavigationView createWidget() override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Squish
|
||||
} // Squish::Internal
|
||||
|
Reference in New Issue
Block a user