author | zecke <zecke> | 2005-02-14 16:08:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-14 16:08:36 (UTC) |
commit | 0e6780c400fbae2ccd8895e40480adb4273906ae (patch) (unidiff) | |
tree | 1cc48cfef9c0542272da51071ebda0e27b9e3cfc | |
parent | 277adb0af903b8bc2760c20891b664b763b667d9 (diff) | |
download | opie-0e6780c400fbae2ccd8895e40480adb4273906ae.zip opie-0e6780c400fbae2ccd8895e40480adb4273906ae.tar.gz opie-0e6780c400fbae2ccd8895e40480adb4273906ae.tar.bz2 |
Set a Caption
File a Bug and propose a better name
-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 | |||
@@ -65,64 +65,65 @@ QColorMap* CM; | |||
65 | uint8* BS; | 65 | uint8* BS; |
66 | int clipx; | 66 | int clipx; |
67 | int clipy; | 67 | int clipy; |
68 | int clipcx; | 68 | int clipcx; |
69 | int clipcy; | 69 | int clipcy; |
70 | 70 | ||
71 | struct bitmap | 71 | struct bitmap |
72 | { | 72 | { |
73 | int w; | 73 | int w; |
74 | int h; | 74 | int h; |
75 | uint8* data; | 75 | uint8* data; |
76 | }; | 76 | }; |
77 | 77 | ||
78 | BOOL owncolmap = False; | 78 | BOOL owncolmap = False; |
79 | 79 | ||
80 | //***************************************************************************** | 80 | //***************************************************************************** |
81 | void CleanString(QString* Item) | 81 | void CleanString(QString* Item) |
82 | { | 82 | { |
83 | int i; | 83 | int i; |
84 | 84 | ||
85 | i = Item->length() - 1; | 85 | i = Item->length() - 1; |
86 | while (i >= 0) | 86 | while (i >= 0) |
87 | { | 87 | { |
88 | if (Item->at(i) == 10 || Item->at(i) == 13) | 88 | if (Item->at(i) == 10 || Item->at(i) == 13) |
89 | Item->remove(i, 1); | 89 | Item->remove(i, 1); |
90 | i--; | 90 | i--; |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | //***************************************************************************** | 94 | //***************************************************************************** |
95 | QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true) | 95 | QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true) |
96 | { | 96 | { |
97 | setCaption( tr( "Configuration" ) ); | ||
97 | int i, j; | 98 | int i, j; |
98 | char* home; | 99 | char* home; |
99 | char Text[256]; | 100 | char Text[256]; |
100 | QString Line; | 101 | QString Line; |
101 | QString ItemName; | 102 | QString ItemName; |
102 | QString ItemValue; | 103 | QString ItemValue; |
103 | 104 | ||
104 | // resize dialog | 105 | // resize dialog |
105 | resize(230, 270); | 106 | resize(230, 270); |
106 | // main list box | 107 | // main list box |
107 | ListBox = new QListBox(this); | 108 | ListBox = new QListBox(this); |
108 | ListBox->move(10, 10); | 109 | ListBox->move(10, 10); |
109 | ListBox->resize(200, 100); | 110 | ListBox->resize(200, 100); |
110 | connect(ListBox, SIGNAL(selectionChanged()), this, SLOT(ListBoxChanged())); | 111 | connect(ListBox, SIGNAL(selectionChanged()), this, SLOT(ListBoxChanged())); |
111 | connect(ListBox, SIGNAL(selected(int)), this, SLOT(ListBoxSelected(int))); | 112 | connect(ListBox, SIGNAL(selected(int)), this, SLOT(ListBoxSelected(int))); |
112 | // server | 113 | // server |
113 | Label1 = new QLabel(this); | 114 | Label1 = new QLabel(this); |
114 | Label1->setText("Server Desc"); | 115 | Label1->setText("Server Desc"); |
115 | Label1->move(10, 120); | 116 | Label1->move(10, 120); |
116 | Label1->resize(100, 20); | 117 | Label1->resize(100, 20); |
117 | ServerNameEdit = new QLineEdit(this); | 118 | ServerNameEdit = new QLineEdit(this); |
118 | ServerNameEdit->move(75, 120); | 119 | ServerNameEdit->move(75, 120); |
119 | ServerNameEdit->resize(100, 20); | 120 | ServerNameEdit->resize(100, 20); |
120 | // username | 121 | // username |
121 | Label2 = new QLabel(this); | 122 | Label2 = new QLabel(this); |
122 | Label2->setText("User Name"); | 123 | Label2->setText("User Name"); |
123 | Label2->move(10, 150); | 124 | Label2->move(10, 150); |
124 | Label2->resize(100, 20); | 125 | Label2->resize(100, 20); |
125 | UserNameEdit = new QLineEdit(this); | 126 | UserNameEdit = new QLineEdit(this); |
126 | UserNameEdit->move(75, 150); | 127 | UserNameEdit->move(75, 150); |
127 | UserNameEdit->resize(100, 20); | 128 | UserNameEdit->resize(100, 20); |
128 | // ip | 129 | // ip |
@@ -1579,64 +1580,65 @@ void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy) | |||
1579 | int i, j; | 1580 | int i, j; |
1580 | 1581 | ||
1581 | data = (uint8*)xmalloc(cx * cy); | 1582 | data = (uint8*)xmalloc(cx * cy); |
1582 | for (i = 0; i < cy; i++) | 1583 | for (i = 0; i < cy; i++) |
1583 | for (j = 0; j < cx; j++) | 1584 | for (j = 0; j < cx; j++) |
1584 | data[i * cx + j] = get_pixel(x + j, y + i); | 1585 | data[i * cx + j] = get_pixel(x + j, y + i); |
1585 | cache_put_desktop(offset, cx, cy, cx, 1, data); | 1586 | cache_put_desktop(offset, cx, cy, cx, 1, data); |
1586 | xfree(data); | 1587 | xfree(data); |
1587 | } | 1588 | } |
1588 | 1589 | ||
1589 | //***************************************************************************** | 1590 | //***************************************************************************** |
1590 | void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) | 1591 | void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) |
1591 | { | 1592 | { |
1592 | uint8* data; | 1593 | uint8* data; |
1593 | int i, j; | 1594 | int i, j; |
1594 | 1595 | ||
1595 | data = cache_get_desktop(offset, cx, cy, 1); | 1596 | data = cache_get_desktop(offset, cx, cy, 1); |
1596 | for (i = 0; i < cy; i++) | 1597 | for (i = 0; i < cy; i++) |
1597 | for (j = 0; j < cx; j++) | 1598 | for (j = 0; j < cx; j++) |
1598 | set_pixel(x + j, y + i, data[i * cx + j]); | 1599 | set_pixel(x + j, y + i, data[i * cx + j]); |
1599 | redraw(x, y, cx, cy); | 1600 | redraw(x, y, cx, cy); |
1600 | } | 1601 | } |
1601 | 1602 | ||
1602 | //***************************************************************************** | 1603 | //***************************************************************************** |
1603 | int main(int argc, char** argv) | 1604 | int main(int argc, char** argv) |
1604 | { | 1605 | { |
1605 | CM = NULL; | 1606 | CM = NULL; |
1606 | BS = NULL; | 1607 | BS = NULL; |
1607 | App = new QPEApplication(argc, argv); | 1608 | App = new QPEApplication(argc, argv); |
1608 | SV = new QMyScrollView(); | 1609 | SV = new QMyScrollView(); |
1609 | App->setMainWidget(SV); | 1610 | App->setMainWidget(SV); |
1610 | SV->showMaximized(); | 1611 | SV->showMaximized(); |
1612 | SV->setCaption( QMyScrollView::tr("Remote Desktop Client (RDP)") ); | ||
1611 | SV->timer_id = SV->startTimer(1000); | 1613 | SV->timer_id = SV->startTimer(1000); |
1612 | App->exec(); | 1614 | App->exec(); |
1613 | delete SV; | 1615 | delete SV; |
1614 | delete App; | 1616 | delete App; |
1615 | if (CM != NULL) | 1617 | if (CM != NULL) |
1616 | xfree(CM); | 1618 | xfree(CM); |
1617 | if (BS !=NULL) | 1619 | if (BS !=NULL) |
1618 | xfree(BS); | 1620 | xfree(BS); |
1619 | return 0; | 1621 | return 0; |
1620 | } | 1622 | } |
1621 | 1623 | ||
1622 | /* | 1624 | /* |
1623 | MW = new QMyMainWindow(); | 1625 | MW = new QMyMainWindow(); |
1624 | MW->resize(width, height); | 1626 | MW->resize(width, height); |
1625 | SV->resize(width + 4, height + 4); | 1627 | SV->resize(width + 4, height + 4); |
1626 | App->setMainWidget(SV); | 1628 | App->setMainWidget(SV); |
1627 | SV->addChild(MW); | 1629 | SV->addChild(MW); |
1628 | MW->setMouseTracking(true); | 1630 | MW->setMouseTracking(true); |
1629 | SocketNotifier = new QSocketNotifier(global_sock, QSocketNotifier::Read, MW); | 1631 | SocketNotifier = new QSocketNotifier(global_sock, QSocketNotifier::Read, MW); |
1630 | MW->connect(SocketNotifier, SIGNAL(activated(int)), MW, SLOT(dataReceived())); | 1632 | MW->connect(SocketNotifier, SIGNAL(activated(int)), MW, SLOT(dataReceived())); |
1631 | if (fullscreen) | 1633 | if (fullscreen) |
1632 | SV->showFullScreen(); | 1634 | SV->showFullScreen(); |
1633 | else | 1635 | else |
1634 | SV->showMaximized(); | 1636 | SV->showMaximized(); |
1635 | BS = (uint8*)xmalloc(width * height); | 1637 | BS = (uint8*)xmalloc(width * height); |
1636 | memset(BS, 0, width * height); | 1638 | memset(BS, 0, width * height); |
1637 | clipx = 0; | 1639 | clipx = 0; |
1638 | clipy = 0; | 1640 | clipy = 0; |
1639 | clipcx = width; | 1641 | clipcx = width; |
1640 | clipcy = height; | 1642 | clipcy = height; |
1641 | CM = (QColorMap*)xmalloc(sizeof(struct QColorMap)); | 1643 | CM = (QColorMap*)xmalloc(sizeof(struct QColorMap)); |
1642 | memset(CM, 0, sizeof(struct QColorMap)); | 1644 | memset(CM, 0, sizeof(struct QColorMap)); |