00001 #ifndef __BUTTONOBJECT_H__ 00002 #define __BUTTONOBJECT_H__ 00003 00004 /* 00005 * Copyright 2011 00006 * 'MedCenter' is an interactive application for hospitals. 00007 * (c) Copyright 2011 - Abdelhafid Hafidi <std.abdel[at]gmail.com> 00008 * - Alexandre Laurent <lw.demoscene[at]gmail.com> 00009 * 00010 * [GPL] 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License along 00023 * with this program; if not, write to the Free Software Foundation, Inc., 00024 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00025 * 00026 */ 00027 00028 #include <QObject> 00029 00030 #include <QString> 00031 #include <QUrl> 00032 00033 class ButtonObject : public QObject 00034 { 00035 Q_OBJECT 00036 00037 Q_PROPERTY(QString name READ name CONSTANT) 00038 Q_PROPERTY(QUrl image READ source CONSTANT) 00039 00040 private: 00041 00042 QString m_name; 00043 QUrl m_source; 00045 public: 00046 ButtonObject(const QString& name, const QUrl& source, QObject* parent=0) 00047 :QObject(parent),m_name(name),m_source(source) {} 00048 00049 const QString& name()const { return m_name; } 00050 const QUrl& source()const { return m_source; } 00051 00052 Q_SIGNAL void titleChanged(); 00053 Q_SIGNAL void sourceChanged(); 00054 }; 00055 00084 #endif