Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
a14e0a69
Commit
a14e0a69
authored
Mar 15, 2007
by
Robert Knight
Browse files
Rename terminal display widget class from TEWidget to TerminalDisplay
svn path=/branches/work/konsole-split-view/; revision=642967
parent
d41a3087
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
konsole/CMakeLists.txt
View file @
a14e0a69
...
...
@@ -37,7 +37,7 @@ endif(KONSOLE_GENERATE_LINEFONT)
# konsole.cpp
# schema.cpp
# TESession.cpp
# T
EWidget
.cpp
# T
erminalDisplay
.cpp
# TEmuVt102.cpp
# TEScreen.cpp
# TEmulation.cpp
...
...
@@ -73,7 +73,7 @@ set(konsole_KDEINIT_SRCS
TEPty.cpp
TEScreen.cpp
TESession.cpp
T
EWidget
.cpp
T
erminalDisplay
.cpp
TEmuVt102.cpp
TEmulation.cpp
TerminalCharacterDecoder.cpp
...
...
@@ -120,7 +120,7 @@ set(konsolepart_PART_SRCS
schema.cpp
TESession.cpp
ZModemDialog.cpp
T
EWidget
.cpp
T
erminalDisplay
.cpp
TEmuVt102.cpp
TEScreen.cpp
konsole_wcwidth.cpp
...
...
konsole/ScreenWindow.h
View file @
a14e0a69
...
...
@@ -27,7 +27,7 @@ class TEScreen;
/**
* Provides a window onto a section of a terminal screen.
* This window can then be rendered by a terminal display widget ( T
EWidget
).
* This window can then be rendered by a terminal display widget ( T
erminalDisplay
).
*
* To use the screen window, create a new ScreenWindow() instance and associated it with
* a terminal screen using setScreen().
...
...
konsole/SessionController.cpp
View file @
a14e0a69
...
...
@@ -14,7 +14,7 @@
#include
"HistorySizeDialog.h"
#include
"IncrementalSearchBar.h"
#include
"TESession.h"
#include
"T
EWidget
.h"
#include
"T
erminalDisplay
.h"
#include
"SessionController.h"
#include
"ProcessInfo.h"
...
...
@@ -34,7 +34,7 @@ KIcon SessionController::_activityIcon;
KIcon
SessionController
::
_silenceIcon
;
QPointer
<
SearchHistoryThread
>
SearchHistoryTask
::
_thread
;
SessionController
::
SessionController
(
TESession
*
session
,
T
EWidget
*
view
,
QObject
*
parent
)
SessionController
::
SessionController
(
TESession
*
session
,
T
erminalDisplay
*
view
,
QObject
*
parent
)
:
ViewProperties
(
parent
)
,
KXMLGUIClient
()
,
_session
(
session
)
...
...
konsole/SessionController.h
View file @
a14e0a69
...
...
@@ -19,7 +19,7 @@ class QAction;
class
KToggleAction
;
class
KUrl
;
class
TESession
;
class
T
EWidget
;
class
T
erminalDisplay
;
class
IncrementalSearchBar
;
class
UrlFilter
;
class
RegExpFilter
;
...
...
@@ -54,7 +54,7 @@ public:
/**
* Constructs a new SessionController which operates on @p session and @p view.
*/
SessionController
(
TESession
*
session
,
T
EWidget
*
view
,
QObject
*
parent
);
SessionController
(
TESession
*
session
,
T
erminalDisplay
*
view
,
QObject
*
parent
);
~
SessionController
();
/** Reimplemented to watch for events happening to the view */
...
...
@@ -63,7 +63,7 @@ public:
/** Returns the session associated with this controller */
TESession
*
session
()
{
return
_session
;
}
/** Returns the view associated with this controller */
T
EWidget
*
view
()
{
return
_view
;
}
T
erminalDisplay
*
view
()
{
return
_view
;
}
/**
* Sets the widget used for searches through the session's history.
...
...
@@ -130,7 +130,7 @@ private:
private:
TESession
*
_session
;
T
EWidget
*
_view
;
T
erminalDisplay
*
_view
;
KIcon
_sessionIcon
;
QString
_sessionIconName
;
int
_previousState
;
...
...
konsole/SessionManager.h
View file @
a14e0a69
...
...
@@ -235,7 +235,7 @@ public:
* Creates a new session of the specified type, using the settings specified
* using addSetting() and from the configuration file for this session type.
*
* The new session has no views associated with it. A new T
EWidget
view
* The new session has no views associated with it. A new T
erminalDisplay
view
* must be created in order to display the output from the terminal session and
* send keyboard or mouse input to it.
*
...
...
konsole/TECommon.h
View file @
a14e0a69
...
...
@@ -19,7 +19,7 @@
*/
/*! \file TECommon.h
\brief Definitions shared between TEScreen and T
EWidget
.
\brief Definitions shared between TEScreen and T
erminalDisplay
.
*/
#ifndef TECOMMON_H
...
...
@@ -66,7 +66,7 @@ struct ColorEntry
#define DEFAULT_BACK_COLOR 1
//a standard set of colors using black text on a white background.
//defined in T
EWidget
.characterpp
//defined in T
erminalDisplay
.characterpp
static
const
ColorEntry
base_color_table
[
TABLE_COLORS
]
=
// The following are almost IBM standard color codes, with some slight
...
...
konsole/TEScreen.cpp
View file @
a14e0a69
...
...
@@ -463,9 +463,9 @@ void TEScreen::setDefaultMargins()
/*
Clarifying rendition here and in T
EWidget
.
Clarifying rendition here and in T
erminalDisplay
.
currently, T
EWidget
's color table is
currently, T
erminalDisplay
's color table is
0 1 2 .. 9 10 .. 17
dft_fg, dft_bg, dim 0..7, intensive 0..7
...
...
@@ -474,7 +474,7 @@ void TEScreen::setDefaultMargins()
- 1..8 = ansi specified color
re_fg, re_bg contain values 0..17
due to the T
EWidget
's color table
due to the T
erminalDisplay
's color table
rendition attributes are
...
...
@@ -507,7 +507,7 @@ void TEScreen::effectiveRendition()
//copy "current rendition" straight into "effective rendition", which is then later copied directly
//into the image[] array which holds the characters and their appearance properties.
//- The old version below filtered out all attributes other than underline and blink at this stage,
//so that they would not be copied into the image[] array and hence would not be visible by T
EWidget
//so that they would not be copied into the image[] array and hence would not be visible by T
erminalDisplay
//which actually paints the screen using the information from the image[] array.
//I don't know why it did this, but I'm fairly sure it was the wrong thing to do. The net result
//was that bold text wasn't printed in bold by Konsole.
...
...
konsole/TEScreen.h
View file @
a14e0a69
...
...
@@ -52,7 +52,7 @@ class TerminalCharacterDecoder;
The terminal emulation ( TEmulation ) receives a serial stream of
characters from the program currently running in the terminal.
From this stream it creates an image of characters which is ultimately
rendered by the display widget ( T
EWidget
). Some types of emulation
rendered by the display widget ( T
erminalDisplay
). Some types of emulation
may have more than one screen image.
getCookedImage() is used to retrieve the currently visible image
...
...
konsole/TESession.cpp
View file @
a14e0a69
...
...
@@ -142,7 +142,7 @@ void TESession::setArguments(const QStringList& arguments)
*/
#if 0
TESession::TESession(T
EWidget
* _te, const QString &_pgm, const QStringList & _args, const QString &_term, ulong _winId, const QString &_sessionId, const QString &_initial_cwd)
TESession::TESession(T
erminalDisplay
* _te, const QString &_pgm, const QStringList & _args, const QString &_term, ulong _winId, const QString &_sessionId, const QString &_initial_cwd)
: TESession()
, _program(_pgm)
, _arguments(_args)
...
...
@@ -211,12 +211,12 @@ void TESession::ptyError()
emit
done
(
this
);
}
QList
<
T
EWidget
*>
TESession
::
views
()
const
QList
<
T
erminalDisplay
*>
TESession
::
views
()
const
{
return
_views
;
}
void
TESession
::
addView
(
T
EWidget
*
widget
)
void
TESession
::
addView
(
T
erminalDisplay
*
widget
)
{
Q_ASSERT
(
!
_views
.
contains
(
widget
)
);
...
...
@@ -257,14 +257,14 @@ void TESession::addView(TEWidget* widget)
void
TESession
::
viewDestroyed
(
QObject
*
view
)
{
T
EWidget
*
display
=
(
TEWidget
*
)
view
;
T
erminalDisplay
*
display
=
(
TerminalDisplay
*
)
view
;
Q_ASSERT
(
_views
.
contains
(
display
)
);
removeView
(
display
);
}
void
TESession
::
removeView
(
T
EWidget
*
widget
)
void
TESession
::
removeView
(
T
erminalDisplay
*
widget
)
{
_views
.
removeAll
(
widget
);
...
...
@@ -283,7 +283,7 @@ void TESession::removeView(TEWidget* widget)
}
}
/*void TESession::changeWidget(T
EWidget
* w)
/*void TESession::changeWidget(T
erminalDisplay
* w)
{
Q_ASSERT(0); //Method not updated yet to handle multiple views
}*/
...
...
@@ -436,7 +436,7 @@ void TESession::setUserTitle( int what, const QString &caption )
if
(
backColor
!=
modifiedBackground
)
{
modifiedBackground
=
backColor
;
QListIterator
<
T
EWidget
*>
viewIter
(
_views
);
QListIterator
<
T
erminalDisplay
*>
viewIter
(
_views
);
while
(
viewIter
.
hasNext
())
viewIter
.
next
()
->
setDefaultBackColor
(
backColor
);
}
...
...
@@ -460,7 +460,7 @@ void TESession::setUserTitle( int what, const QString &caption )
if
(
_iconName
!=
caption
)
{
_iconName
=
caption
;
QListIterator
<
T
EWidget
*
>
viewIter
(
_views
);
QListIterator
<
T
erminalDisplay
*
>
viewIter
(
_views
);
while
(
viewIter
.
hasNext
())
viewIter
.
next
()
->
update
();
modified
=
true
;
...
...
@@ -544,7 +544,7 @@ void TESession::onContentSizeChange(int /*height*/, int /*width*/)
void
TESession
::
updateTerminalSize
()
{
QListIterator
<
T
EWidget
*>
viewIter
(
_views
);
QListIterator
<
T
erminalDisplay
*>
viewIter
(
_views
);
int
minLines
=
-
1
;
int
minColumns
=
-
1
;
...
...
@@ -552,7 +552,7 @@ void TESession::updateTerminalSize()
//select largest number of lines and columns that will fit in all visible views
while
(
viewIter
.
hasNext
()
)
{
T
EWidget
*
view
=
viewIter
.
next
();
T
erminalDisplay
*
view
=
viewIter
.
next
();
if
(
view
->
isHidden
()
==
false
)
{
minLines
=
(
minLines
==
-
1
)
?
view
->
Lines
()
:
qMin
(
minLines
,
view
->
Lines
()
);
...
...
@@ -613,7 +613,7 @@ TESession::~TESession()
delete
_shellProcess
;
delete
zmodemProc
;
QListIterator
<
T
EWidget
*>
viewIter
(
_views
);
QListIterator
<
T
erminalDisplay
*>
viewIter
(
_views
);
while
(
viewIter
.
hasNext
())
viewIter
.
next
()
->
deleteLater
();
}
...
...
@@ -1024,7 +1024,7 @@ void TESession::setSchema(ColorSchema* schema)
_colorScheme
=
schema
;
//update color scheme for attached views
QListIterator
<
T
EWidget
*>
viewIter
(
_views
);
QListIterator
<
T
erminalDisplay
*>
viewIter
(
_views
);
while
(
viewIter
.
hasNext
())
{
viewIter
.
next
()
->
setColorTable
(
schema
->
table
());
...
...
konsole/TESession.h
View file @
a14e0a69
...
...
@@ -31,7 +31,7 @@
// Konsole
#include
"TEPty.h"
#include
"T
EWidget
.h"
#include
"T
erminalDisplay
.h"
#include
"TEmuVt102.h"
...
...
@@ -79,19 +79,19 @@ public:
* When the TESession instance is destroyed, any views which are still attached will also
* be deleted.
*/
void
addView
(
T
EWidget
*
widget
);
void
addView
(
T
erminalDisplay
*
widget
);
/**
* Removes a view from this session.
*
* @p widget will no longer display output from or send input
* to the terminal
*/
void
removeView
(
T
EWidget
*
widget
);
void
removeView
(
T
erminalDisplay
*
widget
);
/**
* Returns the views connected to this session
*/
QList
<
T
EWidget
*>
views
()
const
;
QList
<
T
erminalDisplay
*>
views
()
const
;
/**
* Returns true if the session has created child processes which have not yet terminated
...
...
@@ -275,7 +275,7 @@ private:
TEPty
*
_shellProcess
;
TEmulation
*
_emulation
;
QList
<
T
EWidget
*>
_views
;
QList
<
T
erminalDisplay
*>
_views
;
bool
connected
;
bool
monitorActivity
;
...
...
konsole/TEmuVt102.cpp
View file @
a14e0a69
...
...
@@ -22,7 +22,7 @@
\brief Actual Emulation for Konsole
\sa T
EWidget
\sa TEScreen
\sa T
erminalDisplay
\sa TEScreen
*/
#include
"config-konsole.h"
...
...
@@ -96,7 +96,7 @@ TEmuVt102::TEmuVt102() : TEmulation()
}
#if 0
void TEmuVt102::setReceiveViewInput(T
EWidget
* view , bool enable)
void TEmuVt102::setReceiveViewInput(T
erminalDisplay
* view , bool enable)
{
if (enable)
{
...
...
@@ -116,13 +116,13 @@ void TEmuVt102::setReceiveViewInput(TEWidget* view , bool enable)
#endif
#if 0
void TEmuVt102::addView(T
EWidget
* view)
void TEmuVt102::addView(T
erminalDisplay
* view)
{
TEmulation::addView(view);
setReceiveViewInput(view,true);
}
void TEmuVt102::removeView(T
EWidget
* view)
void TEmuVt102::removeView(T
erminalDisplay
* view)
{
TEmulation::removeView(view);
setReceiveViewInput(view,false);
...
...
@@ -1094,7 +1094,7 @@ void TEmuVt102::onKeyPress( QKeyEvent* ev )
in the pipeline. It only applies to tokens, which represent
plain characters.
This conversion it eventually continued in T
EWidget
.C, since
This conversion it eventually continued in T
erminalDisplay
.C, since
it might involve VT100 enhanced fonts, which have these
particular glyphs allocated in (0x00-0x1f) in their code page.
*/
...
...
@@ -1290,7 +1290,7 @@ bool TEmuVt102::getMode(int m)
{
TEmulation::setConnect(c);
QListIterator< T
EWidget
* > viewIter(_views);
QListIterator< T
erminalDisplay
* > viewIter(_views);
while (viewIter.hasNext())
{
...
...
@@ -1314,7 +1314,7 @@ bool TEmuVt102::getMode(int m)
scrolllock_set_off();
#endif
QListIterator< T
EWidget
* > viewIter2(_views);
QListIterator< T
erminalDisplay
* > viewIter2(_views);
while (viewIter2.hasNext())
{
...
...
konsole/TEmuVt102.h
View file @
a14e0a69
...
...
@@ -30,7 +30,7 @@
#include
<QTimer>
// Konsole
#include
"T
EWidget
.h"
#include
"T
erminalDisplay
.h"
#include
"TEScreen.h"
#include
"TEmulation.h"
...
...
@@ -165,7 +165,7 @@ private:
//(including xterm-style mouse input for example)
//
//See also - TEmulation::connectView()
//void setReceiveViewInput( T
EWidget
* view , bool enable );
//void setReceiveViewInput( T
erminalDisplay
* view , bool enable );
void
resetToken
();
#define MAXPBUF 80
...
...
konsole/TEmulation.cpp
View file @
a14e0a69
...
...
@@ -22,21 +22,21 @@
/*! \class TEmulation
\brief Mediator between T
EWidget
and TEScreen.
\brief Mediator between T
erminalDisplay
and TEScreen.
This class is responsible to scan the escapes sequences of the terminal
emulation and to map it to their corresponding semantic complements.
Thus this module knows mainly about decoding escapes sequences and
is a stateless device w.rendition.t. the semantics.
It is also responsible to refresh the T
EWidget
by certain rules.
It is also responsible to refresh the T
erminalDisplay
by certain rules.
\sa T
EWidget
\sa TEScreen
\sa T
erminalDisplay
\sa TEScreen
\par A note on refreshing
Although the modifications to the current screen image could immediately
be propagated via `T
EWidget
' to the graphical surface, we have chosen
be propagated via `T
erminalDisplay
' to the graphical surface, we have chosen
another way here.
The reason for doing so is twofold.
...
...
@@ -386,7 +386,7 @@ void TEmulation::setSelection(const bool preserve_line_breaks) {
QString t = currentScreen->selectedText(preserve_line_breaks);
if (!t.isNull())
{
QListIterator< T
EWidget
* > viewIter(_views);
QListIterator< T
erminalDisplay
* > viewIter(_views);
while (viewIter.hasNext())
viewIter.next()->setSelection(t);
...
...
@@ -563,7 +563,7 @@ void TEmulation::setListenToKeyPress(bool l)
// ---------------------------------------------------------------------------
/*! triggered by image size change of the T
EWidget
`gui'.
/*! triggered by image size change of the T
erminalDisplay
`gui'.
This event is simply propagated to the attached screens
and to the related serial line.
...
...
konsole/TEmulation.h
View file @
a14e0a69
...
...
@@ -34,7 +34,7 @@
// Konsole
#include
"KeyTrans.h"
#include
"TEScreen.h"
#include
"T
EWidget
.h"
#include
"T
erminalDisplay
.h"
class
ScreenWindow
;
...
...
@@ -45,7 +45,7 @@ enum { NOTIFYNORMAL=0, NOTIFYBELL=1, NOTIFYACTIVITY=2, NOTIFYSILENCE=3 };
*
* The back-end is responsible for decoding the incoming character stream from the terminal
* program and producing an output image of characters which it then sends to connected
* views by calling their T
EWidget
::setImage() method.
* views by calling their T
erminalDisplay
::setImage() method.
*
* The emulation also is also responsible for converting input from the connected views such
* as keypresses and mouse activity into a character string which can be sent
...
...
@@ -66,7 +66,7 @@ public:
/**
* Creates a new window onto the output from this emulation. The contents
* of the window are then rendered by views which are set to use this window using the
* T
EWidget
::setScreenWindow() method.
* T
erminalDisplay
::setScreenWindow() method.
*/
ScreenWindow
*
createWindow
();
...
...
@@ -125,7 +125,7 @@ public:
*/
virtual
bool
findTextNext
(
const
QString
&
str
,
bool
forward
,
bool
caseSensitive
,
bool
regExp
);
public
Q_SLOTS
:
// signals incoming from T
EWidget
public
Q_SLOTS
:
// signals incoming from T
erminalDisplay
/** Change the size of the emulation's image */
virtual
void
onImageSizeChange
(
int
lines
,
int
columns
);
...
...
@@ -163,7 +163,7 @@ public Q_SLOTS: // signals incoming from TEWidget
//virtual void onSelectionBegin(const int x, const int y, const bool columnmode);
/** Extend the current selection to column @p x, row @p y. */
//virtual void onSelectionExtend(const int x, const int y);
/** Calls the T
EWidget
::setSelection() method of each associated view with the currently selected text */
/** Calls the T
erminalDisplay
::setSelection() method of each associated view with the currently selected text */
//virtual void setSelection(const bool preserve_line_breaks);
virtual
void
isBusySelecting
(
bool
busy
);
...
...
konsole/T
EWidget
.cpp
→
konsole/T
erminalDisplay
.cpp
View file @
a14e0a69
This diff is collapsed.
Click to expand it.
konsole/T
EWidget
.h
→
konsole/T
erminalDisplay
.h
View file @
a14e0a69
...
...
@@ -69,19 +69,19 @@ class ScreenWindow;
* A widget which displays output from a terminal emulation and sends input keypresses and mouse activity
* to the terminal.
*
* T
EWidget
does not know anything about the terminal emulation whoose output it is displaying.
* T
erminalDisplay
does not know anything about the terminal emulation whoose output it is displaying.
*
* When the terminal emulation receives new output from the program running in the terminal,
* it will update the display by calling setImage().
*/
class
T
EWidget
:
public
QFrame
class
T
erminalDisplay
:
public
QFrame
{
Q_OBJECT
public:
T
EWidget
(
QWidget
*
parent
=
0
);
virtual
~
T
EWidget
();
T
erminalDisplay
(
QWidget
*
parent
=
0
);
virtual
~
T
erminalDisplay
();
void
setBlendColor
(
const
QRgb
color
)
{
blend_color
=
color
;
}
...
...
@@ -259,7 +259,7 @@ Q_SIGNALS:
void
changedFontMetricSignal
(
int
height
,
int
width
);
void
changedContentSizeSignal
(
int
height
,
int
width
);
void
changedHistoryCursor
(
int
value
);
void
configureRequest
(
T
EWidget
*
,
int
state
,
int
x
,
int
y
);
void
configureRequest
(
T
erminalDisplay
*
,
int
state
,
int
x
,
int
y
);
void
isBusySelecting
(
bool
);
void
sendStringToEmu
(
const
char
*
);
...
...
konsole/ViewManager.cpp
View file @
a14e0a69
...
...
@@ -30,7 +30,7 @@
#include
"KonsoleBookmarkHandler.h"
#include
"KonsoleMainWindow.h"
#include
"TESession.h"
#include
"T
EWidget
.h"
#include
"T
erminalDisplay
.h"
#include
"schema.h"
#include
"SessionController.h"
#include
"SessionManager.h"
...
...
@@ -94,7 +94,7 @@ void ViewManager::detachActiveView()
{
// find the currently active view and remove it from its container
ViewContainer
*
container
=
_viewSplitter
->
activeContainer
();
T
EWidget
*
activeView
=
dynamic_cast
<
T
EWidget
*>
(
container
->
activeView
());
T
erminalDisplay
*
activeView
=
dynamic_cast
<
T
erminalDisplay
*>
(
container
->
activeView
());
if
(
!
activeView
)
return
;
...
...
@@ -125,9 +125,9 @@ void ViewManager::detachActiveView()
void
ViewManager
::
sessionFinished
(
TESession
*
session
)
{
QList
<
T
EWidget
*>
children
=
_viewSplitter
->
findChildren
<
T
EWidget
*>
();
QList
<
T
erminalDisplay
*>
children
=
_viewSplitter
->
findChildren
<
T
erminalDisplay
*>
();
foreach
(
T
EWidget
*
view
,
children
)
foreach
(
T
erminalDisplay
*
view
,
children
)
{
if
(
_sessionMap
[
view
]
==
session
)
{
...
...
@@ -230,8 +230,8 @@ void ViewManager::splitView(bool splitView)
while
(
existingViewIter
.
hasNext
())
{
TESession
*
session
=
_sessionMap
[(
T
EWidget
*
)
existingViewIter
.
next
()];
T
EWidget
*
display
=
createTerminalDisplay
();
TESession
*
session
=
_sessionMap
[(
T
erminalDisplay
*
)
existingViewIter
.
next
()];
T
erminalDisplay
*
display
=
createTerminalDisplay
();
loadViewSettings
(
display
,
session
);
ViewProperties
*
properties
=
createController
(
session
,
display
);
...
...
@@ -259,7 +259,7 @@ void ViewManager::splitView(bool splitView)
_viewSplitter
->
activeContainer
()
->
activeView
()
->
setFocus
(
Qt
::
OtherFocusReason
);
}
SessionController
*
ViewManager
::
createController
(
TESession
*
session
,
T
EWidget
*
view
)
SessionController
*
ViewManager
::
createController
(
TESession
*
session
,
T
erminalDisplay
*
view
)
{
// create a new controller for the session, and ensure that this view manager
// is notified when the view gains the focus
...
...
@@ -290,7 +290,7 @@ void ViewManager::createView(TESession* session)
while
(
containerIter
.
hasNext
()
)
{
ViewContainer
*
container
=
containerIter
.
next
();
T
EWidget
*
display
=
createTerminalDisplay
();
T
erminalDisplay
*
display
=
createTerminalDisplay
();
loadViewSettings
(
display
,
session
);
ViewProperties
*
properties
=
createController
(
session
,
display
);
...
...
@@ -336,7 +336,7 @@ void ViewManager::viewCloseRequest(QWidget* view)
// 1. detach view from session
// 2. if the session has no views left, close it
T
EWidget
*
display
=
(
TEWidget
*
)
view
;
T
erminalDisplay
*
display
=
(
TerminalDisplay
*
)
view
;
TESession
*
session
=
_sessionMap
[
display
];
if
(
session
)
{
...
...
@@ -368,7 +368,7 @@ void ViewManager::merge(ViewManager* otherManager)
while
(
otherViewIter
.
hasNext
()
)
{
T
EWidget
*
view
=
dynamic_cast
<
T
EWidget
*>
(
otherViewIter
.
next
());
T
erminalDisplay
*
view
=
dynamic_cast
<
T
erminalDisplay
*>
(
otherViewIter
.
next
());
assert
(
view
);
...
...
@@ -378,7 +378,7 @@ void ViewManager::merge(ViewManager* otherManager)
void
ViewManager
::
takeView
(
ViewManager
*
otherManager
,
ViewContainer
*
otherContainer
,
ViewContainer
*
newContainer
,
T
EWidget
*
view
)
ViewContainer
*
newContainer
,
T
erminalDisplay
*
view
)
{
// FIXME - the controller associated with the display which is being moved
// may have signals which are connected to otherManager. they need
...
...
@@ -393,9 +393,9 @@ void ViewManager::takeView(ViewManager* otherManager , ViewContainer* otherConta
otherManager
->
_sessionMap
.
remove
(
view
);
}
T
EWidget
*
ViewManager
::
createTerminalDisplay
()
T
erminalDisplay
*
ViewManager
::
createTerminalDisplay
()
{
T
EWidget
*
display
=
new
T
EWidget
(
0
);
T
erminalDisplay
*
display
=
new
T
erminalDisplay
(
0
);
//TODO Temporary settings used here
display
->
setBellMode
(
0
);
...
...
@@ -404,12 +404,12 @@ TEWidget* ViewManager::createTerminalDisplay()
display
->
setCutToBeginningOfLine
(
true
);
display
->
setTerminalSizeStartup
(
false
);
display
->
setSize
(
80
,
40
);
display
->
setScrollbarLocation
(
T
EWidget
::
SCROLLBAR_RIGHT
);
display
->
setScrollbarLocation
(
T
erminalDisplay
::
SCROLLBAR_RIGHT
);
return
display
;
}
void
ViewManager
::
loadViewSettings
(
T
EWidget
*
view
,
TESession
*
session
)
void
ViewManager
::
loadViewSettings
(
T
erminalDisplay
*
view
,
TESession
*
session
)
{
// load colour scheme
view
->
setColorTable
(
session
->
schema
()
->
table
()
);
...
...
konsole/ViewManager.h
View file @
a14e0a69
...
...
@@ -29,7 +29,7 @@ class KToggleAction;
class
KonsoleMainWindow
;
class
TESession
;
class
T
EWidget
;
class
T
erminalDisplay
;
class
SessionController
;
class
ViewProperties
;
...
...
@@ -114,31 +114,31 @@ private slots:
private:
void
setupActions
();
void
focusActiveView
();
void
registerView
(
T
EWidget
*
view
);
void
unregisterView
(
T
EWidget
*
view
);
void
registerView
(
T
erminalDisplay
*
view
);
void
unregisterView
(
T
erminalDisplay
*
view
);
// takes a view from a view container owned by a different manager and places it in
// newContainer owned by this manager
void
takeView
(
ViewManager
*
otherManager
,
ViewContainer
*
otherContainer
,
ViewContainer
*
newContainer
,
T
EWidget
*
view
);
void
takeView
(
ViewManager
*
otherManager
,
ViewContainer
*
otherContainer
,
ViewContainer
*
newContainer
,
T
erminalDisplay
*
view
);
// creates a new container which can hold terminal displays
ViewContainer
*
createContainer
();
// creates a new terminal display
T
EWidget
*
createTerminalDisplay
();
T
erminalDisplay
*
createTerminalDisplay
();
// applies the view-specific settings such as colour scheme associated
// with 'session' to 'view'