File indexing completed on 2024-04-21 16:31:06
0001 /***************************************************************************** 0002 * Copyright 2007 Thomas Luebking <thomas.luebking@web.de> * 0003 * Copyright 2007 - 2010 Craig Drummond <craig.p.drummond@gmail.com> * 0004 * Copyright 2013 - 2015 Yichao Yu <yyc1992@gmail.com> * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU Lesser General Public License as * 0008 * published by the Free Software Foundation; either version 2.1 of the * 0009 * License, or (at your option) version 3, or any later version accepted * 0010 * by the membership of KDE e.V. (or its successor approved by the * 0011 * membership of KDE e.V.), which shall act as a proxy defined in * 0012 * Section 6 of version 3 of the license. * 0013 * * 0014 * This program is distributed in the hope that it will be useful, * 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0017 * Lesser General Public License for more details. * 0018 * * 0019 * You should have received a copy of the GNU Lesser General Public * 0020 * License along with this library. If not, * 0021 * see <http://www.gnu.org/licenses/>. * 0022 *****************************************************************************/ 0023 0024 #ifndef MAC_MENU_ADAPTOR_H 0025 #define MAC_MENU_ADAPTOR_H 0026 0027 #include <QDBusAbstractAdaptor> 0028 #include "macmenu.h" 0029 0030 namespace Bespin { 0031 class MacMenuAdaptor: public QDBusAbstractAdaptor { 0032 Q_OBJECT 0033 Q_CLASSINFO("D-Bus Interface", "org.kde.XBarClient") 0034 0035 private: 0036 MacMenu *mm; 0037 0038 public: 0039 MacMenuAdaptor(MacMenu *macMenu): QDBusAbstractAdaptor(macMenu), 0040 mm(macMenu) 0041 { 0042 } 0043 0044 public Q_SLOTS: 0045 Q_NOREPLY void 0046 activate() 0047 { 0048 mm->activate(); 0049 } 0050 Q_NOREPLY void 0051 deactivate() 0052 { 0053 mm->deactivate(); 0054 } 0055 Q_NOREPLY void 0056 popup(qlonglong key, int idx, int x, int y) 0057 { 0058 mm->popup(key, idx, x, y); 0059 } 0060 Q_NOREPLY void 0061 hover(qlonglong key, int idx, int x, int y) 0062 { 0063 mm->hover(key, idx, x, y); 0064 } 0065 Q_NOREPLY void 0066 popDown(qlonglong key) 0067 { 0068 mm->popDown(key); 0069 } 0070 Q_NOREPLY void 0071 raise(qlonglong key) 0072 { 0073 mm->raise(key); 0074 } 0075 }; 0076 } // namespace 0077 0078 #endif // MAC_MENU_ADAPTOR_H