Skip to content

Commit

Permalink
feat: [extension] display detail information default
Browse files Browse the repository at this point in the history
Log:

Change-Id: I312aa9eb056e50e0a87de7d555efed478d350c99
  • Loading branch information
deepin-mozart committed Feb 21, 2024
1 parent d5e8c7e commit 69bf8fb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/plugins/core/gui/pluginlistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ PluginListView::PluginListView(QWidget *parent)
});

display();

selectDefaultItem();
}

void PluginListView::display()
Expand Down Expand Up @@ -113,3 +115,8 @@ void PluginListView::filter(const QString &filterText)
this->filterText = filterText;
display();
}

void PluginListView::selectDefaultItem()
{
setCurrentIndex(model->index(0, 0));
}
1 change: 1 addition & 0 deletions src/plugins/core/gui/pluginlistview.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PluginListView : public QListView

dpf::PluginMetaObjectPointer currentPlugin() const;
void filter(const QString &filterText);
void selectDefaultItem();

signals:
void currentPluginActived();
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/gui/pluginstorewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PluginStoreWidget::PluginStoreWidget(QWidget *parent)
initializeUi();
}

const PluginListView *PluginStoreWidget::getPluginListView() const
PluginListView *PluginStoreWidget::getPluginListView() const
{
return pluginListView;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/gui/pluginstorewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PluginStoreWidget : public QWidget
Q_OBJECT
public:
explicit PluginStoreWidget(QWidget *parent = nullptr);
const PluginListView *getPluginListView() const;
PluginListView *getPluginListView() const;

signals:

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/core/gui/pluginsui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ PluginsUi::PluginsUi(QObject *parent)

QObject::connect(pluginListView, &PluginListView::pluginSettingChanged,
this, &PluginsUi::reLaunchRequired);

// display detail default.
emit pluginListView->currentPluginActived();
}

PluginsUi::~PluginsUi()
Expand Down

0 comments on commit 69bf8fb

Please sign in to comment.