Quellcode durchsuchen

rdp launcher

tags/v0.5
Robin Thoni vor 9 Jahren
Ursprung
Commit
ce5b5bd718
9 geänderte Dateien mit 474 neuen und 32 gelöschten Zeilen
  1. 3
    0
      main.cpp
  2. 67
    0
      maindialog.cpp
  3. 11
    0
      maindialog.h
  4. 92
    30
      maindialog.ui
  5. 6
    2
      rd-launcher.pro
  6. 48
    0
      rdesktoplauncher.cpp
  7. 15
    0
      rdesktoplauncher.h
  8. 139
    0
      rdpoptions.cpp
  9. 93
    0
      rdpoptions.h

+ 3
- 0
main.cpp Datei anzeigen

1
 #include "maindialog.h"
1
 #include "maindialog.h"
2
 #include <QApplication>
2
 #include <QApplication>
3
+#include <QTextCodec>
3
 
4
 
4
 int main(int argc, char *argv[])
5
 int main(int argc, char *argv[])
5
 {
6
 {
6
     QApplication a(argc, argv);
7
     QApplication a(argc, argv);
8
+    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
9
+    QTextCodec::setCodecForTr(QTextCodec::codecForCStrings());
7
     MainDialog w;
10
     MainDialog w;
8
     w.show();
11
     w.show();
9
 
12
 

+ 67
- 0
maindialog.cpp Datei anzeigen

1
+#include <QApplication>
2
+#include <QDesktopWidget>
3
+#include <QDebug>
1
 #include "maindialog.h"
4
 #include "maindialog.h"
2
 #include "ui_maindialog.h"
5
 #include "ui_maindialog.h"
6
+#include "rdpoptions.h"
7
+#include "rdesktoplauncher.h"
3
 
8
 
4
 MainDialog::MainDialog(QWidget *parent) :
9
 MainDialog::MainDialog(QWidget *parent) :
5
     QDialog(parent),
10
     QDialog(parent),
7
 {
12
 {
8
     ui->setupUi(this);
13
     ui->setupUi(this);
9
     connect(ui->lineComputer->lineEdit(), SIGNAL(returnPressed()), ui->btnConnect, SLOT(animateClick()));
14
     connect(ui->lineComputer->lineEdit(), SIGNAL(returnPressed()), ui->btnConnect, SLOT(animateClick()));
15
+    connect(ui->lineComputer->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
16
+    computeResolutions();
17
+    ui->lineComputer->setFocus();
10
 }
18
 }
11
 
19
 
12
 MainDialog::~MainDialog()
20
 MainDialog::~MainDialog()
13
 {
21
 {
14
     delete ui;
22
     delete ui;
15
 }
23
 }
24
+
25
+void MainDialog::on_btnConnect_clicked()
26
+{
27
+    RdpOptions opt;
28
+    opt.setBitmapCache(ui->checkCacheBitmap->isChecked());
29
+    opt.setExperience((RdpOptions::Experience)ui->comboExperience->currentIndex());
30
+    opt.setFullescreen(ui->slidResolution->value() == m_resolutions.size());
31
+    opt.setHost(ui->lineComputer->currentText());
32
+    int meta = ui->comboMetaKeys->currentIndex();
33
+    opt.setMetaKeys(meta == 0 || (opt.fullescreen() && meta == 2));
34
+    opt.setPassword(ui->linePassword->text());
35
+    opt.setResolution(m_resolutions.at(m_resolutions.size() - 1));
36
+    opt.setUsername(ui->lineUsername->text());
37
+    opt.setUseShell(ui->checkShell->isChecked());
38
+    if (opt.useShell())
39
+    {
40
+        opt.setShell(ui->lineShellPath->text());
41
+        opt.setShellWorkingDir(ui->lineShellWorkingDir->text());
42
+    }
43
+    int colors = ui->comboColors->currentIndex();
44
+    RdpOptions::Colors c;
45
+    if (colors == 0)
46
+        c = RdpOptions::HighColor_15;
47
+    else if (colors == 1)
48
+        c = RdpOptions::HighColor_16;
49
+    else if (colors == 2)
50
+        c = RdpOptions::TrueColor;
51
+    else if (colors == 3)
52
+        c = RdpOptions::HighestQuality;
53
+    opt.setColors(c);
54
+    RDesktopLauncher launcher;
55
+    launcher.start(opt);
56
+}
57
+
58
+void MainDialog::textChanged(QString)
59
+{
60
+    ui->btnConnect->setEnabled(!ui->lineComputer->lineEdit()->text().isEmpty());
61
+}
62
+
63
+void MainDialog::computeResolutions()
64
+{
65
+    m_resolutions.append(QApplication::desktop()->availableGeometry().size());
66
+    ui->slidResolution->setMinimum(0);
67
+    ui->slidResolution->setMaximum(m_resolutions.size());
68
+    ui->slidResolution->setValue(m_resolutions.size());
69
+}
70
+
71
+void MainDialog::on_slidResolution_valueChanged(int value)
72
+{
73
+    if (value < m_resolutions.size())
74
+    {
75
+        QSize reso = m_resolutions.at(value);
76
+        ui->lblResolution->setText(QString("%1x%2").arg(reso.width()).arg(reso.height()));
77
+    }
78
+    else
79
+    {
80
+        ui->lblResolution->setText(tr("Plein écran"));
81
+    }
82
+}

+ 11
- 0
maindialog.h Datei anzeigen

15
     explicit MainDialog(QWidget *parent = 0);
15
     explicit MainDialog(QWidget *parent = 0);
16
     ~MainDialog();
16
     ~MainDialog();
17
 
17
 
18
+private slots:
19
+    void on_btnConnect_clicked();
20
+
21
+    void textChanged(QString);
22
+
23
+    void computeResolutions();
24
+
25
+    void on_slidResolution_valueChanged(int value);
26
+
18
 private:
27
 private:
19
     Ui::MainDialog *ui;
28
     Ui::MainDialog *ui;
29
+
30
+    QList<QSize> m_resolutions;
20
 };
31
 };
21
 
32
 
22
 #endif // MAINDIALOG_H
33
 #endif // MAINDIALOG_H

+ 92
- 30
maindialog.ui Datei anzeigen

13
   <property name="windowTitle">
13
   <property name="windowTitle">
14
    <string>Connexion Bureau à distance</string>
14
    <string>Connexion Bureau à distance</string>
15
   </property>
15
   </property>
16
+  <property name="windowIcon">
17
+   <iconset resource="rc.qrc">
18
+    <normaloff>:/images/icons/Icon_1.ico</normaloff>:/images/icons/Icon_1.ico</iconset>
19
+  </property>
16
   <layout class="QVBoxLayout" name="verticalLayout">
20
   <layout class="QVBoxLayout" name="verticalLayout">
17
    <property name="leftMargin">
21
    <property name="leftMargin">
18
     <number>0</number>
22
     <number>0</number>
47
 }</string>
51
 }</string>
48
      </property>
52
      </property>
49
      <layout class="QHBoxLayout" name="horizontalLayout">
53
      <layout class="QHBoxLayout" name="horizontalLayout">
54
+      <property name="topMargin">
55
+       <number>0</number>
56
+      </property>
57
+      <property name="bottomMargin">
58
+       <number>0</number>
59
+      </property>
50
       <item>
60
       <item>
51
        <widget class="QLabel" name="widHeaderIcon">
61
        <widget class="QLabel" name="widHeaderIcon">
52
         <property name="maximumSize">
62
         <property name="maximumSize">
84
       </font>
94
       </font>
85
      </property>
95
      </property>
86
      <property name="currentIndex">
96
      <property name="currentIndex">
87
-      <number>0</number>
97
+      <number>3</number>
88
      </property>
98
      </property>
89
      <widget class="QWidget" name="tabGeneral">
99
      <widget class="QWidget" name="tabGeneral">
90
       <attribute name="title">
100
       <attribute name="title">
132
           </item>
142
           </item>
133
           <item row="4" column="1" colspan="2">
143
           <item row="4" column="1" colspan="2">
134
            <widget class="QCheckBox" name="checkSaveSession">
144
            <widget class="QCheckBox" name="checkSaveSession">
145
+            <property name="enabled">
146
+             <bool>false</bool>
147
+            </property>
135
             <property name="text">
