We don't need the findImage anymore.
This commit is contained in:
parent
11098706ce
commit
ff08041bed
4 changed files with 2 additions and 32 deletions
|
@ -232,14 +232,6 @@ bool EffectModel::effectListContains(const QString &effectFilter, int source_row
|
|||
|
||||
}
|
||||
|
||||
QString EffectModel::findImage(const QString &imagePath, int size)
|
||||
{
|
||||
const QString relativePath("icons/oxygen/" + QString::number(size) + 'x' + QString::number(size) + '/' + imagePath);
|
||||
const QString fullImagePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, relativePath, QStandardPaths::LocateFile);
|
||||
return fullImagePath;
|
||||
}
|
||||
|
||||
|
||||
void EffectModel::syncEffectsToKWin()
|
||||
{
|
||||
QDBusInterface interface(QStringLiteral("org.kde.kwin"), QStringLiteral("/Effects"));
|
||||
|
@ -370,11 +362,6 @@ void EffectFilterModel::effectStatus(int rowIndex, bool effectState)
|
|||
m_effectModel->effectStatus(sourceIndex, effectState);
|
||||
}
|
||||
|
||||
QString EffectFilterModel::findImage(const QString &imagePath, int size)
|
||||
{
|
||||
return m_effectModel->findImage(imagePath, size);
|
||||
}
|
||||
|
||||
void EffectFilterModel::syncConfig()
|
||||
{
|
||||
m_effectModel->syncConfig();
|
||||
|
|
|
@ -76,7 +76,6 @@ public:
|
|||
virtual QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
void effectStatus(const QModelIndex &rowIndex, bool effectState);
|
||||
QString findImage(const QString &imagePath, int size = 128);
|
||||
void syncEffectsToKWin();
|
||||
void syncConfig();
|
||||
void enableWidnowManagement(bool enabled);
|
||||
|
@ -113,7 +112,6 @@ public:
|
|||
const QString &filter() const;
|
||||
|
||||
Q_INVOKABLE void effectStatus(int rowIndex, bool effectState);
|
||||
Q_INVOKABLE QString findImage(const QString &imagePath, int size = 128);
|
||||
Q_INVOKABLE void syncConfig();
|
||||
Q_INVOKABLE void enableWidnowManagement(bool enabled);
|
||||
|
||||
|
|
|
@ -124,29 +124,20 @@ Component {
|
|||
anchors.right: aboutButton.left
|
||||
visible: effectConfig.effectUiConfigExists(model.ServiceNameRole)
|
||||
enabled: myCheckBox.checked
|
||||
iconName: "configure"
|
||||
onClicked: {
|
||||
effectConfig.openConfig(model.NameRole);
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
searchModel.image('actions/configure.png')
|
||||
iconSource = searchModel.imagePath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: aboutButton
|
||||
anchors.right: parent.right
|
||||
iconName: "dialog-information"
|
||||
onClicked: {
|
||||
animationAbout.running = true;
|
||||
animationAboutSpacing.running = true;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
searchModel.image('status/dialog-information.png')
|
||||
iconSource = searchModel.imagePath;
|
||||
}
|
||||
}
|
||||
|
||||
EffectConfig {
|
||||
|
|
|
@ -85,14 +85,8 @@ Item {
|
|||
EffectFilterModel {
|
||||
id: searchModel
|
||||
filter: searchField.text
|
||||
property string imagePath
|
||||
signal image(string path)
|
||||
signal effectState(int rowIndex, bool enabled)
|
||||
|
||||
onImage: {
|
||||
imagePath = searchModel.findImage(path);
|
||||
}
|
||||
|
||||
onEffectState: {
|
||||
searchModel.effectStatus(rowIndex, enabled);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue