You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.4 KiB
118 lines
3.4 KiB
8 years ago
|
%Module QTermWidget
|
||
|
|
||
7 years ago
|
%ModuleHeaderCode
|
||
|
#pragma GCC visibility push(default)
|
||
|
%End
|
||
8 years ago
|
|
||
|
%Import QtGui/QtGuimod.sip
|
||
|
%Import QtCore/QtCoremod.sip
|
||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||
|
|
||
|
class QTermWidget : QWidget {
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include <../lib/qtermwidget.h>
|
||
|
%End
|
||
|
|
||
|
public:
|
||
|
enum ScrollBarPosition
|
||
|
{
|
||
|
NoScrollBar=0,
|
||
|
ScrollBarLeft=1,
|
||
|
ScrollBarRight=2
|
||
|
};
|
||
|
|
||
7 years ago
|
enum class KeyboardCursorShape
|
||
7 years ago
|
{
|
||
|
BlockCursor=0,
|
||
|
UnderlineCursor=1,
|
||
|
IBeamCursor=2
|
||
|
};
|
||
|
|
||
8 years ago
|
QTermWidget(int startnow = 1, QWidget *parent = 0);
|
||
|
~QTermWidget();
|
||
7 years ago
|
void startTerminalTeletype();
|
||
8 years ago
|
QSize sizeHint() const;
|
||
7 years ago
|
void setTerminalSizeHint(bool on);
|
||
|
bool terminalSizeHint();
|
||
8 years ago
|
void startShellProgram();
|
||
|
int getShellPID();
|
||
|
void changeDir(const QString & dir);
|
||
|
void setTerminalFont(QFont &font);
|
||
|
QFont getTerminalFont();
|
||
|
void setTerminalOpacity(qreal level);
|
||
|
void setEnvironment(const QStringList & environment);
|
||
|
void setShellProgram(const QString & progname);
|
||
|
void setWorkingDirectory(const QString & dir);
|
||
|
QString workingDirectory();
|
||
7 years ago
|
void setArgs(QStringList & args);
|
||
8 years ago
|
void setTextCodec(QTextCodec *codec);
|
||
|
void setColorScheme(const QString & name);
|
||
|
static QStringList availableColorSchemes();
|
||
7 years ago
|
static void addCustomColorSchemeDir(const QString& custom_dir);
|
||
8 years ago
|
void setHistorySize(int lines);
|
||
|
void setScrollBarPosition(ScrollBarPosition);
|
||
|
void scrollToEnd();
|
||
|
void sendText(QString &text);
|
||
|
void setFlowControlEnabled(bool enabled);
|
||
|
bool flowControlEnabled();
|
||
|
void setFlowControlWarningEnabled(bool enabled);
|
||
|
static QStringList availableKeyBindings();
|
||
|
QString keyBindings();
|
||
|
void setMotionAfterPasting(int);
|
||
|
int historyLinesCount();
|
||
|
int screenColumnsCount();
|
||
|
void setSelectionStart(int row, int column);
|
||
|
void setSelectionEnd(int row, int column);
|
||
|
void getSelectionStart(int& row, int& column);
|
||
|
void getSelectionEnd(int& row, int& column);
|
||
|
QString selectedText(bool preserveLineBreaks = true);
|
||
|
void setMonitorActivity(bool);
|
||
|
void setMonitorSilence(bool);
|
||
|
void setSilenceTimeout(int seconds);
|
||
7 years ago
|
int getPtySlaveFd() const;
|
||
|
void setKeyboardCursorShape(KeyboardCursorShape shape);
|
||
|
void setAutoClose(bool);
|
||
|
QString title() const;
|
||
|
QString icon() const;
|
||
8 years ago
|
signals:
|
||
|
void finished();
|
||
|
void copyAvailable(bool);
|
||
|
void termGetFocus();
|
||
|
void termLostFocus();
|
||
|
void termKeyPressed(QKeyEvent *);
|
||
7 years ago
|
void urlActivated(const QUrl&, bool fromContextMenu);
|
||
8 years ago
|
void bell(const QString& message);
|
||
|
void activity();
|
||
|
void silence();
|
||
7 years ago
|
void sendData(const char *,int);
|
||
|
void titleChanged();
|
||
|
void receivedData(const QString &text);
|
||
|
void profileChanged(const QString & profile);
|
||
8 years ago
|
public slots:
|
||
|
void copyClipboard();
|
||
|
void pasteClipboard();
|
||
|
void pasteSelection();
|
||
|
void zoomIn();
|
||
|
void zoomOut();
|
||
7 years ago
|
void setSize(const QSize &);
|
||
8 years ago
|
void setKeyBindings(const QString & kb);
|
||
|
void clear();
|
||
|
void toggleShowSearchBar();
|
||
|
protected:
|
||
7 years ago
|
virtual void resizeEvent(QResizeEvent *);
|
||
|
protected slots:
|
||
|
void sessionFinished();
|
||
|
void selectionChanged(bool textSelected);
|
||
8 years ago
|
private:
|
||
7 years ago
|
void search(bool forwards, bool next);
|
||
|
void setZoom(int step);
|
||
|
void init(int startnow);
|
||
|
private slots:
|
||
|
void find();
|
||
|
void findNext();
|
||
|
void findPrevious();
|
||
|
void matchFound(int startColumn, int startLine, int endColumn, int endLine);
|
||
|
void noMatchFound();
|
||
8 years ago
|
};
|