-rw-r--r-- | noncore/net/opierdesktop/qtwin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opierdesktop/qtwin.cpp b/noncore/net/opierdesktop/qtwin.cpp index e350bf6..181d275 100644 --- a/noncore/net/opierdesktop/qtwin.cpp +++ b/noncore/net/opierdesktop/qtwin.cpp @@ -49,96 +49,97 @@ extern int g_width; extern int g_height; extern int server_bpp; extern BOOL fullscreen; extern char username[]; int global_sock; QSocketNotifier* SocketNotifier; QPEApplication* App; QMyMainWindow* MW; QMyScrollView* SV; struct QColorMap { uint32 RGBColors[256]; int NumColors; }; QColorMap* CM; uint8* BS; int clipx; int clipy; int clipcx; int clipcy; struct bitmap { int w; int h; uint8* data; }; BOOL owncolmap = False; //***************************************************************************** void CleanString(QString* Item) { int i; i = Item->length() - 1; while (i >= 0) { if (Item->at(i) == 10 || Item->at(i) == 13) Item->remove(i, 1); i--; } } //***************************************************************************** QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true) { + setCaption( tr( "Configuration" ) ); int i, j; char* home; char Text[256]; QString Line; QString ItemName; QString ItemValue; // resize dialog resize(230, 270); // main list box ListBox = new QListBox(this); ListBox->move(10, 10); ListBox->resize(200, 100); connect(ListBox, SIGNAL(selectionChanged()), this, SLOT(ListBoxChanged())); connect(ListBox, SIGNAL(selected(int)), this, SLOT(ListBoxSelected(int))); // server Label1 = new QLabel(this); Label1->setText("Server Desc"); Label1->move(10, 120); Label1->resize(100, 20); ServerNameEdit = new QLineEdit(this); ServerNameEdit->move(75, 120); ServerNameEdit->resize(100, 20); // username Label2 = new QLabel(this); Label2->setText("User Name"); Label2->move(10, 150); Label2->resize(100, 20); UserNameEdit = new QLineEdit(this); UserNameEdit->move(75, 150); UserNameEdit->resize(100, 20); // ip Label3 = new QLabel(this); Label3->setText("Server IP"); Label3->move(10, 180); Label3->resize(100, 20); IPEdit = new QLineEdit(this); IPEdit->move(75, 180); IPEdit->resize(100, 20); // width and height WidthHeightBox = new QComboBox(this); WidthHeightBox->move(10, 210); WidthHeightBox->resize(100, 20); WidthHeightBox->insertItem("240x320"); WidthHeightBox->insertItem("640x480"); WidthHeightBox->insertItem("800x600"); connect(WidthHeightBox, SIGNAL(activated(int)), this, SLOT(ComboChanged(int))); WidthHeightBox->setCurrentItem(1); @@ -1563,96 +1564,97 @@ void ui_draw_text(uint8 font, uint8 flags, int mixmode, default: DO_GLYPH(text, i); i++; break; } } if (boxcx > 1) redraw(boxx, boxy, boxcx, boxcy); else redraw(clipx, clipy, clipcx, clipcy); } //***************************************************************************** void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy) { uint8* data; int i, j; data = (uint8*)xmalloc(cx * cy); for (i = 0; i < cy; i++) for (j = 0; j < cx; j++) data[i * cx + j] = get_pixel(x + j, y + i); cache_put_desktop(offset, cx, cy, cx, 1, data); xfree(data); } //***************************************************************************** void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) { uint8* data; int i, j; data = cache_get_desktop(offset, cx, cy, 1); for (i = 0; i < cy; i++) for (j = 0; j < cx; j++) set_pixel(x + j, y + i, data[i * cx + j]); redraw(x, y, cx, cy); } //***************************************************************************** int main(int argc, char** argv) { CM = NULL; BS = NULL; App = new QPEApplication(argc, argv); SV = new QMyScrollView(); App->setMainWidget(SV); SV->showMaximized(); + SV->setCaption( QMyScrollView::tr("Remote Desktop Client (RDP)") ); SV->timer_id = SV->startTimer(1000); App->exec(); delete SV; delete App; if (CM != NULL) xfree(CM); if (BS !=NULL) xfree(BS); return 0; } /* MW = new QMyMainWindow(); MW->resize(width, height); SV->resize(width + 4, height + 4); App->setMainWidget(SV); SV->addChild(MW); MW->setMouseTracking(true); SocketNotifier = new QSocketNotifier(global_sock, QSocketNotifier::Read, MW); MW->connect(SocketNotifier, SIGNAL(activated(int)), MW, SLOT(dataReceived())); if (fullscreen) SV->showFullScreen(); else SV->showMaximized(); BS = (uint8*)xmalloc(width * height); memset(BS, 0, width * height); clipx = 0; clipy = 0; clipcx = width; clipcy = height; CM = (QColorMap*)xmalloc(sizeof(struct QColorMap)); memset(CM, 0, sizeof(struct QColorMap)); SV->timer_id = SV->startTimer(1000); return True; int main(int argc, char ** argv) { uint32 flags; int i, total_params; char server[64] = "192.168.0.164"; char domain[16] = ""; char password[16] = ""; char shell[128] = ""; char directory[32] = ""; |