First checkin for OpenMesh 2.0
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@2 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
70
Apps/Deprecated/Streaming/Server/VDPMServerViewerWidget.hh
Normal file
70
Apps/Deprecated/Streaming/Server/VDPMServerViewerWidget.hh
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH
|
||||
#define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qwidget.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qstring.h>
|
||||
#include <OpenMesh/Apps/VDProgMesh/Streaming/Server/ServerSideVDPM.hh>
|
||||
#include <OpenMesh/Apps/VDProgMesh/Streaming/Server/VDPMServerSocket.hh>
|
||||
#include <OpenMesh/Apps/VDProgMesh/Streaming/Server/VDPMServerSession.hh>
|
||||
|
||||
|
||||
using OpenMesh::VDPM::set_debug_print;
|
||||
using OpenMesh::VDPM::debug_print;
|
||||
|
||||
|
||||
class VDPMServerViewerWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//VDPMServerViewerWidget(QWidget *_parent) : QWidget(_parent)
|
||||
VDPMServerViewerWidget() : QWidget()
|
||||
{
|
||||
VDPMServerSocket *server = new VDPMServerSocket(this);
|
||||
connect(server,
|
||||
SIGNAL(newConnect(VDPMServerSession*)),
|
||||
SLOT(newConnect(VDPMServerSession*)));
|
||||
|
||||
vd_streaming_ = true;
|
||||
}
|
||||
|
||||
private:
|
||||
typedef ServerSideVDPMList::iterator ServerSideVDPMListIter;
|
||||
ServerSideVDPMList vdpms_;
|
||||
bool vd_streaming_;
|
||||
|
||||
public:
|
||||
|
||||
ServerSideVDPM* get_vdpm(const char _vdpm_name[256]);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
bool open_vd_prog_mesh(const char *_filename);
|
||||
bool vd_streaming() const { return vd_streaming_; }
|
||||
|
||||
private slots:
|
||||
|
||||
void newConnect(VDPMServerSession *s)
|
||||
{
|
||||
std::cout << "New connection" << std::endl;
|
||||
|
||||
connect(s, SIGNAL(connectionClosed()), SLOT(connectionClosed()));
|
||||
}
|
||||
|
||||
void connectionClosed()
|
||||
{
|
||||
std::cout << "Client closed connection" << std::endl;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent* _event);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH defined
|
||||
|
||||
|
||||
Reference in New Issue
Block a user