Skip to content

Commit

Permalink
add terminal thanks kde konsole project
Browse files Browse the repository at this point in the history
  • Loading branch information
nerososft committed Jun 13, 2017
1 parent d3e519a commit b60cb9e
Show file tree
Hide file tree
Showing 70 changed files with 21,809 additions and 35 deletions.
68 changes: 65 additions & 3 deletions NIDE.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,27 @@ SOURCES += \
filehelper.cpp \
projectentity.cpp \
filemanager.cpp \
editor.cpp
editor.cpp \
terminal.cpp \
networking.cpp \
lib/BlockArray.cpp \
lib/Emulation.cpp \
lib/Filter.cpp \
lib/History.cpp \
lib/k3process.cpp \
lib/k3processcontroller.cpp \
lib/KeyboardTranslator.cpp \
lib/konsole_wcwidth.cpp \
lib/kpty.cpp \
lib/Pty.cpp \
lib/qtermwidget.cpp \
lib/Screen.cpp \
lib/ScreenWindow.cpp \
lib/Session.cpp \
lib/ShellCommand.cpp \
lib/TerminalCharacterDecoder.cpp \
lib/TerminalDisplay.cpp \
lib/Vt102Emulation.cpp

HEADERS += \
mainwindow.h \
Expand All @@ -49,7 +69,34 @@ HEADERS += \
filehelper.h \
projectentity.h \
filemanager.h \
editor.h
editor.h \
terminal.h \
networking.h \
lib/BlockArray.h \
lib/Character.h \
lib/CharacterColor.h \
lib/ColorTables.h \
lib/DefaultTranslatorText.h \
lib/Emulation.h \
lib/ExtendedDefaultTranslator.h \
lib/Filter.h \
lib/History.h \
lib/k3process.h \
lib/k3processcontroller.h \
lib/KeyboardTranslator.h \
lib/konsole_wcwidth.h \
lib/kpty.h \
lib/kpty_p.h \
lib/LineFont.h \
lib/Pty.h \
lib/qtermwidget.h \
lib/Screen.h \
lib/ScreenWindow.h \
lib/Session.h \
lib/ShellCommand.h \
lib/TerminalCharacterDecoder.h \
lib/TerminalDisplay.h \
lib/Vt102Emulation.h

FORMS += \
mainwindow.ui \
Expand All @@ -61,4 +108,19 @@ RESOURCES += \

DISTFILES += \
../nide_project/project1/project1.nproj \
../nide_project/newProject/newProject.nproj
../nide_project/newProject/newProject.nproj \
lib/LineFont.src \
lib/CVS/Entries \
lib/CVS/Repository \
lib/CVS/Root \
lib/kb-layouts/CVS/Entries \
lib/kb-layouts/CVS/Repository \
lib/kb-layouts/CVS/Root \
lib/kb-layouts/default.keytab \
lib/kb-layouts/linux.keytab \
lib/kb-layouts/vt420pc.keytab \
lib/default.keytab \
lib/README

SUBDIRS += \
lib/lib.pro
6 changes: 3 additions & 3 deletions NIDE.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.3.0, 2017-06-13T00:16:35. -->
<!-- Written by QtCreator 4.3.0, 2017-06-14T00:23:41. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -305,8 +305,8 @@
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">NIDE</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/neroyang/project/qt/NIDE/NIDE.pro</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">NIDE2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/neroyang/project/nide_dev/NIDE/NIDE.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">NIDE.pro</value>
Expand Down
2 changes: 2 additions & 0 deletions assets.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@
<file>icon/mark_2.png</file>
<file>icon/mark_3.png</file>
<file>icon/mark_4.png</file>
<file>icon/tor.png</file>
<file>icon/tor_run.png</file>
</qresource>
</RCC>
30 changes: 15 additions & 15 deletions editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,7 @@ EditorManager::EditorManager()

}

//编辑器打开新文件
void EditorManager::openFile(QString filename,QString filePath){

std::map<QString,QString>::iterator fileIterator=this->openedFIle.find(filename);
std::pair<QString, QString> newPair(filename,filePath );
if (fileIterator == this->openedFIle.end()){


this->openedFIle.insert(newPair);
qDebug()<< "编辑器打开新文件:"+filePath+filename;
}
qDebug()<<"编辑器已经打开了该文件"+filePath+filename;

this->fileIndex = newPair;
}

//编辑器关闭文件
void EditorManager::closeFile(QString filename,QString filePath){
Expand All @@ -42,12 +28,26 @@ void EditorManager::switchFile(QString filename,QString filePath){

}


//编辑器打开新文件
void EditorManager::openFile(QString filename,QString filePath){

std::map<QString,QString>::iterator fileIterator=this->openedFIle.find(filename);
std::pair<QString, QString> newPair(filename,filePath );
if (fileIterator == this->openedFIle.end()){
this->openedFIle.insert(this->openedFIle.begin(),newPair);
qDebug()<< "编辑器打开新文件:"+filePath+filename;
}
qDebug()<<"编辑器已经打开了该文件"+filePath+filename;

this->fileIndex = newPair;
}
std::vector<QString> EditorManager::getOpenedFile(){
std::map<QString,QString>::iterator fileIterator;

std::vector<QString> opened;
for(fileIterator = this->openedFIle.begin();fileIterator!=this->openedFIle.end();fileIterator++){
opened.push_back(fileIterator->first);
opened.insert(opened.begin(),fileIterator->first);
}
return opened;
}
Binary file added icon/tor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/tor_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b60cb9e

Please sign in to comment.