148
             <property name="text">
136
              <string>Me permettre d'enregistrer les informations d'idenfication</string>
149
              <string>Me permettre d'enregistrer les informations d'idenfication</string>
137
             </property>
150
             </property>
191
        </item>
204
        </item>
192
        <item>
205
        <item>
193
         <widget class="QGroupBox" name="groupBox_2">
206
         <widget class="QGroupBox" name="groupBox_2">
207
+         <property name="enabled">
208
+          <bool>false</bool>
209
+         </property>
194
          <property name="title">
210
          <property name="title">
195
           <string>Paramètres de connexion</string>
211
           <string>Paramètres de connexion</string>
196
          </property>
212
          </property>
274
           <string>Configuration de l'affichage</string>
290
           <string>Configuration de l'affichage</string>
275
          </property>
291
          </property>
276
          <layout class="QGridLayout" name="gridLayout_3">
292
          <layout class="QGridLayout" name="gridLayout_3">
277
-          <item row="1" column="1">
278
-           <widget class="QLabel" name="label_10">
279
-            <property name="text">
280
-             <string>Petit</string>
293
+          <item row="3" column="1" colspan="3">
294
+           <widget class="QCheckBox" name="checkAllDisplays">
295
+            <property name="enabled">
296
+             <bool>false</bool>
297
+            </property>
298
+            <property name="sizePolicy">
299
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
300
+              <horstretch>0</horstretch>
301
+              <verstretch>0</verstretch>
302
+             </sizepolicy>
281
             </property>
303
             </property>
282
-           </widget>
283
-          </item>
284
-          <item row="1" column="3">
285
-           <widget class="QLabel" name="label_11">
286
             <property name="text">
304
             <property name="text">
287
-             <string>Grand</string>
305
+             <string>Utiliser tous les moniteurs pour la session à distance</string>
288
             </property>
306
             </property>
289
            </widget>
307
            </widget>
290
           </item>
308
           </item>
291
           <item row="1" column="2">
309
           <item row="1" column="2">
292
            <widget class="QSlider" name="slidResolution">
310
            <widget class="QSlider" name="slidResolution">
311
+            <property name="sizePolicy">
312
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
313
+              <horstretch>0</horstretch>
314
+              <verstretch>0</verstretch>
315
+             </sizepolicy>
316
+            </property>
317
+            <property name="minimum">
318
+             <number>10</number>
319
+            </property>
293
             <property name="maximum">
320
             <property name="maximum">
294
              <number>10</number>
321
              <number>10</number>
295
             </property>
322
             </property>
303
              <enum>QSlider::TicksBelow</enum>
330
              <enum>QSlider::TicksBelow</enum>
304
             </property>
331
             </property>
305
             <property name="tickInterval">
332
             <property name="tickInterval">
306
-             <number>10</number>
333
+             <number>1</number>
307
             </property>
334
             </property>
308
            </widget>
335
            </widget>
309
           </item>
336
           </item>
310
-          <item row="0" column="1" colspan="3">
311
-           <widget class="QLabel" name="label_9">
337
+          <item row="1" column="3">
338
+           <widget class="QLabel" name="label_11">
312
             <property name="text">
339
             <property name="text">
313
-             <string>Choisissez la taille de votre bureau à distance. Déplacez le curseur à l'extrême droite utiliser la totalité de l'écran.</string>
314
-            </property>
315
-            <property name="wordWrap">
316
-             <bool>true</bool>
340
+             <string>Grand</string>
317
             </property>
341
             </property>
318
            </widget>
342
            </widget>
319
           </item>
343
           </item>
336
             </property>
360
             </property>
337
            </widget>
361
            </widget>
338
           </item>
362
           </item>
363
+          <item row="0" column="1" colspan="3">
364
+           <widget class="QLabel" name="label_9">
365
+            <property name="text">
366
+             <string>Choisissez la taille de votre bureau à distance. Déplacez le curseur à l'extrême droite utiliser la totalité de l'écran.</string>
367
+            </property>
368
+            <property name="wordWrap">
369
+             <bool>true</bool>
370
+            </property>
371
+           </widget>
372
+          </item>
373
+          <item row="1" column="1">
374
+           <widget class="QLabel" name="label_10">
375
+            <property name="text">
376
+             <string>Petit</string>
377
+            </property>
378
+            <property name="alignment">
379
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
380
+            </property>
381
+           </widget>
382
+          </item>
339
           <item row="2" column="1" colspan="3">
