ReactOS 0.4.15-dev-8131-g4988de4
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 *  e)

Definition at line 696 of file qtewin.cpp.

697{
698 int 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}
UINT ScanCode
Definition: VirtualKey.c:24
#define RDP_KEYPRESS
Definition: constants.h:251
@ RDP_INPUT_SCANCODE
Definition: constants.h:234
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
#define e
Definition: ke_i.h:82
void GetScanCode(QKeyEvent *e, int *ScanCode, int *code)
Definition: qtewin.cpp:518
Definition: inflate.c:139

◆ keyPressEvent() [2/2]

void QMyScrollView::keyPressEvent ( QKeyEvent *  )

◆ keyReleaseEvent() [1/2]

void QMyScrollView::keyReleaseEvent ( QKeyEvent *  e)

Definition at line 714 of file qtewin.cpp.

715{
716 int 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}
#define RDP_KEYRELEASE
Definition: constants.h:252

◆ keyReleaseEvent() [2/2]

void QMyScrollView::keyReleaseEvent ( QKeyEvent *  )

◆ polish()

void QMyScrollView::polish ( )

Definition at line 744 of file qtewin.cpp.

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

◆ show()

void QMyScrollView::show ( )

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}

◆ 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
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;
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,
799 QSocketNotifier::Read,
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}
char g_username[256]
Definition: uimain.c:25
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
Definition: rdp.c:1742
void * xmalloc(int size)
Definition: uimain.c:747
RD_BOOL rdpsnd_init(char *optarg)
int g_width
Definition: uimain.c:42
int g_height
Definition: uimain.c:43
char g_password[256]
Definition: uimain.c:28
unsigned char uint8
Definition: types.h:28
static int g_fullscreen
Definition: win32.c:51
int timer_id
Definition: qtewin.h:80
REFIID LPVOID DWORD_PTR dw
Definition: atlbase.h:40
#define d
Definition: ke_i.h:81
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static UINT activated
Definition: msctf.c:70
static int g_flags
Definition: nanoxwin.c:74
static char g_server[64]
Definition: qtewin.cpp:100
static struct QColorMap * g_CM
Definition: qtewin.cpp:118
static int g_clipcx
Definition: qtewin.cpp:122
static int g_clipy
Definition: qtewin.cpp:121
static QApplication * g_App
Definition: qtewin.cpp:114
static int g_client_width
Definition: qtewin.cpp:97
static QSocketNotifier * g_SocketNotifier
Definition: qtewin.cpp:110
static QMyScrollView * g_SV
Definition: qtewin.cpp:117
static int g_clipx
Definition: qtewin.cpp:120
static uint8 * g_BS
Definition: qtewin.cpp:119
static QMyMainWindow * g_MW
Definition: qtewin.cpp:116
static int g_global_sock
Definition: qtewin.cpp:106
static int g_client_height
Definition: qtewin.cpp:98
static int g_clipcy
Definition: qtewin.cpp:123
#define memset(x, y, z)
Definition: compat.h:39
char g_shell[256]
Definition: uimain.c:29
char g_directory[256]
Definition: uimain.c:30
char g_domain[256]
Definition: uimain.c:31

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: