Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2d2094bf authored by Tomas Mecir's avatar Tomas Mecir

The app now starts and some dialogs look correct. The main output doesn't show.

parent b04b351e
......@@ -92,7 +92,7 @@ dlgConnect::dlgConnect(QWidget *parent) : QDialog (parent)
layout->addWidget (vb, 0, 1);
layout->addWidget (chkSendNothing, 2, 0);
layout->addWidget (chkOffline, 3, 0);
layout->addWidget (buttons, 4, 0, 2, 1);
layout->addWidget (buttons, 4, 0, 1, 2);
//connect signals
connect (addButton, SIGNAL(clicked()), this, SLOT(addPressed()));
......
......@@ -3,7 +3,7 @@
#define PACKAGE "KMuddy"
#define VERSION "1.1pre"
#define VERSION "1.2pre"
#endif // KMUDDY_VERSION_H
......@@ -182,6 +182,11 @@ QColor cConsole::defaultBkColor () {
return d->bgcolor;
}
void cConsole::setScrollTextVisible (bool vis)
{
d->scrollText->setVisible (vis);
}
void cConsole::setScrollTextSize (int aconsize)
{
// TODO
......
......@@ -62,6 +62,8 @@ public:
/** return current number of columns */
int curCols();
/** Is the scroll text visible? */
void setScrollTextVisible (bool vis);
/** Size of the secondary console shown while scrolling */
void setScrollTextSize (int aconsize);
......
......@@ -56,8 +56,8 @@ cOutput::cOutput (int sess, QWidget *parent) : cActionBase ("output", sess)
SLOT (promptCommand (const QString &)));
//and connect() slider so that aconsole is shown/hidden as needed
connect (verticalScrollBar (), SIGNAL (sliderMoved (int)), con, SLOT (sliderChanged (int)));
connect (verticalScrollBar (), SIGNAL (valueChanged (int)), con, SLOT (sliderChanged (int)));
connect (verticalScrollBar (), SIGNAL (sliderMoved (int)), this, SLOT (sliderChanged (int)));
connect (verticalScrollBar (), SIGNAL (valueChanged (int)), this, SLOT (sliderChanged (int)));
// react on events
addEventHandler ("display-line", 20, PT_TEXTCHUNK);
......@@ -132,6 +132,13 @@ void cOutput::dimensionsChanged (int x, int y)
invokeEvent ("dimensions-changed", sess(), x, y);
}
void cOutput::sliderChanged (int val)
{
int maxval = verticalScrollBar()->maximum ();
bool vis = (val < maxval);
con->setScrollTextVisible (vis);
}
void cOutput::sendCommand (const QString &command)
{
// we send the command directly, with no parsing, because these commands
......@@ -148,7 +155,6 @@ void cOutput::setDefaultBkColor (QColor color)
{
bgcolor = color;
con->setDefaultBkColor (color);
aconsole->setDefaultBkColor (color);
}
void cOutput::setEchoColor (QColor color)
......
......@@ -80,6 +80,7 @@ protected slots:
void dimensionsChanged (int x, int y);
void sendCommand (const QString &command);
void promptCommand (const QString &command);
void sliderChanged (int);
protected:
virtual void eventStringHandler (QString event, int, QString &par1, const QString &) override;
virtual void eventChunkHandler (QString event, int, cTextChunk *chunk) override;
......@@ -96,10 +97,6 @@ protected:
/** stored cConsole widget */
cConsole *con;
/** our auxiliary console */
cConsole *aconsole;
/** is the auxiliary console visible? */
bool aconvisible;
/** size of auxiliary console (in percents) */
int aconsize;
};
......
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