summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/konsole.h
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h
index 819ea5d..40003d4 100644
--- a/core/apps/embeddedkonsole/konsole.h
+++ b/core/apps/embeddedkonsole/konsole.h
@@ -1,125 +1,131 @@
1/* ----------------------------------------------------------------------- */ 1/* ----------------------------------------------------------------------- */
2/* */ 2/* */
3/* [konsole.h] Konsole */ 3/* [konsole.h] Konsole */
4/* */ 4/* */
5/* -------------------------------------------------------------------------- */ 5/* -------------------------------------------------------------------------- */
6/* */ 6/* */
7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ 7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
8/* */ 8/* */
9/* This file is part of Konsole, an X terminal. */ 9/* This file is part of Konsole, an X terminal. */
10/* */ 10/* */
11/* The material contained in here more or less directly orginates from */ 11/* The material contained in here more or less directly orginates from */
12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ 12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */
13/* */ 13/* */
14/* -------------------------------------------------------------------------- */ 14/* -------------------------------------------------------------------------- */
15 /* */ 15/* */
16/* Ported Konsole to Qt/Embedded */ 16/* Ported Konsole to Qt/Embedded */
17 /* */ 17/* */
18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
19 /* */ 19/* */
20/* -------------------------------------------------------------------------- */ 20/* -------------------------------------------------------------------------- */
21 21
22#ifndef KONSOLE_H 22#ifndef KONSOLE_H
23#define KONSOLE_H 23#define KONSOLE_H
24 24
25 25
26#include <qmainwindow.h> 26#include <qmainwindow.h>
27#include <qaction.h> 27#include <qaction.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qstrlist.h> 29#include <qstrlist.h>
30#include <qintdict.h> 30#include <qintdict.h>
31#include <qptrdict.h> 31#include <qptrdict.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qpe/qpetoolbar.h>
34#include <qcombobox.h>
33 35
34#include "MyPty.h" 36#include "MyPty.h"
35#include "TEWidget.h" 37#include "TEWidget.h"
36#include "TEmuVt102.h" 38#include "TEmuVt102.h"
37#include "session.h" 39#include "session.h"
38 40
39class EKNumTabWidget; 41class EKNumTabWidget;
40 42
41class Konsole : public QMainWindow 43class Konsole : public QMainWindow
42{ 44{
43Q_OBJECT 45Q_OBJECT
44 46
45public: 47public:
46 48
47 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 49 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
48 Konsole(const char * name, const char* pgm, QStrList & _args, int histon); 50 Konsole(const char * name, const char* pgm, QStrList & _args, int histon);
49 ~Konsole(); 51 ~Konsole();
50 void setColLin(int columns, int lines); 52 void setColLin(int columns, int lines);
51 53 QPEToolBar *secondToolBar;
52 void show(); 54 void show();
53 55 void setColor();
56 int lastSelectedMenu;
54private slots: 57private slots:
55 void doneSession(TESession*,int); 58 void doneSession(TESession*,int);
56 void changeColumns(int); 59 void changeColumns(int);
57 void fontChanged(int); 60 void fontChanged(int);
61 void configMenuSelected(int );
62 void colorMenuSelected(int);
58 void enterCommand(int); 63 void enterCommand(int);
59 void hitEnter(); 64 void hitEnter();
60 void hitSpace(); 65 void hitSpace();
61 void hitTab(); 66 void hitTab();
62 void hitPaste(); 67 void hitPaste();
63 void hitUp(); 68 void hitUp();
64 void hitDown(); 69 void hitDown();
65 void switchSession(QWidget *); 70 void switchSession(QWidget *);
66 void newSession(); 71 void newSession();
72 void changeCommand(const QString &, int);
67 73
68private: 74private:
69 void init(const char* _pgm, QStrList & _args); 75 void init(const char* _pgm, QStrList & _args);
70 void initSession(const char* _pgm, QStrList & _args); 76 void initSession(const char* _pgm, QStrList & _args);
71 void runSession(TESession* s); 77 void runSession(TESession* s);
72 void setColorPixmaps(); 78 void setColorPixmaps();
73 void setHistory(bool); 79 void setHistory(bool);
74 QSize calcSize(int columns, int lines); 80 QSize calcSize(int columns, int lines);
75 TEWidget* getTe(); 81 TEWidget* getTe();
76 82
77private: 83private:
78 class VTFont 84 class VTFont
79 { 85 {
80 public: 86 public:
81 VTFont(QString name, QFont& font) 87 VTFont(QString name, QFont& font)
82 { 88 {
83 this->name = name; 89 this->name = name;
84 this->font = font; 90 this->font = font;
85 } 91 }
86 92
87 QFont& getFont() 93 QFont& getFont()
88 { 94 {
89 return font; 95 return font;
90 } 96 }
91 97
92 QString getName() 98 QString getName()
93 { 99 {
94 return name; 100 return name;
95 } 101 }
96 102
97 private: 103 private:
98 QString name; 104 QString name;
99 QFont font; 105 QFont font;
100 }; 106 };
101 107
102 EKNumTabWidget* tab; 108 EKNumTabWidget* tab;
103 int nsessions; 109 int nsessions;
104 QList<VTFont> fonts; 110 QList<VTFont> fonts;
105 int cfont; 111 int cfont;
106 QCString se_pgm; 112 QCString se_pgm;
107 QStrList se_args; 113 QStrList se_args;
108 114
109 QPopupMenu* fontList; 115 QPopupMenu* fontList,*configMenu,*colorMenu;
110 116 QComboBox *commonCombo;
111 // history scrolling I think 117 // history scrolling I think
112 bool b_scroll; 118 bool b_scroll;
113 119
114 int n_keytab; 120 int n_keytab;
115 int n_scroll; 121 int n_scroll;
116 int n_render; 122 int n_render;
117 QString pmPath; // pixmap path 123 QString pmPath; // pixmap path
118 QString dropText; 124 QString dropText;
119 QFont defaultFont; 125 QFont defaultFont;
120 QSize defaultSize; 126 QSize defaultSize;
121 127
122}; 128};
123 129
124#endif 130#endif
125 131