2017-12-21 11:51:56 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 ~ 2015 National University of Defense Technology(NUDT) & Kylin Ltd.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Kobe Lee xiangli@ubuntukylin.com/kobe24_lixiang@126.com
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 3.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WINDOWWIDGET_H
|
|
|
|
#define WINDOWWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include "../component/kylinswitcher.h"
|
2018-01-17 11:45:16 +08:00
|
|
|
#include "settingmodulelpage.h"
|
2017-12-21 11:51:56 +08:00
|
|
|
|
|
|
|
class QLabel;
|
|
|
|
class QPushButton;
|
|
|
|
class QComboBox;
|
|
|
|
class QRadioButton;
|
|
|
|
|
2018-01-17 11:45:16 +08:00
|
|
|
class WindowWidget : public SettingModulePage
|
2017-12-21 11:51:56 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-02-12 12:20:24 +08:00
|
|
|
explicit WindowWidget(QWidget *parent = 0, QString cur_desktop = "");
|
2017-12-21 11:51:56 +08:00
|
|
|
~WindowWidget();
|
|
|
|
void setLanguage();
|
|
|
|
void initConnect();
|
2018-01-17 11:45:16 +08:00
|
|
|
void initSettingData() Q_DECL_OVERRIDE;
|
|
|
|
QString settingModuleName() Q_DECL_OVERRIDE;
|
2017-12-21 11:51:56 +08:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setMenuIcon();
|
|
|
|
void setMouseWheel(QString selected);
|
|
|
|
void setMouseDoubleClick(QString selected);
|
|
|
|
void setMouseMiddleClick(QString selected);
|
|
|
|
void setMouseRightClick(QString selected);
|
|
|
|
void setRadioButtonRowStatus();
|
|
|
|
|
|
|
|
void windowwidget_notify_string(QString key, QString value);
|
|
|
|
void windowwidget_notify_bool(QString key, bool value);
|
|
|
|
|
2018-01-17 11:45:16 +08:00
|
|
|
void onSendWindowButtonAlign(const QString ¤t_value);
|
|
|
|
void onSendMenusHaveIcons(bool menuHaveIcons);
|
|
|
|
void onSendWindowTitileTags(const QString ¤t_wheel_type, const QStringList &wheellist, const QStringList &titlebarOptions, const QString ¤t_double_type, const QString ¤t_middle_type, const QString ¤t_right_type);
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void requesetWindowButtonAlign();
|
|
|
|
void requesetMenusHaveIcons();
|
|
|
|
void requesetWindowTitileTags();
|
|
|
|
void resetMenusHaveIcon(bool b);
|
|
|
|
void resetTitlebarWheel(const QString &selected);
|
|
|
|
void resetTitlebarDoubleClick(const QString &selected);
|
|
|
|
void resetMouseMiddleClick(const QString &selected);
|
|
|
|
void resetMouseRightClick(const QString &selected);
|
|
|
|
void resetWindowButtonLeftOrRightAlign(bool isLeft);
|
|
|
|
|
|
|
|
|
2017-12-21 11:51:56 +08:00
|
|
|
private:
|
|
|
|
QString desktop;
|
2018-01-17 11:45:16 +08:00
|
|
|
QStringList m_wheellist;
|
|
|
|
QStringList m_titlebarOptions;
|
2017-12-21 11:51:56 +08:00
|
|
|
QLabel *icon_label;
|
|
|
|
QLabel *wheel_label;
|
|
|
|
QLabel *double_click_label;
|
|
|
|
QLabel *middle_click_label;
|
|
|
|
QLabel *right_click_label;
|
|
|
|
KylinSwitcher *icon_switcher;
|
|
|
|
QComboBox *wheel_combo;
|
|
|
|
QComboBox *double_click_combo;
|
|
|
|
QComboBox *middle_click_combo;
|
|
|
|
QComboBox *right_click_combo;
|
|
|
|
QLabel *position_label;
|
|
|
|
QRadioButton *left_radio;
|
|
|
|
QRadioButton *right_radio;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WINDOWWIDGET_H
|