forked from linuxdeepin/deepin-unioncode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log: Change-Id: I692fff9f39f30b29360ef48da6583c62600280bd
- Loading branch information
1 parent
ef59301
commit e56642f
Showing
9 changed files
with
148 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
#include "pluginstorewidget.h" | ||
#include "pluginlistview.h" | ||
|
||
#include <DSearchEdit> | ||
#include <DLabel> | ||
|
||
#include <QVBoxLayout> | ||
|
||
DWIDGET_USE_NAMESPACE | ||
|
||
PluginStoreWidget::PluginStoreWidget(QWidget *parent) | ||
: QWidget(parent) | ||
, pluginListView(new PluginListView(this)) | ||
{ | ||
initializeUi(); | ||
} | ||
|
||
const PluginListView *PluginStoreWidget::getPluginListView() const | ||
{ | ||
return pluginListView; | ||
} | ||
|
||
void PluginStoreWidget::slotSearchChanged(const QString &searchText) | ||
{ | ||
pluginListView->filter(searchText); | ||
} | ||
|
||
void PluginStoreWidget::initializeUi() | ||
{ | ||
inputEdit = new DSearchEdit(this); | ||
connect(inputEdit, &DSearchEdit::textChanged, | ||
this, &PluginStoreWidget::slotSearchChanged); | ||
|
||
auto titleLabel = new DLabel(this); | ||
titleLabel->setText(tr("Extension")); | ||
|
||
QVBoxLayout *vLayout = new QVBoxLayout(this); | ||
setLayout(vLayout); | ||
vLayout->addWidget(titleLabel); | ||
vLayout->addWidget(inputEdit); | ||
vLayout->addWidget(pluginListView); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
#ifndef PLUGINSTOREWIDGET_H | ||
#define PLUGINSTOREWIDGET_H | ||
|
||
#include "dtkwidget_global.h" | ||
|
||
#include <QWidget> | ||
|
||
class PluginListView; | ||
DWIDGET_BEGIN_NAMESPACE | ||
class DSearchEdit; | ||
DWIDGET_END_NAMESPACE | ||
|
||
class PluginStoreWidget : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit PluginStoreWidget(QWidget *parent = nullptr); | ||
const PluginListView *getPluginListView() const; | ||
|
||
signals: | ||
|
||
public slots: | ||
void slotSearchChanged(const QString &searchText); | ||
|
||
private: | ||
void initializeUi(); | ||
|
||
PluginListView *pluginListView {nullptr}; | ||
DTK_WIDGET_NAMESPACE::DSearchEdit *inputEdit { nullptr }; | ||
}; | ||
|
||
#endif // PLUGINSTOREWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.