383
           <item row="2" column="1" colspan="3">
340
-           <widget class="QCheckBox" name="checkAllDisplays">
384
+           <widget class="QLabel" name="lblResolution">
341
             <property name="text">
385
             <property name="text">
342
-             <string>Utiliser tous les moniteurs pour la session à distance</string>
386
+             <string/>
387
+            </property>
388
+            <property name="alignment">
389
+             <set>Qt::AlignCenter</set>
343
             </property>
390
             </property>
344
            </widget>
391
            </widget>
345
           </item>
392
           </item>
428
        </item>
475
        </item>
429
        <item>
476
        <item>
430
         <widget class="QCheckBox" name="checkFullscreenBar">
477
         <widget class="QCheckBox" name="checkFullscreenBar">
478
+         <property name="enabled">
479
+          <bool>false</bool>
480
+         </property>
431
          <property name="text">
481
          <property name="text">
432
           <string>Afficher la barre de connexion en cas de mode plein écran</string>
482
           <string>Afficher la barre de connexion en cas de mode plein écran</string>
433
          </property>
483
          </property>
458
       <layout class="QVBoxLayout" name="verticalLayout_4">
508
       <layout class="QVBoxLayout" name="verticalLayout_4">
459
        <item>
509
        <item>
460
         <widget class="QGroupBox" name="groupBox_4">
510
         <widget class="QGroupBox" name="groupBox_4">
511
+         <property name="enabled">
512
+          <bool>false</bool>
513
+         </property>
461
          <property name="title">
514
          <property name="title">
462
           <string>Sortie audio de l'ordinateur distant</string>
515
           <string>Sortie audio de l'ordinateur distant</string>
463
          </property>
516
          </property>
547
              </sizepolicy>
600
              </sizepolicy>
548
             </property>
601
             </property>
549
             <property name="text">
602
             <property name="text">
550
-             <string>Appliquer les combinaisons de touches Windows:</string>
603
+             <string>Appliquer les combinaisons de touches du Window Manager:</string>
551
             </property>
604
             </property>
552
             <property name="wordWrap">
605
             <property name="wordWrap">
553
              <bool>true</bool>
606
              <bool>true</bool>
600
        </item>
653
        </item>
601
        <item>
654
        <item>
602
         <widget class="QGroupBox" name="groupBox_6">
655
         <widget class="QGroupBox" name="groupBox_6">
656
+         <property name="enabled">
657
+          <bool>false</bool>
658
+         </property>
603
          <property name="title">
659
          <property name="title">
604
           <string>Ressources et périphériques locaux</string>
660
           <string>Ressources et périphériques locaux</string>
605
          </property>
661
          </property>
683
       </attribute>
739
       </attribute>
684
       <layout class="QVBoxLayout" name="verticalLayout_5">
740
       <layout class="QVBoxLayout" name="verticalLayout_5">
685
        <item>
741
        <item>
686
-        <widget class="QGroupBox" name="groupBox_7">
742
+        <widget class="QGroupBox" name="grpShell">
687
          <property name="title">
743
          <property name="title">
688
           <string>Démarrer un programme</string>
744
           <string>Démarrer un programme</string>
689
          </property>
745
          </property>
702
            </widget>
758
            </widget>
703
           </item>
759
           </item>
704
           <item row="0" column="1">
760
           <item row="0" column="1">
705
-           <widget class="QCheckBox" name="checkProgram">
761
+           <widget class="QCheckBox" name="checkShell">
706
             <property name="text">
762
             <property name="text">
707
              <string>Démarrer le programme suivant lors de la connexion:</string>
763
              <string>Démarrer le programme suivant lors de la connexion:</string>
708
             </property>
764
             </property>
719
            </widget>
775
            </widget>
720
           </item>
776
           </item>
721
           <item row="2" column="1">
777
           <item row="2" column="1">
