34 #include <QApplication>
35 #include <QtCore/QByteRef>
36 #include <QtCore/QDir>
37 #include <QtCore/QFile>
38 #include <QtCore/QRegExp>
39 #include <QtCore/QStringList>
48 , _monitorActivity(false)
49 , _monitorSilence(false)
50 , _notifiedActivity(false)
55 , _fullScripting(false)
56 , _hasDarkBackground(false)
75 this, SLOT(
onReceiveBlock(
const char*,
int)), Qt::BlockingQueuedConnection);
78 ,
this,SLOT(
sendData(
const char*,
int)));
113 Q_ASSERT( !
_views.contains(widget) );
120 connect( widget , SIGNAL(keyPressedSignal(QKeyEvent*)) ,
_emulation ,
121 SLOT(sendKeyEvent(QKeyEvent*)) );
122 connect( widget , SIGNAL(mouseSignal(
int,
int,
int,
int)) ,
_emulation ,
123 SLOT(sendMouseEvent(
int,
int,
int,
int)) );
124 connect( widget , SIGNAL(sendStringToEmu(
const char*)) ,
_emulation ,
125 SLOT(sendString(
const char*)) );
129 connect(
_emulation , SIGNAL(programUsesMouseChanged(
bool)) , widget ,
130 SLOT(setUsesMouse(
bool)) );
138 QObject::connect( widget ,SIGNAL(changedContentSizeSignal(
int,
int)),
this,
141 QObject::connect( widget ,SIGNAL(destroyed(
QObject*)) ,
this ,
151 Q_ASSERT(
_views.contains(display) );
166 disconnect(widget,0,
this,0);
183 if (
_views.count() == 0 )
255 setSize( QSize(lines,columns) );
260 QListIterator<TerminalView*> viewIter(
_views);
268 const int VIEW_LINES_THRESHOLD = 2;
269 const int VIEW_COLUMNS_THRESHOLD = 2;
272 while ( viewIter.hasNext() )
275 if ( view->isHidden() ==
false &&
276 view->
lines() >= VIEW_LINES_THRESHOLD &&
277 view->
columns() >= VIEW_COLUMNS_THRESHOLD )
279 minLines = (minLines == -1) ? view->
lines() : qMin( minLines , view->
lines() );
280 minColumns = (minColumns == -1) ? view->
columns() : qMin( minColumns , view->
columns() );
285 if ( minLines > 0 && minColumns > 0 )
410 if ((size.width() <= 1) || (size.height() <= 1))