1 // Baulk - qtermwidget Reimplement - BaulkTerm
3 // Baulk - Copyright (C) 2008 - Jacob Alexander
5 // Baulk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // any later version, including version 3 of the License.
10 // Baulk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include <QCloseEvent>
27 #include <QMainWindow>
28 #include <QResizeEvent>
30 #include <QVBoxLayout>
33 #include <baulkwidget.h>
34 #include <baulkwindow.h>
36 #include <qtermwidget.h>
38 #include "terminalcolour.h"
41 * @author Jacob Alexander (HaaTa)
43 * Additional functionality for qtermwidget
45 class BaulkTerm
: public BaulkWidget
{
49 BaulkTerm( int startNow
= 1, QWidget
*parent
= 0 );
53 virtual bool processCommandArgs();
56 void startShellProgram();
59 bool useDaemon() const { return daemonEnabled
; }
60 QString
listenName() const { return daemonListenName
; }
70 QTermWidget
*mainTerm
;
71 QList
<QTermWidget
*> termList
;
73 QVBoxLayout
*termLayout
;
77 // Configuration Settings
82 QString daemonListenName
;
92 QStringList environmentVariables
;
95 TerminalColour foreground
;
96 TerminalColour background
;
100 TerminalColour yellow
;
102 TerminalColour magenta
;
104 TerminalColour white
;
107 TerminalColour intForeground
;
108 TerminalColour intBackground
;
109 TerminalColour intBlack
;
110 TerminalColour intRed
;
111 TerminalColour intGreen
;
112 TerminalColour intYellow
;
113 TerminalColour intBlue
;
114 TerminalColour intMagenta
;
115 TerminalColour intCyan
;
116 TerminalColour intWhite
;
119 // Configuration Functions
120 void configurationDefaults();
121 void configurationLoad();
122 void configurationSave();
123 void configurationSet();
129 void xMouseInput( int, int, int, int );
130 void rightClickAction();
132 void updateWindowTitle();
134 void removeTerminalFromList( QTermWidget
*terminal
= 0 );
135 void removeTerminalViaUserClose();
138 virtual void changeEvent( QEvent
*event
);
139 virtual void resizeEvent( QResizeEvent
*event
);
140 virtual void closeEvent( QCloseEvent
*event
);
144 void removedTerminal();