722
-           <widget class="QLineEdit" name="lineProgramPath">
778
+           <widget class="QLineEdit" name="lineShellPath">
723
             <property name="enabled">
779
             <property name="enabled">
724
              <bool>false</bool>
780
              <bool>false</bool>
725
             </property>
781
             </property>
736
            </widget>
792
            </widget>
737
           </item>
793
           </item>
738
           <item row="4" column="1">
794
           <item row="4" column="1">
739
-           <widget class="QLineEdit" name="lineProgramWorkingDir">
795
+           <widget class="QLineEdit" name="lineShellWorkingDir">
740
             <property name="enabled">
796
             <property name="enabled">
741
              <bool>false</bool>
797
              <bool>false</bool>
742
             </property>
798
             </property>
872
        </item>
928
        </item>
873
        <item>
929
        <item>
874
         <widget class="QCheckBox" name="checkAutoReconnect">
930
         <widget class="QCheckBox" name="checkAutoReconnect">
931
+         <property name="enabled">
932
+          <bool>false</bool>
933
+         </property>
875
          <property name="text">
934
          <property name="text">
876
           <string>Rétablir la connexion si elle est interrompue</string>
935
           <string>Rétablir la connexion si elle est interrompue</string>
877
          </property>
936
          </property>
923
      </item>
982
      </item>
924
      <item>
983
      <item>
925
       <widget class="QPushButton" name="btnConnect">
984
       <widget class="QPushButton" name="btnConnect">
985
+       <property name="enabled">
986
+        <bool>false</bool>
987
+       </property>
926
        <property name="text">
988
        <property name="text">
927
         <string>Connexion</string>
989
         <string>Connexion</string>
928
        </property>
990
        </property>
948
  </resources>
1010
  </resources>
949
  <connections>
1011
  <connections>
950
   <connection>
1012
   <connection>
951
-   <sender>checkProgram</sender>
1013
+   <sender>checkShell</sender>
952
    <signal>toggled(bool)</signal>
1014
    <signal>toggled(bool)</signal>
953
    <receiver>label_22</receiver>
1015
    <receiver>label_22</receiver>
954
    <slot>setEnabled(bool)</slot>
1016
    <slot>setEnabled(bool)</slot>
964
    </hints>
1026
    </hints>
965
   </connection>
1027
   </connection>
966
   <connection>
1028
   <connection>
967
-   <sender>checkProgram</sender>
1029
+   <sender>checkShell</sender>
968
    <signal>toggled(bool)</signal>
1030
    <signal>toggled(bool)</signal>
969
-   <receiver>lineProgramPath</receiver>
1031
+   <receiver>lineShellPath</receiver>
970
    <slot>setEnabled(bool)</slot>
1032
    <slot>setEnabled(bool)</slot>
971
    <hints>
1033
    <hints>
972
     <hint type="sourcelabel">
1034
     <hint type="sourcelabel">
980
    </hints>
1042
    </hints>
981
   </connection>
1043
   </connection>
982
   <connection>
1044
   <connection>
983
-   <sender>checkProgram</sender>
1045
+   <sender>checkShell</sender>
984
    <signal>toggled(bool)</signal>
1046
    <signal>toggled(bool)</signal>
985
    <receiver>label_23</receiver>
1047
    <receiver>label_23</receiver>
986
    <slot>setEnabled(bool)</slot>
1048
    <slot>setEnabled(bool)</slot>
996
    </hints>
1058
    </hints>
997
   </connection>
1059
   </connection>
998
   <connection>
1060
   <connection>
999
-   <sender>checkProgram</sender>
1061
+   <sender>checkShell</sender>
1000
    <signal>toggled(bool)</signal>
1062
    <signal>toggled(bool)</signal>
1001
-   <receiver>lineProgramWorkingDir</receiver>
1063
+   <receiver>lineShellWorkingDir</receiver>
1002
    <slot>setEnabled(bool)</slot>
1064
    <slot>setEnabled(bool)</slot>
1003
    <hints>
1065
    <hints>
1004
     <hint type="sourcelabel">
1066
     <hint type="sourcelabel">

+ 6
- 2
rd-launcher.pro Datei anzeigen

13
 
13
 
14
 
