Commit 1ad918af authored by Alexander A. Maly's avatar Alexander A. Maly

Fixed "Сброк настроек" in menu and toolbar

parent 42b99b78
Pipeline #2934 passed with stages
in 4 minutes and 4 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -5,58 +5,62 @@
#include <kumir2-libs/extensionsystem/settings.h>
#include <QWidget>
#include <QGridLayout>
#include <QPushButton>
#include <QSet>
class QGridLayout;
class QPushButton;
namespace CoreGUI {
namespace CoreGUI
{
class ToolbarContextMenu : public QWidget
{
Q_OBJECT
Q_OBJECT
public:
explicit ToolbarContextMenu(QWidget *parent = 0);
void addProxy(QAction * proxyItem);
void addSeparator();
void finalize();
explicit ToolbarContextMenu(QWidget *parent = 0);
void addProxy(QAction *proxyItem);
void addSeparator();
void finalize();
void setSettingsObject(ExtensionSystem::SettingsPtr settings, const QString &settingsPrefix);
void setExplicitImportNames(const QSet<QString> explicitItemNames);
inline QAction * showAction() const { return showAction_; }
void setSettingsObject(ExtensionSystem::SettingsPtr settings, const QString &settingsPrefix);
void setExplicitImportNames(const QSet<QString> explicitItemNames);
QAction *showAction() const
{
return showAction_;
}
void saveSettings() const;
void loadSettings();
void saveSettings() const;
void loadSettings();
static Qt::CheckState defaultVisible(const QString & objectName);
static Qt::CheckState f2cs(float value);
static float cs2f(Qt::CheckState state);
static Qt::CheckState defaultVisible(const QString &objectName);
static Qt::CheckState f2cs(float value);
static float cs2f(Qt::CheckState state);
bool isItemVisible(Qt::CheckState state, const QString & objectName) const;
bool isItemVisible(Qt::CheckState state, const QString &objectName) const;
protected Q_SLOTS:
void toggleProxyButtonVisible(int iState);
void reset();
void showAll();
void showMe();
void toggleProxyButtonVisible(int iState);
void reset();
void showAll();
void showMe();
protected:
void showEvent(QShowEvent * event);
void paintEvent(QPaintEvent *event);
QList<QAction*> items_;
QSet<QString> forcedItemNames_;
void showEvent(QShowEvent *event);
void paintEvent(QPaintEvent *event);
QList<QAction *> items_;
QSet<QString> forcedItemNames_;
QGridLayout * grid_;
int currentRow_;
int currentColumn_;
QPushButton * btnClose_;
QPushButton * btnReset_;
QPushButton * btnShowAll_;
ExtensionSystem::SettingsPtr settings_;
QString settingsPrefix_;
QSet<QString> explicitImportNames_;
bool ignoreStateChange_;
QAction* showAction_;
QGridLayout *grid_;
int currentRow_;
int currentColumn_;
QPushButton *btnClose_;
QPushButton *btnReset_;
QPushButton *btnShowAll_;
ExtensionSystem::SettingsPtr settings_;
QString settingsPrefix_;
QSet<QString> explicitImportNames_;
bool ignoreStateChange_;
QAction *showAction_;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment