Source Code (Use browser search to find items of interest.)

Class Index

ksirtet'OptionWidget (./kdegames/ksirtet/lib/multi.h:83)

class OptionWidget : public QWidget
{
 Q_OBJECT
		
 public:
	OptionWidget(bool Server, QWidget *parent = 0, const char *name = 0)
	: QWidget(parent, name), server(Server) {}
	virtual ~OptionWidget() {}

	bool isServer() const { return server; }
	
	/**
	 * This method is used on the client side to set the data coming from
	 * the server widget.
	 */
	virtual void dataIn(QDataStream &s) = 0;
	
	/** This method is used on the server side to get the data. */
	virtual void dataOut(QDataStream &s) const = 0;

	/**
	 * When the game will begin (ie when the "netmeeting" is over and the
	 * server has press the "start game" button) this method will be called
	 * (for clients and server). It must save the settings in the config
	 * file.
	 */
	virtual void saveData() = 0;
	
 signals:
	/**
	 * This signal must be called each time options are changed
	 * (by the server).
	 */
	void changed();
	
 private:
	bool server;
};