14
 
15
 SOURCES += main.cpp\
15
 SOURCES += main.cpp\
16
-        maindialog.cpp
16
+        maindialog.cpp \
17
+    rdpoptions.cpp \
18
+    rdesktoplauncher.cpp
17
 
19
 
18
-HEADERS  += maindialog.h
20
+HEADERS  += maindialog.h \
21
+    rdpoptions.h \
22
+    rdesktoplauncher.h
19
 
23
 
20
 FORMS    += maindialog.ui
24
 FORMS    += maindialog.ui
21
 
25
 

+ 48
- 0
rdesktoplauncher.cpp Datei anzeigen

1
+#include "rdesktoplauncher.h"
2
+#include <QStringList>
3
+#include <QProcess>
4
+#include <QDebug>
5
+
6
+RDesktopLauncher::RDesktopLauncher()
7
+{
8
+}
9
+
10
+void RDesktopLauncher::start(RdpOptions options)
11
+{
12
+    QStringList args;
13
+    args.append("-u");
14
+    args.append(options.username());
15
+    args.append("-p");
16
+    args.append(options.password());
17
+    args.append("-a");
18
+    args.append(QString("%1").arg((int)options.colors()));
19
+    if (!options.fullescreen())
20
+    {
21
+        args.append("-g");
22
+        QSize reso = options.resolution();
23
+        args.append(QString("%1x%2").arg(reso.width()).arg(reso.height()));
24
+    }
25
+    else
26
+    {
27
+        args.append("-f");
28
+    }
29
+    if (options.bitmapCache())
30
+    {
31
+        args.append("-P");
32
+    }
33
+    if (!options.metaKeys())
34
+    {
35
+        args.append("-K");
36
+    }
37
+    if (options.useShell())
38
+    {
39
+        args.append("-s");
40
+        args.append(options.shell());
41
+        args.append("-c");
42
+        args.append(options.shellWorkingDir());
43
+    }
44
+
45
+    args.append(options.host());
46
+
47
+    QProcess::startDetached("rdesktop", args);
48
+}

+ 15
- 0
rdesktoplauncher.h Datei anzeigen

1
+#ifndef RDESKTOPLAUNCHER_H
2
+#define RDESKTOPLAUNCHER_H
3
+
4
+#include "rdpoptions.h"
5
+
6
+class RDesktopLauncher
7
+{
8
+public:
9
+    RDesktopLauncher();
10
+
11
+public:
12
+    void start(RdpOptions options);
13
+};
14
+
15
+#endif // RDESKTOPLAUNCHER_H

+ 139
- 0
rdpoptions.cpp Datei anzeigen

