ReactOS  0.4.13-dev-563-g0561610
QMyScrollView Class Reference

#include <qtewin.h>

Inheritance diagram for QMyScrollView:
Collaboration diagram for QMyScrollView:

Public Member Functions

 QMyScrollView ()
 
 ~QMyScrollView ()
 
void keyPressEvent (QKeyEvent *)
 
void keyReleaseEvent (QKeyEvent *)
 
void showEvent (QShowEvent *)
 
void show ()
 
void polish ()
 
void timerEvent (QTimerEvent *)
 
void keyPressEvent (QKeyEvent *)
 
void keyReleaseEvent (QKeyEvent *)
 

Public Attributes

int timer_id
 
int sound_timer_id
 

Detailed Description

Definition at line 67 of file qtewin.h.

Constructor & Destructor Documentation

◆ QMyScrollView()

QMyScrollView::QMyScrollView ( )

Definition at line 686 of file qtewin.cpp.

686  : QScrollView()
687 {
688 }

◆ ~QMyScrollView()

QMyScrollView::~QMyScrollView ( )

Definition at line 691 of file qtewin.cpp.

692 {
693 }

Member Function Documentation

◆ keyPressEvent() [1/2]

void QMyScrollView::keyPressEvent ( QKeyEvent *  )

◆ keyPressEvent() [2/2]

void QMyScrollView::keyPressEvent ( QKeyEvent *  e)

Definition at line 696 of file qtewin.cpp.

697 {
698  int ScanCode, code;
699  GetScanCode(e, &ScanCode, &code);
700  if (ScanCode != 0)
701  {
702  if (code & 8) // send shift
704  if (code & 16) // send control
706  if (code & 32) // send alt
709  e->accept();
710  }
711 }
#define RDP_KEYPRESS
Definition: constants.h:251
ULONG ScanCode
Definition: api.c:39
void GetScanCode(QKeyEvent *e, int *ScanCode, int *code)
Definition: qtewin.cpp:518
#define e
Definition: ke_i.h:82
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
int code
Definition: i386-dis.c:3591

◆ keyReleaseEvent() [1/2]

void QMyScrollView::keyReleaseEvent ( QKeyEvent *  )

◆ keyReleaseEvent() [2/2]

void QMyScrollView::keyReleaseEvent ( QKeyEvent *  e)

Definition at line 714 of file qtewin.cpp.

715 {
716  int ScanCode, code;
717  GetScanCode(e, &ScanCode, &code);
718  if (ScanCode != 0)
719  {
721  if (code & 8) // send shift
723  if (code & 16) // send control
725  if (code & 32) // send alt
727  e->accept();
728  }
729 }
ULONG ScanCode
Definition: api.c:39
void GetScanCode(QKeyEvent *e, int *ScanCode, int *code)
Definition: qtewin.cpp:518
#define e
Definition: ke_i.h:82
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
int code
Definition: i386-dis.c:3591
#define RDP_KEYRELEASE
Definition: constants.h:252

◆ polish()

void QMyScrollView::polish ( )

Definition at line 744 of file qtewin.cpp.

745 {
746  QScrollView::polish();
747 }

◆ show()

void QMyScrollView::show ( void  )

Definition at line 738 of file qtewin.cpp.

739 {
740  QScrollView::show();
741 }

Referenced by ui_create_window().

◆ showEvent()

void QMyScrollView::showEvent ( QShowEvent *  e)

Definition at line 732 of file qtewin.cpp.

733 {
734  QScrollView::showEvent(e);
735 }
#define e
Definition: ke_i.h:82

◆ timerEvent()

void QMyScrollView::timerEvent ( QTimerEvent *  e)

Definition at line 750 of file qtewin.cpp.

