frmserver.cpp
Upload User: yayahi0755
Upload Date: 2022-05-14
Package Size: 876k
Code Size: 1k
Category:

Browser Client

Development Platform:

Unix_Linux

  1. #include "frmserver.h"
  2. /* 
  3.  *  Constructs a frmserver which is a child of 'parent', with the 
  4.  *  name 'name' and widget flags set to 'f' 
  5.  *
  6.  *  The dialog will by default be modeless, unless you set 'modal' to
  7.  *  TRUE to construct a modal dialog.
  8.  */
  9. static const Q_UINT16 ipcPort = 8000;
  10. frmserver::frmserver( QWidget* parent,  const char* name, bool modal, WFlags fl )
  11.     : serverform( parent, name, modal, fl )
  12. {
  13.     IpcServer *server = new IpcServer( ipcPort, this );    
  14.     connect( server, SIGNAL(receivedText(const QString&)),txtEdit, SLOT(append(const QString&)) );
  15.     connect( server, SIGNAL(receivedPixmap(const QPixmap&)),pixDisplay, SLOT(setPixmap(const QPixmap&)) );    
  16. }
  17. /*  
  18.  *  Destroys the object and frees any allocated resources
  19.  */
  20. frmserver::~frmserver()
  21. {
  22.     // no need to delete child widgets, Qt does it all for us
  23. }