1
+#include "rdpoptions.h"
2
+
3
+RdpOptions::RdpOptions()
4
+{
5
+}
6
+
7
+QString RdpOptions::host() const
8
+{
9
+    return m_host;
10
+}
11
+
12
+void RdpOptions::setHost(const QString &host)
13
+{
14
+    m_host = host;
15
+}
16
+
17
+QString RdpOptions::username() const
18
+{
19
+    return m_username;
20
+}
21
+
22
+void RdpOptions::setUsername(const QString &username)
23
+{
24
+    m_username = username;
25
+}
26
+
27
+QString RdpOptions::password() const
28
+{
29
+    return m_password;
30
+}
31
+
32
+void RdpOptions::setPassword(const QString &password)
33
+{
34
+    m_password = password;
35
+}
36
+
37
+QSize RdpOptions::resolution() const
38
+{
39
+    return m_resolution;
40
+}
41
+
42
+void RdpOptions::setResolution(const QSize &resolution)
43
+{
44
+    m_resolution = resolution;
45
+}
46
+
47
+bool RdpOptions::fullescreen() const
48
+{
49
+    return m_fullescreen;
50
+}
51
+
52
+void RdpOptions::setFullescreen(bool fullescreen)
53
+{
54
+    m_fullescreen = fullescreen;
55
+}
56
+
57
+RdpOptions::Experience RdpOptions::experience() const
58
+{
59
+    return m_experience;
60
+}
61
+
62
+void RdpOptions::setExperience(const Experience &experience)
63
+{
64
+    m_experience = experience;
65
+}
66
+
67
+bool RdpOptions::bitmapCache() const
68
+{
69
+    return m_bitmapCache;
70
+}
71
+
72
+void RdpOptions::setBitmapCache(bool bitmapCache)
73
+{
74
+    m_bitmapCache = bitmapCache;
75
+}
76
+
77
+bool RdpOptions::metaKeys() const
78
+{
79
+    return m_metaKeys;
80
+}
81
+
82
+void RdpOptions::setMetaKeys(bool metaKeys)
83
+{
84
+    m_metaKeys = metaKeys;
85
+}
86
+
87
+bool RdpOptions::useShell() const
88
+{
89
+    return m_useShell;
90
+}
91
+
92
+void RdpOptions::setUseShell(bool useShell)
93
+{
94
+    m_useShell = useShell;
95
+}
96
+
97
+QString RdpOptions::shell() const
98
+{
99
+    return m_shell;
100
+}
101
+
102
+void RdpOptions::setShell(const QString &shell)
103
+{
104
+    m_shell = shell;
105
+}
106
+QString RdpOptions::shellWorkingDir() const
107
+{
108
+    return m_shellWorkingDir;
109
+}
110
+
111
+void RdpOptions::setShellWorkingDir(const QString &shellWorkingDir)
112
+{
113
+    m_shellWorkingDir = shellWorkingDir;
114
+}
115
+
116
+RdpOptions::Colors RdpOptions::colors() const
117
+{
118
+    return m_colors;
119
+}
120
+
121
+void RdpOptions::setColors(const Colors &colors)
122
+{
123
+    m_colors = colors;
124
+}
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+

+ 93
- 0
rdpoptions.h Datei anzeigen

1
+#ifndef RDPOPTIONS_H
2
+#define RDPOPTIONS_H
3
+
4
+#include <QString>
5
+#include <QSize>
6
+
7
+class RdpOptions
8
+{
9
+public:
10
+    RdpOptions();
11
+
12
+    enum Colors
13
+    {
14
+        HighColor_15 = 15,
15
+        HighColor_16 = 16,
16
+        TrueColor = 24,
17
+        HighestQuality = 32
18
+    };
19
+
20
+    enum Experience
21
+    {
22
+        Modem,
23
+        LowSpeed,
24
+        Satellite,
25
+        HighSpeed,
26
+        WAN,
27
+        LAN,
28
+        Detect
29
+    };
30
+
31
+    QString host() const;
32
+    void setHost(const QString &host);
33
+
34
+    QString username() const;
35
+    void setUsername(const QString &username);
36
+
37
+    QString password() const;
38
+    void setPassword(const QString &password);
39
+
40
+    QSize resolution() const;
41
+    void setResolution(const QSize &resolution);
42
+
43
+    bool fullescreen() const;
44
+    void setFullescreen(bool fullescreen);
45
+
46
+    Experience experience() const;
47
+    void setExperience(const Experience &experience);
48
+
49
+    bool bitmapCache() const;
50
+    void setBitmapCache(bool bitmapCache);
51
+
52
+    bool metaKeys() const;
53
+    void setMetaKeys(bool metaKeys);
54
+
55
+    bool useShell() const;
56
+    void setUseShell(bool useShell);
57
+
58
+    QString shell() const;
59
+    void setShell(const QString &shell);
60
+
61
+    QString shellWorkingDir() const;
62
+    void setShellWorkingDir(const QString &shellWorkingDir);
63
+
64
+    Colors colors() const;
65
+    void setColors(const Colors &colors);
66
+
67
+private:
68
+    QString m_host;
69
+
70
+    QString m_username;
71
+
72
+    QString m_password;
73
+
74
+    QSize m_resolution;
75
+
76
+    bool m_fullescreen;
77
+
78
+    Experience m_experience;
79
+
80
+    bool m_bitmapCache;
81
+
82
+    bool m_metaKeys;
83
+
84
+    bool m_useShell;
85
+
86
+    QString m_shell;
87
+
88
+    QString m_shellWorkingDir;
89
+
90
+    Colors m_colors;
91
+};
92
+
93
+#endif // RDPOPTIONS_H

Laden…
Abbrechen
Speichern