summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/konsole.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index d10b66d..46c0203 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -15,24 +15,28 @@
15/* ---------------------------------------------------------------------- */ 15/* ---------------------------------------------------------------------- */
16/* */ 16/* */
17/* Ported Konsole to Qt/Embedded */ 17/* Ported Konsole to Qt/Embedded */
18/* */ 18/* */
19/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 19/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
20/* */ 20/* */
21/* -------------------------------------------------------------------------- */ 21/* -------------------------------------------------------------------------- */
22// enhancements added by L.J. Potter <ljp@llornkcor.com> 22// enhancements added by L.J. Potter <ljp@llornkcor.com>
23//#define QT_QWS_OPIE 23//#define QT_QWS_OPIE
24 24
25#include <stdlib.h> 25#include <stdlib.h>
26 26
27#ifdef QT_QWS_OPIE
28#include <opie2/ocolorpopupmenu.h>
29#endif
30
27#include <qpe/resource.h> 31#include <qpe/resource.h>
28 32
29#include <qdir.h> 33#include <qdir.h>
30#include <qevent.h> 34#include <qevent.h>
31#include <qdragobject.h> 35#include <qdragobject.h>
32#include <qobjectlist.h> 36#include <qobjectlist.h>
33#include <qtoolbutton.h> 37#include <qtoolbutton.h>
34#include <qtoolbar.h> 38#include <qtoolbar.h>
35#include <qpushbutton.h> 39#include <qpushbutton.h>
36#include <qfontdialog.h> 40#include <qfontdialog.h>
37#include <qglobal.h> 41#include <qglobal.h>
38#include <qpainter.h> 42#include <qpainter.h>
@@ -54,28 +58,24 @@
54#include <qlayout.h> 58#include <qlayout.h>
55#include <qvbox.h> 59#include <qvbox.h>
56 60
57#include <sys/wait.h> 61#include <sys/wait.h>
58#include <stdio.h> 62#include <stdio.h>
59#include <stdlib.h> 63#include <stdlib.h>
60#include <assert.h> 64#include <assert.h>
61 65
62#include "konsole.h" 66#include "konsole.h"
63#include "keytrans.h" 67#include "keytrans.h"
64#include "commandeditdialog.h" 68#include "commandeditdialog.h"
65 69
66#ifdef QT_QWS_OPIE
67#include <opie/colorpopupmenu.h>
68#endif
69
70class EKNumTabBar : public QTabBar 70class EKNumTabBar : public QTabBar
71{ 71{
72public: 72public:
73 EKNumTabBar(QWidget *parent = 0, const char *name = 0) : 73 EKNumTabBar(QWidget *parent = 0, const char *name = 0) :
74 QTabBar(parent, name) 74 QTabBar(parent, name)
75 {} 75 {}
76 76
77 // QList<QTab> *getTabList() { return(tabList()); } 77 // QList<QTab> *getTabList() { return(tabList()); }
78 78
79 void numberTabs() 79 void numberTabs()
80 { 80 {
81 // Yes, it really is this messy. QTabWidget needs functions 81 // Yes, it really is this messy. QTabWidget needs functions
@@ -1518,25 +1518,25 @@ void Konsole::colorMenuSelected(int iD)
1518 {// Black, Gold 1518 {// Black, Gold
1519 background.setRgb(0x00,0x00,0x00); 1519 background.setRgb(0x00,0x00,0x00);
1520 foreground.setRgb(255,215,105); 1520 foreground.setRgb(255,215,105);
1521 colorMenu->setItemChecked(cm_ab,TRUE); 1521 colorMenu->setItemChecked(cm_ab,TRUE);
1522 } 1522 }
1523#ifdef QT_QWS_OPIE 1523#ifdef QT_QWS_OPIE
1524 if(iD==-19) 1524 if(iD==-19)
1525 { 1525 {
1526 // Custom 1526 // Custom
1527 qDebug("do custom"); 1527 qDebug("do custom");
1528 if(fromMenu) 1528 if(fromMenu)
1529 { 1529 {
1530 OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, this, "foreground color"); 1530 Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, this, "foreground color");
1531 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, 1531 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this,
1532 SLOT(changeForegroundColor(const QColor&))); 1532 SLOT(changeForegroundColor(const QColor&)));
1533 penColorPopupMenu->exec(); 1533 penColorPopupMenu->exec();
1534 } 1534 }
1535 if(!fromMenu) 1535 if(!fromMenu)
1536 { 1536 {
1537 foreground.setNamedColor(cfg.readEntry("foreground","")); 1537 foreground.setNamedColor(cfg.readEntry("foreground",""));
1538 background.setNamedColor(cfg.readEntry("background","")); 1538 background.setNamedColor(cfg.readEntry("background",""));
1539 } 1539 }
1540 fromMenu=FALSE; 1540 fromMenu=FALSE;
1541 colorMenu->setItemChecked(-19,TRUE); 1541 colorMenu->setItemChecked(-19,TRUE);
1542 } 1542 }
@@ -1869,25 +1869,25 @@ void Konsole::changeForegroundColor(const QColor &color)
1869 cfg.setGroup("Colors"); 1869 cfg.setGroup("Colors");
1870 int r, g, b; 1870 int r, g, b;
1871 color.rgb(&r,&g,&b); 1871 color.rgb(&r,&g,&b);
1872 foreground.setRgb(r,g,b); 1872 foreground.setRgb(r,g,b);
1873 1873
1874 cfg.writeEntry("foreground",color.name()); 1874 cfg.writeEntry("foreground",color.name());
1875 qDebug("foreground "+color.name()); 1875 qDebug("foreground "+color.name());
1876 cfg.write(); 1876 cfg.write();
1877 1877
1878 qDebug("do other dialog"); 1878 qDebug("do other dialog");
1879#ifdef QT_QWS_OPIE 1879#ifdef QT_QWS_OPIE
1880 1880
1881 OColorPopupMenu* penColorPopupMenu2 = new OColorPopupMenu(Qt::black, this,"background color"); 1881 Opie::OColorPopupMenu* penColorPopupMenu2 = new Opie::OColorPopupMenu(Qt::black, this,"background color");
1882 connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, 1882 connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this,
1883 SLOT(changeBackgroundColor(const QColor&))); 1883 SLOT(changeBackgroundColor(const QColor&)));
1884 penColorPopupMenu2->exec(); 1884 penColorPopupMenu2->exec();
1885#endif 1885#endif
1886} 1886}
1887 1887
1888void Konsole::changeBackgroundColor(const QColor &color) 1888void Konsole::changeBackgroundColor(const QColor &color)
1889{ 1889{
1890 1890
1891 qDebug("Change background"); 1891 qDebug("Change background");
1892 Config cfg("Qkonsole"); 1892 Config cfg("Qkonsole");
1893 cfg.setGroup("Colors"); 1893 cfg.setGroup("Colors");