Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 0740e87d authored by Tomas Mecir's avatar Tomas Mecir

layouting fixes

parent 2d2094bf
......@@ -48,12 +48,13 @@
#include <klocale.h>
#include <kpushbutton.h>
#include <kstatusbar.h>
#include <khbox.h>
#include <QPushButton>
#include <QToolTip>
#include <QVBoxLayout>
cSession::cSession (int sess, QWidget *parent) :
KVBox (parent), cActionBase ("session", sess)
cSession::cSession (int sess, QWidget *parent) : QWidget (parent), cActionBase ("session", sess)
_flashing = false;
defaultName = true;
......@@ -69,7 +70,7 @@ cSession::cSession (int sess, QWidget *parent) :
_cmdqueues = new cCmdQueues (sess);
_textproc = new cTextProcessor (sess);
_connection = new cConnection (sess);
_output = new cOutput (sess, this);
KHBox *promptinput = new KHBox (this);
......@@ -100,6 +101,13 @@ cSession::cSession (int sess, QWidget *parent) :
KStatusBar *statusbar = new KStatusBar (this);
_status = new cStatus (sess, statusbar);
QVBoxLayout *layout = new QVBoxLayout (this);
layout->addWidget (_output);
layout->addWidget (promptinput);
layout->addWidget (_auxinputline);
layout->addWidget (_gaugebar);
layout->addWidget (statusbar);
_transcript = new cTranscript (sess);
_scripteval = new cScriptEval (sess);
_scriptapi = new cScriptAPI (sess);
......@@ -21,7 +21,7 @@
#include <config-mxp.h>
#include "cactionbase.h"
#include <kvbox.h>
#include <QWidget>
class cTelnet;
class cANSIParser;
......@@ -51,7 +51,7 @@ It's the widget that contains inputline, console and friends for one active conn
*@author Tomas Mecir
class cSession : public KVBox, public cActionBase {
class cSession : public QWidget, public cActionBase {
cSession (int sess, QWidget *parent=0);
......@@ -92,18 +92,19 @@ cConsole::cConsole(QWidget *parent) : QGraphicsView(parent) {
d->text->setDefaultTextOption (opt);
d->mainText = new QGraphicsTextItem;
d->scrollText = new QGraphicsTextItem;
d->scene.addItem (d->mainText);
d->scene.addItem (d->scrollText);
d->mainText->setDocument (d->text);
d->mainText->setFiltersChildEvents (true);
d->scrollText = new QGraphicsTextItem;
d->scrollText->setDocument (d->text);
d->scrollText->setParentItem (d->mainText);
d->scrollText->setFocusProxy (d->mainText);
d->scrollText->setVisible (false);
setScene (&d->scene);
d->scene.addItem (d->mainText);
d->scene.addItem (d->scrollText);
d->scene.setFocusItem (d->mainText);
//background color
......@@ -33,9 +33,9 @@ along with this program. If not, see <>.
#include <KLocalizedString>
#include <krandom.h>
cOutput::cOutput (int sess, QWidget *parent) : cActionBase ("output", sess)
cOutput::cOutput (int sess, QWidget *parent) : QScrollArea (parent), cActionBase ("output", sess)
con = new cConsole (parent);
con = new cConsole (this);
setWidget (con);
con->setSession (sess);
......@@ -43,6 +43,8 @@ cOutput::cOutput (int sess, QWidget *parent) : cActionBase ("output", sess)
systemcolor = Qt::cyan;
bgcolor = Qt::black;
setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
// enable vertical scrollbar, disable the other one
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment