Author: tgoettlicher
Date: Wed Jan 16 11:09:45 2008
New Revision: 43651
URL: http://svn.opensuse.org/viewcvs/yast?rev=43651&view=rev
Log:
added dummy busy indicator widget to fix build
Modified:
trunk/ncurses/src/Makefile.am
trunk/ncurses/src/NCBusyIndicator.h
trunk/ncurses/src/NCWidgetFactory.h
Modified: trunk/ncurses/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/Makefile.am?rev=43651&r1=43650&r2=43651&view=diff
==============================================================================
--- trunk/ncurses/src/Makefile.am (original)
+++ trunk/ncurses/src/Makefile.am Wed Jan 16 11:09:45 2008
@@ -67,6 +67,7 @@
NCCheckBox.h \
NCLabel.h \
NCProgressBar.h \
+ NCBusyIndicator.h \
NCMenuButton.h \
NCPushButton.h \
NCRadioButton.h \
@@ -138,6 +139,7 @@
NCCheckBox.cc \
NCLabel.cc \
NCProgressBar.cc \
+ NCBusyIndicator.cc \
NCMenuButton.cc \
NCPushButton.cc \
NCRadioButton.cc \
Modified: trunk/ncurses/src/NCBusyIndicator.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCBusyIndicator.h?rev=43651&r1=43650&r2=43651&view=diff
==============================================================================
--- trunk/ncurses/src/NCBusyIndicator.h (original)
+++ trunk/ncurses/src/NCBusyIndicator.h Wed Jan 16 11:09:45 2008
@@ -12,51 +12,94 @@
File: NCBusyIndicator.h
- Author: NobodyCares
-
-*/
+ Author: Thomas Goettlicher
+ Maintainer: Thomas Goettlicher
+
+/-*/
#ifndef NCBusyIndicator_h
#define NCBusyIndicator_h
+#include <iosfwd>
+
#include "YBusyIndicator.h"
#include "NCWidget.h"
-class NCBusyIndicator;
+class NCBusyIndicator;
+///////////////////////////////////////////////////////////////////
+//
+// CLASS NAME : NCBusyIndicator
+//
+// DESCRIPTION :
+//
class NCBusyIndicator : public YBusyIndicator, public NCWidget {
-
friend std::ostream & operator<<( std::ostream & STREAM, const NCBusyIndicator & OBJ );
-
+
NCBusyIndicator & operator=( const NCBusyIndicator & );
NCBusyIndicator ( const NCBusyIndicator & );
private:
+ typedef long long Value_t;
- NClabel label;
- NCursesWindow * lwin // label window
- NCursesWindow * twin // text window
-
- bool alive;
+ NClabel _label;
+ Value_t _timeout;
+ NCursesWindow * _lwin;
+ NCursesWindow * _twin;
void setDefsze();
void tUpdate();
+ void update();
+
+ float _position; // the position of the bar
+ bool _rightwards; // direction the bar moves
+ bool _alive;
+
+
protected:
- virtual void wCreate( const wrect & newrect );
- virtual void wDelete();
- virtual void wRedraw();
+
+ virtual const char * location() const { return "NCBusyIndicator"; }
+
+ virtual void wCreate( const wrect & newrect );
+ virtual void wDelete();
+
+ virtual void wRedraw();
public:
-
- NCBusyIndicator ( YWidget * parent,
- const string & label,
- int timeout = 100 );
-
+
+ NCBusyIndicator( YWidget * parent,
+ const string & label,
+ int timeout = 1000 );
virtual ~NCBusyIndicator();
+ virtual long nicesize( YUIDimension dim );
+
virtual int preferredWidth();
virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
+
+ virtual void setLabel( const string & nlabel );
+
+ virtual void setTimeout( int newTimeout );
+
+ virtual void setAlive( bool newAlive );
+
+ virtual void setEnabled( bool do_bv );
+
+ int timeout() const { return _timeout; }
+
+ void handler(int sig_num);
+ static void staticHandler(int sig_num);
+};
+
+///////////////////////////////////////////////////////////////////
-#endif //NCBusyIndicator.h
+#endif // NCBusyIndicator_h
Modified: trunk/ncurses/src/NCWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCWidgetFactory.h?rev=43651&r1=43650&r2=43651&view=diff
==============================================================================
--- trunk/ncurses/src/NCWidgetFactory.h (original)
+++ trunk/ncurses/src/NCWidgetFactory.h Wed Jan 16 11:09:45 2008
@@ -122,7 +122,7 @@
int maxValue = 100 );
virtual NCBusyIndicator * createBusyIndicator ( YWidget *parent,
const string & label,
- int timeout = 100 );
+ int timeout = 1000 );
virtual NCRichText * createRichText ( YWidget * parent,
const string & text = string(),
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org