author | llornkcor <llornkcor> | 2002-02-03 15:33:27 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-03 15:33:27 (UTC) |
commit | b7426bf997b8201667cecb0f66470e257b35ba60 (patch) (unidiff) | |
tree | 69ac9d9afd7be78aa7e421e0ee103d4eeec5138f | |
parent | a80b4c11934b93b3d067f812a68452617f202e61 (diff) | |
download | opie-b7426bf997b8201667cecb0f66470e257b35ba60.zip opie-b7426bf997b8201667cecb0f66470e257b35ba60.tar.gz opie-b7426bf997b8201667cecb0f66470e257b35ba60.tar.bz2 |
re-introduced vert scrollbar, with position options
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 20 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 31 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.h | 4 |
3 files changed, 49 insertions, 6 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index f10bfb2..a56dc50 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -52,2 +52,3 @@ | |||
52 | #include "session.h" | 52 | #include "session.h" |
53 | #include <qpe/config.h> | ||
53 | 54 | ||
@@ -154,3 +155,3 @@ void TEWidget::setColorTable(const ColorEntry table[]) | |||
154 | for (int i = 0; i < TABLE_COLORS; i++) color_table[i] = table[i]; | 155 | for (int i = 0; i < TABLE_COLORS; i++) color_table[i] = table[i]; |
155 | 156 | ||
156 | const QPixmap* pm = backgroundPixmap(); | 157 | const QPixmap* pm = backgroundPixmap(); |
@@ -287,3 +288,16 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) | |||
287 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); | 288 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); |
288 | scrollLoc = SCRNONE; | 289 | |
290 | Config cfg("Konsole"); | ||
291 | cfg.setGroup("ScrollBar"); | ||
292 | switch( cfg.readNumEntry("Position",2)){ | ||
293 | case 0: | ||
294 | scrollLoc = SCRNONE; | ||
295 | break; | ||
296 | case 1: | ||
297 | scrollLoc = SCRLEFT; | ||
298 | break; | ||
299 | case 2: | ||
300 | scrollLoc = SCRRIGHT; | ||
301 | break; | ||
302 | }; | ||
289 | 303 | ||
@@ -653,3 +667,3 @@ void TEWidget::mousePressEvent(QMouseEvent* ev) | |||
653 | actSel = 1; // left mouse button pressed but nothing selected yet. | 667 | actSel = 1; // left mouse button pressed but nothing selected yet. |
654 | grabMouse( /*crossCursor*/ ); // handle with care! | 668 | grabMouse( /*crossCursor*/ ); // handle with care! |
655 | } | 669 | } |
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index d54fa1f..e2d4886 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -226,3 +226,4 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
226 | colorMenu = new QPopupMenu( this); | 226 | colorMenu = new QPopupMenu( this); |
227 | 227 | scrollMenu = new QPopupMenu( this); | |
228 | |||
228 | bool listHidden; | 229 | bool listHidden; |
@@ -265,2 +266,3 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
265 | connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); | 266 | connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); |
267 | connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); | ||
266 | 268 | ||
@@ -318,2 +320,7 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
318 | 320 | ||
321 | scrollMenu->insertItem("None"); | ||
322 | scrollMenu->insertItem("Left"); | ||
323 | scrollMenu->insertItem("Right"); | ||
324 | configMenu->insertItem("ScrollBar",scrollMenu); | ||
325 | |||
319 | // create applications ///////////////////////////////////////////////////// | 326 | // create applications ///////////////////////////////////////////////////// |
@@ -765 +772,23 @@ void Konsole::setColor() | |||
765 | } | 772 | } |
773 | |||
774 | void Konsole::scrollMenuSelected(int index) | ||
775 | { | ||
776 | TEWidget* te = getTe(); | ||
777 | Config cfg("Konsole"); | ||
778 | cfg.setGroup("Scrollbar"); | ||
779 | switch( index){ | ||
780 | case -21: | ||
781 | te->setScrollbarLocation(0); | ||
782 | cfg.writeEntry("Position",0); | ||
783 | break; | ||
784 | case -22: | ||
785 | te->setScrollbarLocation(1); | ||
786 | cfg.writeEntry("Position",1); | ||
787 | break; | ||
788 | case -23: | ||
789 | te->setScrollbarLocation(2); | ||
790 | cfg.writeEntry("Position",2); | ||
791 | break; | ||
792 | }; | ||
793 | |||
794 | } | ||
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h index 40003d4..b4e5d87 100644 --- a/core/apps/embeddedkonsole/konsole.h +++ b/core/apps/embeddedkonsole/konsole.h | |||
@@ -72,3 +72,3 @@ private slots: | |||
72 | void changeCommand(const QString &, int); | 72 | void changeCommand(const QString &, int); |
73 | 73 | void scrollMenuSelected(int); | |
74 | private: | 74 | private: |
@@ -114,3 +114,3 @@ private: | |||
114 | 114 | ||
115 | QPopupMenu* fontList,*configMenu,*colorMenu; | 115 | QPopupMenu* fontList,*configMenu,*colorMenu,*scrollMenu; |
116 | QComboBox *commonCombo; | 116 | QComboBox *commonCombo; |