/* * Copyright 2016 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef MENUBAR_P_H #define MENUBAR_P_H #include #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include #else #include #endif #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include #else #include #endif class QPlatformMenuBar; UT_NAMESPACE_BEGIN class MenuBarPrivate; class LOMIRITOOLKIT_EXPORT MenuBar : public QObject, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(QQmlListProperty menus READ menus NOTIFY menusChanged FINAL) Q_CLASSINFO("DefaultProperty", "menus") public: explicit MenuBar(QObject *parent = 0); ~MenuBar(); Q_INVOKABLE void appendMenu(Menu *menu); Q_INVOKABLE void insertMenu(int index, Menu *menu); Q_INVOKABLE void removeMenu(Menu *menu); QQmlListProperty menus(); QPlatformMenuBar *platformMenuBar() const; void classBegin() Q_DECL_OVERRIDE; void componentComplete() Q_DECL_OVERRIDE; Q_SIGNALS: void menusChanged(); private: Q_DISABLE_COPY(MenuBar) Q_DECLARE_PRIVATE(MenuBar) QScopedPointer d_ptr; }; UT_NAMESPACE_END #endif // MENUBAR_P_H