StelGuiItems.hpp   StelGuiItems.hpp 
skipping to change at line 17 skipping to change at line 17
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELGUIITEMS_HPP_ #ifndef _STELGUIITEMS_HPP_
#define _STELGUIITEMS_HPP_ #define _STELGUIITEMS_HPP_
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
#include <QGraphicsWidget> #include <QGraphicsWidget>
#include <QDebug> #include <QDebug>
class QGraphicsSceneMouseEvent; class QGraphicsSceneMouseEvent;
skipping to change at line 91 skipping to change at line 91
//! @param isTristate define whether the button is a tristate or an on/off button //! @param isTristate define whether the button is a tristate or an on/off button
StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixNoChange, StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixNoChange,
const QPixmap& pixHover=QPixmap(), const QPixmap& pixHover=QPixmap(),
QAction* action=NULL, bool noBackground=false, bo ol isTristate=true); QAction* action=NULL, bool noBackground=false, bo ol isTristate=true);
//! Button states //! Button states
enum {ButtonStateOff = 0, ButtonStateOn = 1, ButtonStateNoChange = 2 }; enum {ButtonStateOff = 0, ButtonStateOn = 1, ButtonStateNoChange = 2 };
//! Get whether the button is checked //! Get whether the button is checked
int isChecked() const {return checked;} int isChecked() const {return checked;}
//! Get the width of the button image.
//! The width is based on pixOn.
int getButtonPixmapWidth() const {return pixOn.width();}
//! Set the button opacity //! Set the button opacity
void setOpacity(double v) {opacity=v; updateIcon();} void setOpacity(double v) {opacity=v; updateIcon();}
//! Activate red mode for this button, i.e. will reduce the non red color component of the icon //! Activate red mode for this button, i.e. will reduce the non red color component of the icon
void setRedMode(bool b) {redMode=b; updateIcon();} void setRedMode(bool b) {redMode=b; updateIcon();}
//! Set the background pixmap of the button.
//! A variant for night vision mode (pixBackgroundRed) is automatica
lly
//! generated from the new background.
void setBackgroundPixmap(const QPixmap& newBackground);
//! Transform the pixmap so that it look red for night vision mode //! Transform the pixmap so that it look red for night vision mode
static QPixmap makeRed(const QPixmap& p); static QPixmap makeRed(const QPixmap& p);
signals: signals:
//! Triggered when the button state changes //! Triggered when the button state changes
void toggled(bool); void toggled(bool);
//! Triggered when the button state changes //! Triggered when the button state changes
void triggered(); void triggered();
//! Emitted when the hover state change //! Emitted when the hover state change
//! @param b true if the mouse entered the button //! @param b true if the mouse entered the button
 End of changes. 3 change blocks. 
1 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/