Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

YQMenuButton.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YQMenuButton.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 // -*- c++ -*-
00020 
00021 #ifndef YQMenuButton_h
00022 #define YQMenuButton_h
00023 
00024 #include <qwidget.h>
00025 #include <ycp/YCPString.h>
00026 
00027 #include "YMenuButton.h"
00028 
00029 
00030 class QPushButton;
00031 
00032 class YQMenuButton : public QWidget, public YMenuButton
00033 {
00034     Q_OBJECT
00035 
00036 public:
00040     YQMenuButton( QWidget *             parent,
00041                   const YWidgetOpt &    opt,
00042                   YCPString             label );
00043 
00049     void setEnabling( bool enabled );
00050 
00056     long nicesize( YUIDimension dim );
00057 
00061     void setSize( long newWidth, long newHeight );
00062 
00066     void setLabel( const YCPString & label );
00067 
00071     virtual bool setKeyboardFocus();
00072 
00078     virtual void createMenu();
00079 
00083     void createMenu( YMenuItem * ymenu, QPopupMenu * _qt_menu );
00084     
00085 protected slots:
00086 
00090     void menuEntryActivated( int menu_item_index );
00091 
00096     void returnNow();
00097 
00098     
00099 protected:
00100 
00101     //
00102     // Data members
00103     //
00104     
00105     QPushButton *       _qt_pushbutton;
00106     int                 _selected_item_index;
00107 };
00108 
00109 #endif // YQMenuButton_h

Generated on Wed Nov 12 06:11:15 2008 for yast2-qt by  doxygen 1.3.9.1