751 {
752  QMyDialog * d;
753  QWidget * Desktop;
754  int dw;
755  int dh;
756 
757  QScrollView::timerEvent(e);
758  killTimer(timer_id);
759  d = new QMyDialog(this);
760  if (d->exec() == 1) // ok clicked
761  {
762  g_width = d->Width;
763  g_height = d->Height;
766  g_fullscreen = d->FullScreen;
767  sprintf(g_server, "%s", (const char*)d->ServerIP);
768  sprintf(g_username, "%s", (const char*)d->UserName);
769 #ifdef WITH_RDPSND
770  // init sound
771  if (g_rdpsnd)
772  {
773  rdpsnd_init();
774  }
775 #endif
777  g_directory))
778  {
779  delete d;
780  g_SV->close();
781  return;
782  }
783  g_BS = (uint8*)xmalloc(g_width * g_height * 4);
784  memset(g_BS, 0, g_width * g_height * 4);
785  g_clipx = 0;
786  g_clipy = 0;
787  g_clipcx = g_width;
788  g_clipcy = g_height;
789  g_CM = (QColorMap*)xmalloc(sizeof(struct QColorMap));
790  memset(g_CM, 0, sizeof(struct QColorMap));
791  g_CM->NumColors = 256;
792  g_MW = new QMyMainWindow();
794  g_MW->show();
795  g_SV->addChild(g_MW);
796  g_MW->setMouseTracking(true);
797  g_MW->setCursor((int)10); /* Qt::BlankCursor */
798  g_SocketNotifier = new QSocketNotifier(g_global_sock,
800  g_MW);
801  g_MW->connect(g_SocketNotifier, SIGNAL(activated(int)), g_MW,
802  SLOT(dataReceived()));
803  if (g_fullscreen)
804  {
805  Desktop = g_App->desktop();
806  dw = Desktop->width();
807  dh = Desktop->height();
808  if (dw == g_client_width && dh == g_client_height)
809  {
810  g_MW->resize(g_client_width - 4, g_client_height - 4);
811  }
812  g_SV->showFullScreen();
813  }
814  delete d;
815  }
816  else // cancel clicked
817  {
818  delete d;
819  g_SV->close();
820  }
821 }
static UINT activated
Definition: msctf.c:72
_In_ BOOLEAN Read
Definition: strmini.h:479
int timer_id
Definition: qtewin.h:80
static uint32 g_flags
Definition: qtewin.cpp:99
void * xmalloc(int size)
Definition: qtewin.cpp:2155
static int g_clipcy
Definition: qtewin.cpp:123
int g_height
Definition: qtewin.cpp:71
static QMyMainWindow * g_MW
Definition: qtewin.cpp:116
static uint8 * g_BS
Definition: qtewin.cpp:119
static int g_client_height
Definition: qtewin.cpp:98
RD_BOOL rdpsnd_init(char *optarg)
#define sprintf(buf, format,...)
Definition: sprintf.c:55
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
Definition: rdp.c:1742
#define e
Definition: ke_i.h:82
static char g_password[16]
Definition: qtewin.cpp:102
static char g_shell[128]
Definition: qtewin.cpp:103
static CHAR Desktop[MAX_PATH]
Definition: dem.c:256
static char g_domain[16]
Definition: qtewin.cpp:101
static int g_clipy
Definition: qtewin.cpp:121
static QSocketNotifier * g_SocketNotifier
Definition: qtewin.cpp:110
static struct QColorMap * g_CM
Definition: qtewin.cpp:118
#define d
Definition: ke_i.h:81
static char g_server[64]
Definition: qtewin.cpp:100
int g_width
Definition: qtewin.cpp:70
static int g_fullscreen
Definition: qtewin.cpp:105
static QApplication * g_App
Definition: qtewin.cpp:114
unsigned char uint8
Definition: types.h:28
REFIID LPVOID DWORD dw
Definition: atlbase.h:40
char g_username[100]
Definition: qtewin.cpp:74
static int g_client_width
Definition: qtewin.cpp:97
static QMyScrollView * g_SV
Definition: qtewin.cpp:117
static char g_directory[32]
Definition: qtewin.cpp:104
#define memset(x, y, z)
Definition: compat.h:39
static int g_global_sock
Definition: qtewin.cpp:106
static int g_clipx
Definition: qtewin.cpp:120
static int g_clipcx
Definition: qtewin.cpp:122

Member Data Documentation

◆ sound_timer_id

int QMyScrollView::sound_timer_id

Definition at line 81 of file qtewin.h.

◆ timer_id

int QMyScrollView::timer_id

Definition at line 80 of file qtewin.h.

Referenced by main(), and timerEvent().


The documentation for this class was generated from the following files: