forked from openkylin/ukui-search
Merge branch '0705ukss' into 'ukss-dev'
Add a mainWindow switch dbus interface. See merge request kylin-desktop/ukui-search!345
This commit is contained in:
commit
e4a0e257db
|
@ -327,6 +327,11 @@ void MainWindow::resizeHeight(int height)
|
||||||
this->setFixedHeight(height);
|
this->setFixedHeight(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::tryHide()
|
||||||
|
{
|
||||||
|
this->tryHideMainwindow();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief monitorResolutionChange 监听屏幕改变
|
* @brief monitorResolutionChange 监听屏幕改变
|
||||||
* @param rect
|
* @param rect
|
||||||
|
|
|
@ -110,6 +110,7 @@ public Q_SLOTS:
|
||||||
void settingsBtnClickedSlot();
|
void settingsBtnClickedSlot();
|
||||||
void searchKeywordSlot(const QString&);
|
void searchKeywordSlot(const QString&);
|
||||||
void resizeHeight(int height);
|
void resizeHeight(int height);
|
||||||
|
void tryHide();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,15 @@ void UkuiSearchDbusServices::searchKeyword(QString keyword)
|
||||||
m_mainWindow->setText(keyword);
|
m_mainWindow->setText(keyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UkuiSearchDbusServices::mainWindowSwitch()
|
||||||
|
{
|
||||||
|
if (m_mainWindow->isActiveWindow()) {
|
||||||
|
m_mainWindow->tryHide();
|
||||||
|
} else {
|
||||||
|
m_mainWindow->bootOptionsFilter("-s");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UkuiSearchDbusServices::UkuiSearchDbusServices(MainWindow *m)
|
UkuiSearchDbusServices::UkuiSearchDbusServices(MainWindow *m)
|
||||||
{
|
{
|
||||||
m_mainWindow = m;
|
m_mainWindow = m;
|
||||||
|
|
|
@ -20,9 +20,10 @@ public:
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void showWindow();
|
void showWindow();
|
||||||
void searchKeyword(QString keyword);
|
void searchKeyword(QString keyword);
|
||||||
|
void mainWindowSwitch();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MainWindow *m_mainWindow;
|
MainWindow *m_mainWindow = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue