From 0771e0dcf20a980ad5d631655e87e1c6870e1f80 Mon Sep 17 00:00:00 2001
From: xiaoming <2014500726@smail.xtu.edu.cn>
Date: Thu, 29 Aug 2024 11:53:17 +0800
Subject: [PATCH] clean code
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
---
docs/img/ar_SA.svg | 2 +-
docs/img/cs_CZ.svg | 2 +-
docs/img/de_DE.svg | 2 +-
docs/img/en_US.svg | 2 +-
docs/img/es_ES.svg | 2 +-
docs/img/fr_FR.svg | 2 +-
docs/img/ja_JP.svg | 2 +-
docs/img/ko_KR.svg | 2 +-
docs/img/pt_BR.svg | 2 +-
docs/img/ru_RU.svg | 2 +-
docs/img/zh_CN.svg | 2 +-
docs/img/zh_HK.svg | 2 +-
lang/quardCRT_ar_SA.ts | 836 ++++++------
lang/quardCRT_cs_CZ.ts | 836 ++++++------
lang/quardCRT_de_DE.ts | 836 ++++++------
lang/quardCRT_en_US.ts | 829 ++++++------
lang/quardCRT_es_ES.ts | 836 ++++++------
lang/quardCRT_fr_FR.ts | 836 ++++++------
lang/quardCRT_ja_JP.ts | 836 ++++++------
lang/quardCRT_ko_KR.ts | 836 ++++++------
lang/quardCRT_pt_BR.ts | 836 ++++++------
lang/quardCRT_ru_RU.ts | 836 ++++++------
lang/quardCRT_zh_CN.ts | 836 ++++++------
lang/quardCRT_zh_HK.ts | 836 ++++++------
lib/qtermwidget/BlockArray.cpp | 167 ++-
lib/qtermwidget/BlockArray.h | 107 +-
lib/qtermwidget/CharWidth.cpp | 33 +-
lib/qtermwidget/Character.h | 206 ++-
lib/qtermwidget/CharacterColor.h | 404 +++---
lib/qtermwidget/ColorScheme.cpp | 524 ++++----
lib/qtermwidget/ColorScheme.h | 46 +-
lib/qtermwidget/DefaultTranslatorText.h | 2 -
lib/qtermwidget/Emulation.cpp | 551 ++++----
lib/qtermwidget/Emulation.h | 818 ++++++-----
lib/qtermwidget/ExtendedDefaultTranslator.h | 74 -
lib/qtermwidget/Filter.cpp | 586 ++++----
lib/qtermwidget/Filter.h | 145 +-
lib/qtermwidget/History.cpp | 1265 ++++++++----------
lib/qtermwidget/History.h | 568 ++++----
lib/qtermwidget/HistorySearch.cpp | 141 +-
lib/qtermwidget/HistorySearch.h | 42 +-
lib/qtermwidget/KeyboardTranslator.cpp | 808 ++++++-----
lib/qtermwidget/KeyboardTranslator.h | 116 +-
lib/qtermwidget/LineFont.h | 21 -
lib/qtermwidget/Screen.h | 6 +-
lib/qtermwidget/ScreenWindow.cpp | 33 +-
lib/qtermwidget/ScreenWindow.h | 32 +-
lib/qtermwidget/SearchBar.cpp | 32 +-
lib/qtermwidget/SearchBar.h | 32 +-
lib/qtermwidget/TerminalCharacterDecoder.cpp | 36 +-
lib/qtermwidget/TerminalCharacterDecoder.h | 36 +-
lib/qtermwidget/TerminalDisplay.cpp | 58 +-
lib/qtermwidget/TerminalDisplay.h | 36 +-
lib/qtermwidget/Vt102Emulation.cpp | 17 +-
lib/qtermwidget/qtermwidget.cpp | 345 ++---
lib/qtermwidget/qtermwidget.h | 35 +-
lib/qtermwidget/qtermwidget.pri | 3 -
lib/qtermwidget/qtermwidget_version.h | 31 +-
lib/qtermwidget/tools.cpp | 37 +-
59 files changed, 8341 insertions(+), 9101 deletions(-)
delete mode 100644 lib/qtermwidget/DefaultTranslatorText.h
delete mode 100644 lib/qtermwidget/ExtendedDefaultTranslator.h
delete mode 100644 lib/qtermwidget/LineFont.h
diff --git a/docs/img/ar_SA.svg b/docs/img/ar_SA.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/ar_SA.svg
+++ b/docs/img/ar_SA.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/cs_CZ.svg b/docs/img/cs_CZ.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/cs_CZ.svg
+++ b/docs/img/cs_CZ.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/de_DE.svg b/docs/img/de_DE.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/de_DE.svg
+++ b/docs/img/de_DE.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/en_US.svg b/docs/img/en_US.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/en_US.svg
+++ b/docs/img/en_US.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/es_ES.svg b/docs/img/es_ES.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/es_ES.svg
+++ b/docs/img/es_ES.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/fr_FR.svg b/docs/img/fr_FR.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/fr_FR.svg
+++ b/docs/img/fr_FR.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/ja_JP.svg b/docs/img/ja_JP.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/ja_JP.svg
+++ b/docs/img/ja_JP.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/ko_KR.svg b/docs/img/ko_KR.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/ko_KR.svg
+++ b/docs/img/ko_KR.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/pt_BR.svg b/docs/img/pt_BR.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/pt_BR.svg
+++ b/docs/img/pt_BR.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/ru_RU.svg b/docs/img/ru_RU.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/ru_RU.svg
+++ b/docs/img/ru_RU.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/zh_CN.svg b/docs/img/zh_CN.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/zh_CN.svg
+++ b/docs/img/zh_CN.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/img/zh_HK.svg b/docs/img/zh_HK.svg
index 5fb85acf..93c4aaa3 100644
--- a/docs/img/zh_HK.svg
+++ b/docs/img/zh_HK.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/lang/quardCRT_ar_SA.ts b/lang/quardCRT_ar_SA.ts
index 1dac90f9..84247d3c 100644
--- a/lang/quardCRT_ar_SA.ts
+++ b/lang/quardCRT_ar_SA.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ شريط الأدوات
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ تحذير
@@ -285,7 +285,7 @@
-
+ جاهز
@@ -464,7 +464,7 @@
-
+ مساعدة
@@ -566,26 +566,27 @@
+ أدخل المضيف <Alt+R> للاتصال
-
+ قطع الاتصال بالكل
-
+ قطع الاتصال بجميع الجلسات
-
+ استنساخ الجلسة
-
+ استنساخ الجلسة الحالية <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
قفل الجلسة
-
+ سجل الجلسة
-
+ إنشاء ملف سجل للجلسة الحالية
-
+ سجل الجلسة الخام
-
+ إنشاء ملف سجل خام للجلسة الحالية
-
+ عرض Hex
-
+ إظهار/إخفاء عرض Hex للجلسة الحالية
-
+ خروج
-
+ إنهاء التطبيق
-
+ نسخ
-
+ نسخ النص المحدد إلى الحافظة <Command+C>
-
+ نسخ النص المحدد إلى الحافظة <Ctrl+Ins>
-
+ لصق
-
+ لصق نص الحافظة في الجلسة الحالية <Command+V>
-
+ لصق نص الحافظة في الجلسة الحالية <Shift+Ins>
-
+ نسخ ولصق
-
+ نسخ النص المحدد إلى الحافظة ولصقه في الجلسة الحالية
-
+ تحديد الكل
-
+ تحديد كل النص في الجلسة الحالية <Ctrl+Shift+A>
-
+ البحث...
-
+ البحث عن نص في الجلسة الحالية <Ctrl+F>
-
+ طباعة الشاشة
-
+ طباعة الشاشة الحالية
-
+ لقطة الشاشة
-
+ لقطة شاشة الشاشة الحالية <Alt+P>
-
+ تصدير الجلسة
-
+ تصدير الجلسة الحالية إلى ملف <Alt+O>
-
+ مسح السجل الراجع
-
+ مسح محتويات صفوف السجل الراجع
-
+ مسح الشاشة
-
+ مسح محتويات الشاشة الحالية
-
+ مسح الشاشة والسجل الراجع
-
+ مسح محتويات الشاشة والسجل الراجع
-
+ إعادة تعيين
-
+ إعادة تعيين محاكي الطرفية
-
+ تكبير
-
+ تكبير <Ctrl+"=">
-
+ تصغير
-
+ تصغير <Ctrl+"-">
-
-
+
+ إعادة تعيين التكبير
-
+ التخطيط
-
+ تخطيط واحد
-
+ تخطيط واحد
-
+ تخطيط عمودين
-
+ تخطيط عمودين
-
+ تخطيط ثلاثة أعمدة
-
+ تخطيط ثلاثة أعمدة
-
+ تخطيط صفين
-
+ تخطيط صفين
-
+ تخطيط ثلاثة صفوف
-
+ تخطيط ثلاثة صفوف
-
+ تخطيط الشبكة
-
+ تخطيط الشبكة
-
+ تخطيط صفين إلى اليمين
-
+ تخطيط صفين إلى اليمين
-
+ تخطيط عمودين أسفل
-
+ تخطيط عمودين أسفل
-
+ قلب التخطيط
-
+ قلب التخطيط
-
+ شريط القائمة
-
+ إظهار/إخفاء شريط القائمة <Alt+U>
-
+ إظهار/إخفاء شريط الأدوات
-
+ شريط الحالة
-
+ إظهار/إخفاء شريط الحالة
-
+ نافذة الأمر
-
+ إظهار/إخفاء نافذة الأمر
-
+ شريط الاتصال
-
+ إظهار/إخفاء شريط الاتصال
-
+ النافذة الجانبية
-
+ إظهار/إخفاء النافذة الجانبية
-
+ شفافية النوافذ
-
+ تمكين/تعطيل الشفافية ألفا
-
+ شريط التمرير العمودي
-
+ إظهار/إخفاء شريط التمرير العمودي
-
+ دائمًا في الأعلى
-
+ إظهار النافذة دائمًا في الأعلى
-
+ شاشة كاملة
-
+ التبديل بين وضع الشاشة الكاملة والوضع العادي <Alt+Enter>
-
+ خيارات الجلسة...
-
+ تكوين خيارات الجلسة
-
+ الخيارات العامة...
-
+ تكوين الخيارات العامة
-
+ خيارات الحفظ في الوقت الحقيقي
-
+ حفظ خيارات الجلسة والخيارات العامة في الوقت الحقيقي
-
+ حفظ الإعدادات الآن
-
+ حفظ تكوين الخيارات الآن
-
+ إرسال ASCII...
-
+ إرسال ملف ASCII
-
+ استقبال ASCII...
-
+ استقبال ملف ASCII
-
+ إرسال ثنائي...
-
+ إرسال ملف ثنائي
-
+ إرسال Kermit...
-
+ إرسال ملف باستخدام Kermit
-
+ استقبال Kermit...
-
+ استقبال ملف باستخدام Kermit
-
+ إرسال Xmodem...
-
+ إرسال ملف باستخدام Xmodem
-
+ استقبال Xmodem...
-
+ استقبال ملف باستخدام Xmodem
-
+ إرسال Ymodem...
-
+ إرسال ملف باستخدام Ymodem
-
+ استقبال Ymodem...
-
+ استقبال ملف باستخدام Ymodem
-
+ قائمة تحميل Zmodem...
-
+ عرض قائمة تحميل ملف Zmodem
-
+ بدء تحميل Zmodem
-
+ بدء تحميل ملف Zmodem
-
+ بدء خادم TFTP
-
+ بدء/إيقاف خادم TFTP
-
+ تشغيل...
-
+ تشغيل نصًا
-
+ إلغاء
@@ -1213,759 +1214,759 @@
تغيير اللون
-
+ إلغاء تنفيذ النص
-
+ بدء تسجيل النص
-
+ بدء تسجيل النص
-
+ إيقاف تسجيل النص...
-
+ إيقاف تسجيل النص
-
+ إلغاء تسجيل النص
-
+ إلغاء تسجيل النص
-
+ إضافة إشارة مرجعية
-
+ إضافة إشارة مرجعية
-
-
+
+ إزالة الإشارة المرجعية
-
+ إزالة إشارة مرجعية
-
-
+
+ تنظيف كل الإشارات المرجعية
-
+ تنظيف كل الإشارات المرجعية
-
+ مدير الخريطة الرئيسية
-
+ عرض محرر الخريطة الرئيسية
-
+ إنشاء مفتاح عام...
-
+ إنشاء مفتاح عام
-
+ مدير المفتاح العام
-
+ عرض مدير المفتاح العام
-
+ الأمر الداخلي
-
+ عرض نافذة الأمر الداخلي
-
+ لسان
-
+ ترتيب الجلسات في علامات التبويب
-
+ بلاطة
-
+ ترتيب الجلسات في بلاطات غير متداخلة
-
+ شلال
-
+ ترتيب الجلسات لتتداخل مع بعضها البعض
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ خفيف
-
+ التبديل إلى السمة الفاتحة
-
+ داكن
-
+ التبديل إلى السمة الداكنة
-
+ لون السمة
-
+ تعيين لون السمة، إلغاء لاستخدام الافتراضي
-
+ عرض المساعدة
-
-
+
+ مرجع اختصارات لوحة المفاتيح
-
+ عرض مرجع اختصارات لوحة المفاتيح
-
+ التحقق من التحديث
-
+ التحقق من وجود تحديثات
-
-
+
+ بيان الخصوصية
-
+ عرض بيان الخصوصية
-
-
+
+ حول
-
+ عرض مربع الحوار حول
-
+ حول Qt
-
+ عرض مربع الحوار حول Qt
-
-
+
+ حول Python
-
+ عرض مربع الحوار حول Python
-
+ مختبر
-
-
+
+ فحص SSH
-
+ عرض مربع الحوار فحص SSH
-
+ معلومات البرنامج المساعد
-
+ عرض مربع الحوار معلومات البرنامج المساعد
-
+ لم يتم العثور على بيانات البرنامج المساعد!
-
+ لم يتم العثور على إصدار واجهة برمجة التطبيقات للبرنامج المساعد!
-
+ إصدار واجهة برمجة التطبيقات للبرنامج المساعد لا يتطابق!
-
+ لم يتم العثور على قائمة البرنامج المساعد!
-
+ فشل تهيئة البرنامج المساعد!
-
+ تم حفظ PrintScreen في %1
-
+ حفظ لقطة الشاشة
-
+ ملفات الصور (*.jpg)
-
-
+
+ تم حفظ لقطة الشاشة في %1
-
+ حفظ تصدير الجلسة
-
+ ملفات النص (*.txt);;ملفات HTML (*.html)
-
+ ملفات النص (*.txt)
-
+ ملفات HTML (*.html)
-
+ تم حفظ تصدير الجلسة في %1
-
+ فشل حفظ تصدير الجلسة في %1
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ لا يمكن لجلسة البث نقل الملف!
-
+ حدد الملفات لإرسالها كـ ASCII
-
-
+
+ ملفات النص (*.txt);;كل الملفات (*)
-
+ حفظ البيانات المستلمة كـ ASCII
-
+ حدد الملفات لإرسالها كـ BINARY
-
-
-
-
-
-
+
+
+
+
+
+ كل الملفات (*)
-
+ حدد الملفات لإرسالها باستخدام Kermit
-
+ حدد الملفات لإرسالها باستخدام Xmodem
-
+ حفظ الملفات المستلمة باستخدام Xmodem
-
+ حدد الملفات لإرسالها باستخدام Ymodem
-
+ حدد الملفات لإرسالها باستخدام Zmodem
-
+ حدد ملف نصي
-
+ ملفات Python (*.py);;كل الملفات (*)
-
+ حدد دليلًا
-
+ حدد إشارة مرجعية
-
+ هل أنت متأكد من تنظيف كل الإشارات المرجعية؟
-
+ منفذ
-
+ حدد لونًا
-
+ تم تمكين الخلفية المتحركة، يرجى تمكين الرسوم المتحركة في الخيارات العامة (مزيد من موارد النظام) أو تغيير صورة الخلفية.
-
+ فشل الحصول على معلومات الجلسة.
-
+ تلنت -
-
+ تلنت
-
+ تسلسلي -
-
+ تسلسلي
-
+ خام -
-
+ خام
-
+ أنبوب الاسم -
-
+ أنبوب الاسم
-
-
+
+ الشل المحلي
-
+ الشل المحلي -
-
+ هذا البرنامج هو محاكي الطرفية الذي يوفر اتصالًا بالشل الآمن (SSH)، واتصالًا بالتلنت، واتصالًا بالمنفذ التسلسلي، ووظائف أخرى.
-
+ هذا البرنامج لا يجمع أي معلومات شخصية، ولا يرسل أي معلومات إلى الخادم.
-
+ هذا البرنامج لا يحتوي على أي رمز ضار، ولا يحتوي على أي أبواب خلفية.
-
+ هذا البرنامج هو برنامج مفتوح المصدر، يمكنك عرض الشيفرة المصدرية على موقع github.
-
+ يتم توفير هذا البرنامج كما هو، دون أي ضمان.
-
+ إذا كان لديك أي أسئلة أو اقتراحات، يرجى الاتصال بالمؤلف.
-
+ الإصدار
-
+ التزام
-
+ تاريخ
-
-
+
+ المؤلف
-
+ هل أنت متأكد من قطع الاتصال بـ"
-
+ " الجلسة؟
-
+ الموقع الإلكتروني
-
+ اختصارات عامة:
-
+ إظهار/إخفاء شريط القائمة
-
+ الاتصال بالشل المحلي
-
+ استنساخ الجلسة الحالية
-
+ تبديل واجهة المستخدم إلى وضع STD
-
+ تبديل واجهة المستخدم إلى وضع MINI
-
+ التبديل إلى الجلسة السابقة
-
+ التبديل إلى الجلسة التالية
-
+ التبديل إلى الجلسة [رقم]
-
+ الانتقال إلى بداية السطر
-
+ الانتقال إلى نهاية السطر
-
+ هناك جلسات لم يتم فتحها بعد، يرجى فتحها أولاً.
-
+ هل أنت متأكد من الخروج؟
@@ -2707,8 +2708,8 @@
-
-
+
+ تحذير
@@ -2745,7 +2746,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+ الشل المحلي الافتراضي ليس ملفًا صالحًا!
@@ -2795,7 +2796,7 @@ If you need to use another shell, please create a session through [quick-connect
نقل
-
+ مسار المكونات الإضافية للمستخدم ليس دليلًا!
@@ -2869,93 +2870,36 @@ If you need to use another shell, please create a session through [quick-connect
الأمر الداخلي
-
+ نسخ
-
+ لصق
-
+ تحديد الكل
-
+ بحث
-
+ تكبير
-
+ تصغير
-
- Session
-
-
-
- جرس في الجلسة '%1'
-
-
-
- TerminalDisplay
-
-
-
- الحجم: XXX x XXX
-
-
-
-
- الحجم: %1 x %2
-
-
-
-
- لصق نص متعدد الأسطر
-
-
-
-
- هل أنت متأكد من أنك تريد لصق هذا النص؟
-
-
-
-
- <qt>تم <a href="http://en.wikipedia.org/wiki/Flow_control">تعليق</a> الإخراج بالضغط على Ctrl+S. اضغط على <b>Ctrl+Q</b> لاستئنافه.</qt>
-
-
-
- UrlFilter
-
-
-
- اتبع الرابط (ctrl + انقر)
-
-
-
-
- اتبع المسار (ctrl + انقر)
-
-
-
- Vt102Emulation
-
-
-
- لا يتوفر مترجم لوحة المفاتيح. المعلومات اللازمة لتحويل ضغطات المفاتيح إلى أحرف لإرسالها إلى الطرفية مفقودة.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ If you need to use another shell, please create a session through [quick-connect
QObject
-
+ مخطط ألوان بدون اسم
-
+ مخطط ألوان قابل للوصول
-
+ فتح الرابط
-
+ نسخ عنوان الرابط
-
+ إرسال بريد إلكتروني إلى...
-
+ نسخ عنوان البريد الإلكتروني
-
+ فتح المسار
-
+ فتح المجلد الذي يحتوي عليه
-
+ نسخ المسار
@@ -3587,12 +3531,12 @@ If you need to use another shell, please create a session through [quick-connect
QTermWidget
-
+ خطأ في مخطط الألوان
-
+ تعذر تحميل مخطط الألوان: %1
@@ -3915,6 +3859,13 @@ If you need to use another shell, please create a session through [quick-connect
تسليط الضوء على جميع النتائج المطابقة
+
+ Session
+
+
+ جرس في الجلسة '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ If you need to use another shell, please create a session through [quick-connect
SessionsWindow
-
+ خطأ في تلنت
-
+ خطأ في تلنت:
%1.
-
-
+
+ خطأ في التسلسلي
-
+
@@ -4279,133 +4230,133 @@ If you need to use another shell, please create a session through [quick-connect
%1.
-
+ خطأ في المأخذ الخام
-
+ خطأ في المأخذ الخام:
%1.
-
+ خطأ في أنبوب الاسم
-
+ خطأ في أنبوب الاسم:
%1.
-
-
+
+ خطأ في SSH2
-
-
+
+ خطأ في SSH2:
%1.
-
-
+
+ فتح الرابط
-
-
+
+ تعذر فتح الرابط %1.
-
+ حدد الملفات لإرسالها باستخدام Zmodem
-
+ كل الملفات (*)
-
+ بدء الشل المحلي
-
+ تعذر بدء الشل المحلي:
%1.
-
+ تمت إزالة المنفذ التسلسلي %1.
-
+ حفظ السجل...
-
+ ملفات السجل (*.log)
-
+ حفظ السجل
-
-
-
+
+
+ تعذر كتابة الملف %1:
%2.
-
+ حفظ السجل الخام...
-
+ ملفات البيانات الثنائية (*.bin)
-
+ حفظ السجل الخام
-
+ فتح الجلسة
-
+ كلمة مرور خاطئة!
-
+ استقبال ملف ASCII
@@ -4662,6 +4613,34 @@ If you need to use another shell, please create a session through [quick-connect
معلومات النقل
+
+ TerminalDisplay
+
+
+
+ الحجم: XXX x XXX
+
+
+
+
+ الحجم: %1 x %2
+
+
+
+
+ لصق نص متعدد الأسطر
+
+
+
+
+ هل أنت متأكد من أنك تريد لصق هذا النص؟
+
+
+
+
+ <qt>تم <a href="http://en.wikipedia.org/wiki/Flow_control">تعليق</a> الإخراج بالضغط على Ctrl+S. اضغط على <b>Ctrl+Q</b> لاستئنافه.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ If you need to use another shell, please create a session through [quick-connect
الكتابة فوق %1 حرفًا
+
+ UrlFilter
+
+
+
+ اتبع الرابط (ctrl + انقر)
+
+
+
+
+ اتبع المسار (ctrl + انقر)
+
+
+
+ Vt102Emulation
+
+
+
+ لا يتوفر مترجم لوحة المفاتيح. المعلومات اللازمة لتحويل ضغطات المفاتيح إلى أحرف لإرسالها إلى الطرفية مفقودة.
+
+keyMapManager
diff --git a/lang/quardCRT_cs_CZ.ts b/lang/quardCRT_cs_CZ.ts
index d124b968..f7f0c64d 100644
--- a/lang/quardCRT_cs_CZ.ts
+++ b/lang/quardCRT_cs_CZ.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Nástrojová lišta
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Varování
@@ -285,7 +285,7 @@
-
+ Připraveno
@@ -464,7 +464,7 @@
-
+ Nápověda
@@ -566,26 +566,27 @@
+ Zadejte hosta <Alt+R> pro připojení
-
+ Odpojit všechny
-
+ Odpojit všechny relace
-
+ Klonovat relaci
-
+ Klonovat aktuální relaci <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Zamknout relaci
-
+ Logovat relaci
-
+ Vytvořit logovací soubor pro aktuální relaci
-
+ Raw logovací relace
-
+ Vytvořit raw logovací soubor pro aktuální relaci
-
+ Hex zobrazení
-
+ Zobrazit/Skrýt Hex zobrazení pro aktuální relaci
-
+ Ukončit
-
+ Ukončit aplikaci
-
+ Kopírovat
-
+ Kopírovat vybraný text do schránky <Command+C>
-
+ Kopírovat vybraný text do schránky <Ctrl+Ins>
-
+ Vložit
-
+ Vložit text ze schránky do aktuální relace <Command+V>
-
+ Vložit text ze schránky do aktuální relace <Shift+Ins>
-
+ Kopírovat a vložit
-
+ Kopírovat vybraný text do schránky a vložit do aktuální relace
-
+ Vybrat vše
-
+ Vybrat všechny text v aktuální relaci <Ctrl+Shift+A>
-
+ Hledat...
-
+ Hledat text v aktuální relaci <Ctrl+F>
-
+ Tisk obrazovky
-
+ Tisk aktuální obrazovky
-
+ Snímek obrazovky
-
+ Snímek obrazovky aktuální obrazovky <Alt+P>
-
+ Export relace
-
+ Exportovat aktuální relaci do souboru <Alt+O>
-
+ Vymazat posuvník
-
+ Vymazat obsah řádků posuvníku
-
+ Vymazat obrazovku
-
+ Vymazat obsah aktuální obrazovky
-
+ Vymazat obrazovku a posuvník
-
+ Vymazat obsah obrazovky a posuvníku
-
+ Resetovat
-
+ Resetovat emulátor terminálu
-
+ Přiblížit
-
+ Přiblížit <Ctrl+"=">
-
+ Oddálit
-
+ Oddálit <Ctrl+"-">
-
-
+
+ Resetovat přiblížení
-
+ Rozložení
-
+ Jednoduché rozložení
-
+ Jednoduché rozložení
-
+ Dvou sloupcové rozložení
-
+ Dvou sloupcové rozložení
-
+ Tří sloupcové rozložení
-
+ Tří sloupcové rozložení
-
+ Dvou řádkové rozložení
-
+ Dvou řádkové rozložení
-
+ Tří řádkové rozložení
-
+ Tří řádkové rozložení
-
+ Rozložení mřížky
-
+ Rozložení mřížky
-
+ Dvou řádkové pravé rozložení
-
+ Dvou řádkové pravé rozložení
-
+ Dvou sloupcové dolní rozložení
-
+ Dvou sloupcové dolní rozložení
-
+ Překlopit rozložení
-
+ Překlopit rozložení
-
+ Menu lišta
-
+ Zobrazit/Skrýt Menu lištu <Alt+U>
-
+ Zobrazit/Skrýt Nástrojovou lištu
-
+ Stavová lišta
-
+ Zobrazit/Skrýt Stavovou lištu
-
+ Okno příkazů
-
+ Zobrazit/Skrýt Okno příkazů
-
+ Připojovací lišta
-
+ Zobrazit/Skrýt Připojovací lištu
-
+ Boční okno
-
+ Zobrazit/Skrýt Boční okno
-
+ Průhlednost oken
-
+ Povolit/Zakázat alfa průhlednost
-
+ Vertikální posuvník
-
+ Zobrazit/Skrýt Vertikální posuvník
-
+ Vždy nahoře
-
+ Zobrazit okno vždy nahoře
-
+ Na celou obrazovku
-
+ Přepnout mezi režimem na celou obrazovku a normálním režimem <Alt+Enter>
-
+ Možnosti relace...
-
+ Nastavit možnosti relace
-
+ Globální možnosti...
-
+ Nastavit globální možnosti
-
+ Možnosti ukládání v reálném čase
-
+ Možnosti ukládání relace a globální možnosti v reálném čase
-
+ Uložit nastavení nyní
-
+ Uložit konfiguraci možností nyní
-
+ Odeslat ASCII...
-
+ Odeslat ASCII soubor
-
+ Přijmout ASCII...
-
+ Přijmout ASCII soubor
-
+ Odeslat binárně...
-
+ Odeslat binární soubor
-
+ Odeslat Kermit...
-
+ Odeslat soubor pomocí Kermitu
-
+ Přijmout Kermit...
-
+ Přijmout soubor pomocí Kermitu
-
+ Odeslat Xmodem...
-
+ Odeslat soubor pomocí Xmodemu
-
+ Přijmout Xmodem...
-
+ Přijmout soubor pomocí Xmodemu
-
+ Odeslat Ymodem...
-
+ Odeslat soubor pomocí Ymodemu
-
+ Přijmout Ymodem...
-
+ Přijmout soubor pomocí Ymodemu
-
+ Seznam nahrávání Zmodemu...
-
+ Zobrazit seznam nahrávání souborů Zmodemu
-
+ Spustit nahrávání Zmodemu
-
+ Spustit nahrávání souboru Zmodemu
-
+ Spustit TFTP server
-
+ Spustit/Zastavit TFTP server
-
+ Spustit...
-
+ Spustit skript
-
+ Zrušit
@@ -1213,759 +1214,759 @@
Změnit barvu
-
+ Zrušit spuštění skriptu
-
+ Začít nahrávat skript
-
+ Začít nahrávat skript
-
+ Zastavit nahrávání skriptu...
-
+ Zastavit nahrávání skriptu
-
+ Zrušit nahrávání skriptu
-
+ Zrušit nahrávání skriptu
-
+ Přidat záložku
-
+ Přidat záložku
-
-
+
+ Odstranit záložku
-
+ Odstranit záložku
-
-
+
+ Vymazat všechny záložky
-
+ Vymazat všechny záložky
-
+ Manažer klávesových zkratek
-
+ Zobrazit editor klávesových zkratek
-
+ Vytvořit veřejný klíč...
-
+ Vytvořit veřejný klíč
-
+ Manažer veřejných klíčů
-
+ Zobrazit manažer veřejných klíčů
-
+ Interní příkaz
-
+ Zobrazit okno interního příkazu
-
+ Záložka
-
+ Uspořádat relace do záložek
-
+ Dlaždice
-
+ Uspořádat relace do nestínajících se dlaždic
-
+ Kaskáda
-
+ Uspořádat relace tak, aby se překrývaly
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Lehký
-
+ Přepnout na světlé téma
-
+ Tmavý
-
+ Přepnout na tmavé téma
-
+ Barva tématu
-
+ Nastavit barvu tématu, zrušit pro použití výchozí
-
+ Zobrazit nápovědu
-
-
+
+ Reference klávesových zkratek
-
+ Zobrazit referenci klávesových zkratek
-
+ Zkontrolovat aktualizaci
-
+ Zkontrolovat aktualizace
-
-
+
+ Prohlášení o ochraně osobních údajů
-
+ Zobrazit prohlášení o ochraně osobních údajů
-
-
+
+ O programu
-
+ Zobrazit dialog O programu
-
+ O Qt
-
+ Zobrazit dialog O Qt
-
-
+
+ O Pythonu
-
+ Zobrazit dialog O Pythonu
-
+ Laboratoř
-
-
+
+ SSH skenování
-
+ Zobrazit dialog SSH skenování
-
+ Informace o pluginu
-
+ Zobrazit dialog s informacemi o pluginu
-
+ Metadata pluginu nebyla nalezena!
-
+ Verze API pluginu nebyla nalezena!
-
+ Verze API pluginu neodpovídá!
-
+ Menu pluginu nebylo nalezeno!
-
+ Spouštění pluginu se nezdařilo!
-
+ Tisk obrazovky uložen do %1
-
+ Uložit snímek obrazovky
-
+ Obrázkové soubory (*.jpg)
-
-
+
+ Snímek obrazovky uložen do %1
-
+ Uložit export relace
-
+ Textové soubory (*.txt);;HTML soubory (*.html)
-
+ Textové soubory (*.txt)
-
+ HTML soubory (*.html)
-
+ Export relace uložen do %1
-
+ Export relace se nepodařilo uložit do %1
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Relace vysílání nemůže přenášet soubory!
-
+ Vybrat soubory k odeslání jako ASCII
-
-
+
+ Textové soubory (*.txt);;Všechny soubory (*)
-
+ Uložit přijatá data jako ASCII
-
+ Vybrat soubory k odeslání jako BINÁRNÍ
-
-
-
-
-
-
+
+
+
+
+
+ Všechny soubory (*)
-
+ Vybrat soubory k odeslání pomocí Kermitu
-
+ Vybrat soubory k odeslání pomocí Xmodemu
-
+ Uložit přijaté soubory pomocí Xmodemu
-
+ Vybrat soubory k odeslání pomocí Ymodemu
-
+ Vybrat soubory k odeslání pomocí Zmodemu
-
+ Vybrat soubor skriptu
-
+ Python soubory (*.py);;Všechny soubory (*)
-
+ Vybrat adresář
-
+ Vybrat záložku
-
+ Opravdu chcete vymazat všechny záložky?
-
+ Port
-
+ Vybrat barvu
-
+ Video pozadí je povoleno, povolte animaci v globálních možnostech (více systémových prostředků) nebo změňte obrázek pozadí.
-
+ Načtení informací o relaci se nezdařilo.
-
+ Telnet -
-
+ Telnet
-
+ Sériový port -
-
+ Sériový port
-
+ Raw -
-
+ Raw
-
+ NamePipe -
-
+ NamePipe
-
-
+
+ Lokální shell
-
+ Lokální shell -
-
+ Tento software je emulátor terminálu, který poskytuje zabezpečené připojení shellu (SSH), připojení telnetu, připojení sériového portu a další funkce.
-
+ Tento software nezískává žádné osobní údaje a neodesílá žádné informace na server.
-
+ Tento software neobsahuje žádný škodlivý kód a neobsahuje žádné zadní vrátka.
-
+ Tento software je open source software, zdrojový kód můžete zobrazit na webové stránce github.
-
+ Tento software je poskytován tak, jak je, bez jakékoli záruky.
-
+ Pokud máte nějaké dotazy nebo návrhy, kontaktujte autora.
-
+ Verze
-
+ Commit
-
+ Datum
-
-
+
+ Autor
-
+ Opravdu chcete odpojit "
-
+ " relaci?
-
+ Webová stránka
-
+ Globální klávesové zkratky:
-
+ zobrazit/skrýt menu
-
+ připojit k lokálnímu shellu
-
+ klonovat aktuální relaci
-
+ přepnout UI do STD režimu
-
+ přepnout UI do MINI režimu
-
+ přepnout na předchozí relaci
-
+ přepnout na další relaci
-
+ přepnout na relaci [číslo]
-
+ Jít na začátek řádku
-
+ Jít na konec řádku
-
+ Existují relace, které ještě nebyly odemčeny, nejprve je odemkněte.
-
+ Opravdu chcete skončit?
@@ -2707,8 +2708,8 @@
-
-
+
+ Varování
@@ -2745,7 +2746,7 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
-
+ Výchozí lokální shell není platný soubor!
@@ -2795,7 +2796,7 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
Přenos
-
+ Cesta k uživatelským pluginům není adresářem!
@@ -2869,93 +2870,36 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
Vnitřní příkaz
-
+ Kopírovat
-
+ Vložit
-
+ Vybrat vše
-
+ Najít
-
+ Přiblížit
-
+ Oddálit
-
- Session
-
-
-
- Zvonek v relaci '%1'
-
-
-
- TerminalDisplay
-
-
-
- Velikost: XXX x XXX
-
-
-
-
- Velikost: %1 x %2
-
-
-
-
- Vložit víceřádkový text
-
-
-
-
- Opravdu chcete tento text vložit?
-
-
-
-
- <qt>Výstup byl <a href="http://en.wikipedia.org/wiki/Flow_control">přerušen</a> stisknutím Ctrl+S. Stiskněte <b>Ctrl+Q</b> pro obnovení.</qt>
-
-
-
- UrlFilter
-
-
-
- Následovat odkaz (ctrl + kliknutí)
-
-
-
-
- Následovat cestu (ctrl + kliknutí)
-
-
-
- Vt102Emulation
-
-
-
- Není k dispozici žádný překladač klávesnice. Chybí informace potřebné k převodu stisknutí kláves na znaky k odeslání do terminálu.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
QObject
-
+ Nepojmenovaný barevný schéma
-
+ Přístupné barevné schéma
-
+ Otevřít odkaz
-
+ Kopírovat adresu odkazu
-
+ Odeslat e-mail na...
-
+ Kopírovat e-mailovou adresu
-
+ Otevřít cestu
-
+ Otevřít obsahující složku
-
+ Kopírovat cestu
@@ -3587,12 +3531,12 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
QTermWidget
-
+ Chyba barevného schématu
-
+ Nelze načíst barevné schéma: %1
@@ -3915,6 +3859,13 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
Zvýraznit všechny shody
+
+ Session
+
+
+ Zvonek v relaci '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
SessionsWindow
-
+ Chyba Telnetu
-
+ Chyba Telnetu:
%1.
-
-
+
+ Chyba sériového portu
-
+
@@ -4279,133 +4230,133 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
%1.
-
+ Chyba Raw Socketu
-
+ Chyba Raw Socketu:
%1.
-
+ Chyba pojmenované roury
-
+ Chyba pojmenované roury:
%1.
-
-
+
+ Chyba SSH2
-
-
+
+ Chyba SSH2:
%1.
-
-
+
+ Otevřít URL
-
-
+
+ Nelze otevřít URL %1.
-
+ Vybrat soubory k odeslání pomocí Zmodemu
-
+ Všechny soubory (*)
-
+ Spustit lokální shell
-
+ Nelze spustit lokální shell:
%1.
-
+ Sériový port %1 byl odstraněn.
-
+ Uložit log...
-
+ logovací soubory (*.log)
-
+ Uložit log
-
-
-
+
+
+ Nelze zapsat soubor %1:
%2.
-
+ Uložit Raw log...
-
+ binární soubory (*.bin)
-
+ Uložit Raw log
-
+ Odemknout relaci
-
+ Špatné heslo!
-
+ Přijmout ASCII soubor
@@ -4662,6 +4613,34 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
Informace o přenosu
+
+ TerminalDisplay
+
+
+
+ Velikost: XXX x XXX
+
+
+
+
+ Velikost: %1 x %2
+
+
+
+
+ Vložit víceřádkový text
+
+
+
+
+ Opravdu chcete tento text vložit?
+
+
+
+
+ <qt>Výstup byl <a href="http://en.wikipedia.org/wiki/Flow_control">přerušen</a> stisknutím Ctrl+S. Stiskněte <b>Ctrl+Q</b> pro obnovení.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ Pokud potřebujete použít jiný shell, vytvořte prosím relaci prostřednictv
Přepsat %1 znaků
+
+ UrlFilter
+
+
+
+ Následovat odkaz (ctrl + kliknutí)
+
+
+
+
+ Následovat cestu (ctrl + kliknutí)
+
+
+
+ Vt102Emulation
+
+
+
+ Není k dispozici žádný překladač klávesnice. Chybí informace potřebné k převodu stisknutí kláves na znaky k odeslání do terminálu.
+
+keyMapManager
diff --git a/lang/quardCRT_de_DE.ts b/lang/quardCRT_de_DE.ts
index 3ca56e17..1ca0b7c1 100644
--- a/lang/quardCRT_de_DE.ts
+++ b/lang/quardCRT_de_DE.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Werkzeugleiste
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Warnung
@@ -285,7 +285,7 @@
-
+ Bereit
@@ -464,7 +464,7 @@
-
+ Hilfe
@@ -566,26 +566,27 @@
+ Geben Sie <Alt+R> ein, um eine Verbindung zum Host herzustellen
-
+ Alle trennen
-
+ Alle Sitzungen trennen
-
+ Sitzung klonen
-
+ Aktuelle Sitzung klonen <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Sitzung sperren
-
+ Sitzung protokollieren
-
+ Erstellen Sie eine Protokolldatei für die aktuelle Sitzung
-
+ Raw-Log-Sitzung
-
+ Erstellen Sie eine Raw-Protokolldatei für die aktuelle Sitzung
-
+ Hex-Ansicht
-
+ Hex-Ansicht für aktuelle Sitzung anzeigen/ausblenden
-
+ Beenden
-
+ Beenden Sie die Anwendung
-
+ Kopieren
-
+ Kopieren Sie den ausgewählten Text in die Zwischenablage <Command+C>
-
+ Kopieren Sie den ausgewählten Text in die Zwischenablage <Ctrl+Ins>
-
+ Einfügen
-
+ Fügen Sie den Zwischenablage-Text in die aktuelle Sitzung ein <Command+V>
-
+ Fügen Sie den Zwischenablage-Text in die aktuelle Sitzung ein <Shift+Ins>
-
+ Kopieren und Einfügen
-
+ Kopieren Sie den ausgewählten Text in die Zwischenablage und fügen Sie ihn in die aktuelle Sitzung ein
-
+ Alles auswählen
-
+ Wählen Sie den gesamten Text in der aktuellen Sitzung aus <Ctrl+Shift+A>
-
+ Suchen...
-
+ Suchen Sie Text in der aktuellen Sitzung <Ctrl+F>
-
+ Bildschirm drucken
-
+ Aktuellen Bildschirm drucken
-
+ Bildschirmfoto
-
+ Aktuellen Bildschirmfoto <Alt+P>
-
+ Sitzung exportieren
-
+ Aktuelle Sitzung in eine Datei exportieren <Alt+O>
-
+ Scrollback löschen
-
+ Löschen Sie den Inhalt der Scrollback-Reihen aus
-
+ Bildschirm löschen
-
+ Löschen Sie den Inhalt des aktuellen Bildschirms
-
+ Bildschirm und Scrollback löschen
-
+ Löschen Sie den Inhalt des Bildschirms und des Scrollback
-
+ Zurücksetzen
-
+ Terminal-Emulator zurücksetzen
-
+ Vergrößern
-
+ Vergrößern <Ctrl+"=">
-
+ Verkleinern
-
+ Verkleinern <Ctrl+"-">
-
-
+
+ Zoom zurücksetzen
-
+ Layout
-
+ Einzelnes Layout
-
+ Einzelnes Layout
-
+ Zwei Spalten Layout
-
+ Zwei Spalten Layout
-
+ Drei Spalten Layout
-
+ Drei Spalten Layout
-
+ Zwei Reihen Layout
-
+ Zwei Reihen Layout
-
+ Drei Reihen Layout
-
+ Drei Reihen Layout
-
+ Rasterlayout
-
+ Rasterlayout
-
+ Zwei Reihen rechts Layout
-
+ Zwei Reihen rechts Layout
-
+ Zwei Spalten unten Layout
-
+ Zwei Spalten unten Layout
-
+ Layout umdrehen
-
+ Layout umdrehen
-
+ Menüleiste
-
+ Menüleiste anzeigen/ausblenden <Alt+U>
-
+ Werkzeugleiste anzeigen/ausblenden
-
+ Statusleiste
-
+ Statusleiste anzeigen/ausblenden
-
+ Befehlsfenster
-
+ Befehlsfenster anzeigen/ausblenden
-
+ Verbindungsleiste
-
+ Verbindungsleiste anzeigen/ausblenden
-
+ Seitenfenster
-
+ Seitenfenster anzeigen/ausblenden
-
+ Windows-Transparenz
-
+ Alpha-Transparenz aktivieren/deaktivieren
-
+ Vertikale Bildlaufleiste
-
+ Vertikale Bildlaufleiste anzeigen/ausblenden
-
+ Immer im Vordergrund
-
+ Fenster immer im Vordergrund anzeigen
-
+ Vollbildmodus
-
+ Wechseln Sie zwischen Vollbild- und Normalmodus <Alt+Enter>
-
+ Sitzungsoptionen...
-
+ Sitzungsoptionen konfigurieren
-
+ Globale Optionen...
-
+ Globale Optionen konfigurieren
-
+ Optionen in Echtzeit speichern
-
+ Sitzungsoptionen und globale Optionen in Echtzeit speichern
-
+ Einstellungen jetzt speichern
-
+ Speichern Sie die Optionenkonfiguration jetzt
-
+ ASCII senden...
-
+ ASCII-Datei senden
-
+ ASCII empfangen...
-
+ ASCII-Datei empfangen
-
+ Binär senden...
-
+ Binärdatei senden
-
+ Kermit senden...
-
+ Senden Sie eine Datei mit Kermit
-
+ Kermit empfangen...
-
+ Empfangen Sie eine Datei mit Kermit
-
+ Xmodem senden...
-
+ Senden Sie eine Datei mit Xmodem
-
+ Xmodem empfangen...
-
+ Empfangen Sie eine Datei mit Xmodem
-
+ Ymodem senden...
-
+ Senden Sie eine Datei mit Ymodem
-
+ Ymodem empfangen...
-
+ Empfangen Sie eine Datei mit Ymodem
-
+ Zmodem-Upload-Liste...
-
+ Zmodem-Datei-Upload-Liste anzeigen
-
+ Zmodem-Upload starten
-
+ Zmodem-Datei-Upload starten
-
+ TFTP-Server starten
-
+ Starten/Stoppen Sie den TFTP-Server
-
+ Ausführen...
-
+ Führen Sie ein Skript aus
-
+ Abbrechen
@@ -1213,759 +1214,759 @@
Farbe ändern
-
+ Skriptausführung abbrechen
-
+ Skriptaufzeichnung starten
-
+ Starten Sie die Skriptaufzeichnung
-
+ Skriptaufzeichnung beenden...
-
+ Beenden Sie die Skriptaufzeichnung
-
+ Skriptaufzeichnung abbrechen
-
+ Skriptaufzeichnung abbrechen
-
+ Lesezeichen hinzufügen
-
+ Fügen Sie ein Lesezeichen hinzu
-
-
+
+ Lesezeichen entfernen
-
+ Entfernen Sie ein Lesezeichen
-
-
+
+ Alle Lesezeichen löschen
-
+ Löschen Sie alle Lesezeichen
-
+ Tastaturbelegungs-Manager
-
+ Tastaturbelegungs-Editor anzeigen
-
+ Öffentlichen Schlüssel erstellen...
-
+ Erstellen Sie einen öffentlichen Schlüssel
-
+ Öffentlicher Schlüssel-Manager
-
+ Öffentlichen Schlüssel-Manager anzeigen
-
+ Interner Befehl
-
+ Interner Befehlsfenster anzeigen
-
+ Tab
-
+ Ordnen Sie Sitzungen in Tabs an
-
+ Fliese
-
+ Ordnen Sie Sitzungen in nicht überlappenden Kacheln an
-
+ Kaskade
-
+ Ordnen Sie Sitzungen so an, dass sie sich überlappen
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Leicht
-
+ Wechseln Sie zum hellen Thema
-
+ Dunkel
-
+ Wechseln Sie zum dunklen Thema
-
+ Themenfarbe
-
+ Themenfarbe festlegen, Abbrechen, um die Standardeinstellung zu verwenden
-
+ Hilfe anzeigen
-
-
+
+ Tastaturkürzel-Referenz
-
+ Tastaturkürzel-Referenz anzeigen
-
+ Update überprüfen
-
+ Suche nach Updates
-
-
+
+ Datenschutzerklärung
-
+ Datenschutzerklärung anzeigen
-
-
+
+ Über
-
+ Über Dialog anzeigen
-
+ Über Qt
-
+ Über Qt-Dialog anzeigen
-
-
+
+ Über Python
-
+ Über Python-Dialog anzeigen
-
+ Labor
-
-
+
+ SSH-Scannen
-
+ SSH-Scannen-Dialog anzeigen
-
+ Plugin-Info
-
+ Plugin-Informationen anzeigen
-
+ Plugin-Metadaten nicht gefunden!
-
+ Plugin-API-Version nicht gefunden!
-
+ Plugin-API-Version stimmt nicht überein!
-
+ Plugin-Menü nicht gefunden!
-
+ Plugin-Initialisierung fehlgeschlagen!
-
+ PrintScreen gespeichert unter %1
-
+ Bildschirmfoto speichern
-
+ Bilddateien (*.jpg)
-
-
+
+ Bildschirmfoto gespeichert unter %1
-
+ Sitzungsexport speichern
-
+ Textdateien (*.txt);;HTML-Dateien (*.html)
-
+ Textdateien (*.txt)
-
+ HTML-Dateien (*.html)
-
+ Sitzungsexport gespeichert unter %1
-
+ Sitzungsexport konnte nicht unter %1 gespeichert werden
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Die Broadcast-Sitzung kann keine Datei übertragen!
-
+ Wählen Sie Dateien aus, die als ASCII gesendet werden sollen
-
-
+
+ Textdateien (*.txt);;Alle Dateien (*)
-
+ Empfangene Daten als ASCII speichern
-
+ Wählen Sie Dateien aus, die als BINÄR gesendet werden sollen
-
-
-
-
-
-
+
+
+
+
+
+ Alle Dateien (*)
-
+ Wählen Sie Dateien aus, die mit Kermit gesendet werden sollen
-
+ Wählen Sie Dateien aus, die mit Xmodem gesendet werden sollen
-
+ Empfangene Dateien mit Xmodem speichern
-
+ Wählen Sie Dateien aus, die mit Ymodem gesendet werden sollen
-
+ Wählen Sie Dateien aus, die mit Zmodem gesendet werden sollen
-
+ Wählen Sie eine Skriptdatei aus
-
+ Python-Dateien (*.py);;Alle Dateien (*)
-
+ Wählen Sie ein Verzeichnis aus
-
+ Wählen Sie ein Lesezeichen aus
-
+ Möchten Sie wirklich alle Lesezeichen löschen?
-
+ Port
-
+ Farbe auswählen
-
+ Das Videohintergrund ist aktiviert. Aktivieren Sie die Animation in den globalen Optionen (mehr Systemressourcen) oder ändern Sie das Hintergrundbild.
-
+ Sitzungsinformationen konnten nicht abgerufen werden.
-
+ Telnet -
-
+ Telnet
-
+ Seriell -
-
+ Seriell
-
+ Raw -
-
+ Raw
-
+ NamePipe -
-
+ NamePipe
-
-
+
+ Lokale Shell
-
+ Lokale Shell -
-
+ Diese Software ist ein Terminal-Emulator, der eine sichere Shell (SSH)-Verbindung, eine Telnet-Verbindung, eine serielle Port-Verbindung und andere Funktionen bereitstellt.
-
+ Diese Software sammelt keine persönlichen Informationen und sendet keine Informationen an den Server.
-
+ Diese Software enthält keinen bösartigen Code und enthält keine Hintertüren.
-
+ Diese Software ist Open-Source-Software. Sie können den Quellcode auf der GitHub-Website einsehen.
-
+ Diese Software wird wie sie ist, ohne jegliche Garantie, bereitgestellt.
-
+ Wenn Sie Fragen oder Anregungen haben, wenden Sie sich bitte an den Autor.
-
+ Version
-
+ Commit
-
+ Datum
-
-
+
+ Autor
-
+ Möchten Sie wirklich die Verbindung trennen "
-
+ " Sitzung?
-
+ Webseite
-
+ Globale Tastenkombinationen:
-
+ Menüleiste anzeigen/ausblenden
-
+ Mit LocalShell verbinden
-
+ Aktuelle Sitzung klonen
-
+ UI in den STD-Modus umschalten
-
+ UI in den MINI-Modus umschalten
-
+ Zur vorherigen Sitzung wechseln
-
+ Zur nächsten Sitzung wechseln
-
+ Zur Sitzung [Nummer] wechseln
-
+ Zur Zeilenanfang gehen
-
+ Zum Zeilenende gehen
-
+ Es gibt Sitzungen, die noch nicht entsperrt wurden. Bitte entsperren Sie sie zuerst.
-
+ Möchten Sie wirklich beenden?
@@ -2707,8 +2708,8 @@
-
-
+
+ Warnung
@@ -2745,7 +2746,7 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
-
+ Die Standard-Local-Shell ist keine gültige Datei!
@@ -2795,7 +2796,7 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
Übertragen
-
+ Der Benutzer-Plugins-Pfad ist kein Verzeichnis!
@@ -2869,93 +2870,36 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
Interner Befehl
-
+ Kopieren
-
+ Einfügen
-
+ Alles auswählen
-
+ Suchen
-
+ Vergrößern
-
+ Verkleinern
-
- Session
-
-
-
- Signalton in Sitzung '%1'
-
-
-
- TerminalDisplay
-
-
-
- Größe: XXX x XXX
-
-
-
-
- Größe: %1 x %2
-
-
-
-
- Mehrzeiligen Text einfügen
-
-
-
-
- Möchten Sie diesen Text wirklich einfügen?
-
-
-
-
- <qt>Die Ausgabe wurde durch Drücken von Strg+S <a href="http://en.wikipedia.org/wiki/Flow_control">angehalten</a>. Drücken Sie <b>Strg+Q</b>, um fortzufahren.</qt>
-
-
-
- UrlFilter
-
-
-
- Link folgen (Strg + Klick)
-
-
-
-
- Pfad folgen (Strg + Klick)
-
-
-
- Vt102Emulation
-
-
-
- Kein Tastaturübersetzer verfügbar. Die Informationen, die zum Konvertieren von Tastendrücken in Zeichen, die an das Terminal gesendet werden sollen, fehlen.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
QObject
-
+ Unbenanntes Farbschema
-
+ Zugängliches Farbschema
-
+ Link öffnen
-
+ Link-Adresse kopieren
-
+ E-Mail senden an...
-
+ E-Mail-Adresse kopieren
-
+ Pfad öffnen
-
+ Übergeordneten Ordner öffnen
-
+ Pfad kopieren
@@ -3587,12 +3531,12 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
QTermWidget
-
+ Farbschema-Fehler
-
+ Farbschema kann nicht geladen werden: %1
@@ -3915,6 +3859,13 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
Alle Treffer hervorheben
+
+ Session
+
+
+ Signalton in Sitzung '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
SessionsWindow
-
+ Telnet-Fehler
-
+ Telnet-Fehler:
%1.
-
-
+
+ Serieller Fehler
-
+
@@ -4279,133 +4230,133 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
%1.
-
+ Raw-Socket-Fehler
-
+ Raw-Socket-Fehler:
%1.
-
+ Name-Pipe-Fehler
-
+ Name-Pipe-Fehler:
%1.
-
-
+
+ SSH2-Fehler
-
-
+
+ SSH2-Fehler:
%1.
-
-
+
+ URL öffnen
-
-
+
+ URL %1 kann nicht geöffnet werden.
-
+ Wählen Sie Dateien aus, die mit Zmodem gesendet werden sollen
-
+ Alle Dateien (*)
-
+ Lokale Shell starten
-
+ Lokale Shell kann nicht gestartet werden:
%1.
-
+ Serieller Port %1 wurde entfernt.
-
+ Log speichern...
-
+ Log-Dateien (*.log)
-
+ Log speichern
-
-
-
+
+
+ Datei %1 kann nicht geschrieben werden:
%2.
-
+ Raw-Log speichern...
-
+ Binärdateien (*.bin)
-
+ Raw-Log speichern
-
+ Sitzung entsperren
-
+ Falsches Passwort!
-
+ ASCII-Datei empfangen
@@ -4662,6 +4613,34 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
Übertragungs-Informationen
+
+ TerminalDisplay
+
+
+
+ Größe: XXX x XXX
+
+
+
+
+ Größe: %1 x %2
+
+
+
+
+ Mehrzeiligen Text einfügen
+
+
+
+
+ Möchten Sie diesen Text wirklich einfügen?
+
+
+
+
+ <qt>Die Ausgabe wurde durch Drücken von Strg+S <a href="http://en.wikipedia.org/wiki/Flow_control">angehalten</a>. Drücken Sie <b>Strg+Q</b>, um fortzufahren.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ Wenn Sie eine andere Shell verwenden müssen, erstellen Sie bitte eine Sitzung
%1 Zeichen überschreiben
+
+ UrlFilter
+
+
+
+ Link folgen (Strg + Klick)
+
+
+
+
+ Pfad folgen (Strg + Klick)
+
+
+
+ Vt102Emulation
+
+
+
+ Kein Tastaturübersetzer verfügbar. Die Informationen, die zum Konvertieren von Tastendrücken in Zeichen, die an das Terminal gesendet werden sollen, fehlen.
+
+keyMapManager
diff --git a/lang/quardCRT_en_US.ts b/lang/quardCRT_en_US.ts
index bf8f154c..b1fb3960 100644
--- a/lang/quardCRT_en_US.ts
+++ b/lang/quardCRT_en_US.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -285,7 +285,7 @@
-
+
@@ -464,7 +464,7 @@
-
+
@@ -566,26 +566,27 @@
+
-
+
-
+
-
+
-
+
@@ -595,564 +596,564 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1213,759 +1214,759 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2696,8 +2697,8 @@
-
-
+
+
@@ -2731,7 +2732,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+
@@ -2781,7 +2782,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+
@@ -2865,93 +2866,36 @@ If you need to use another shell, please create a session through [quick-connect
-
+
-
+
-
+
-
+
-
+
-
+
-
- Session
-
-
-
-
-
-
-
- TerminalDisplay
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- UrlFilter
-
-
-
-
-
-
-
-
-
-
-
-
- Vt102Emulation
-
-
-
-
-
-LockSessionWindow
@@ -3480,47 +3424,47 @@ If you need to use another shell, please create a session through [quick-connect
QObject
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3583,12 +3527,12 @@ If you need to use another shell, please create a session through [quick-connect
QTermWidget
-
+
-
+
@@ -4242,152 +4186,152 @@ If you need to use another shell, please create a session through [quick-connect
SessionsWindow
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4644,6 +4588,34 @@ If you need to use another shell, please create a session through [quick-connect
+
+ TerminalDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+UndoStack
@@ -4662,6 +4634,27 @@ If you need to use another shell, please create a session through [quick-connect
+
+ UrlFilter
+
+
+
+
+
+
+
+
+
+
+
+
+ Vt102Emulation
+
+
+
+
+
+keyMapManager
diff --git a/lang/quardCRT_es_ES.ts b/lang/quardCRT_es_ES.ts
index ac1437a6..975e2046 100644
--- a/lang/quardCRT_es_ES.ts
+++ b/lang/quardCRT_es_ES.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Barra de herramientas
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Advertencia
@@ -285,7 +285,7 @@
-
+ Preparado
@@ -464,7 +464,7 @@
-
+ Ayuda
@@ -566,26 +566,27 @@
+ Introduzca el host <Alt+R> para conectar
-
+ Desconectar todo
-
+ Desconectar todas las sesiones
-
+ Clonar sesión
-
+ Clonar sesión actual <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Bloquear sesión
-
+ Registro de sesión
-
+ Crear un archivo de registro para la sesión actual
-
+ Registro de sesión en bruto
-
+ Crear un archivo de registro en bruto para la sesión actual
-
+ Vista hexadecimal
-
+ Mostrar/Ocultar vista hexadecimal para la sesión actual
-
+ Salir
-
+ Salir de la aplicación
-
+ Copiar
-
+ Copiar el texto seleccionado al portapapeles <Command+C>
-
+ Copiar el texto seleccionado al portapapeles <Ctrl+Ins>
-
+ Pegar
-
+ Pegar el texto del portapapeles a la sesión actual <Command+V>
-
+ Pegar el texto del portapapeles a la sesión actual <Shift+Ins>
-
+ Copiar y pegar
-
+ Copiar el texto seleccionado al portapapeles y pegar a la sesión actual
-
+ Seleccionar todo
-
+ Seleccionar todo el texto en la sesión actual <Ctrl+Shift+A>
-
+ Buscar...
-
+ Buscar texto en la sesión actual <Ctrl+F>
-
+ Imprimir pantalla
-
+ Imprimir pantalla actual
-
+ Captura de pantalla
-
+ Captura de pantalla de la pantalla actual <Alt+P>
-
+ Exportar sesión
-
+ Exportar sesión actual a un archivo <Alt+O>
-
+ Borrar desplazamiento
-
+ Borrar el contenido de las filas de desplazamiento
-
+ Borrar pantalla
-
+ Borrar el contenido de la pantalla actual
-
+ Borrar pantalla y desplazamiento
-
+ Borrar el contenido de la pantalla y el desplazamiento
-
+ Reiniciar
-
+ Reiniciar emulador de terminal
-
+ Acercar
-
+ Acercar <Ctrl+"=">
-
+ Alejar
-
+ Alejar <Ctrl+"-">
-
-
+
+ Restablecer zoom
-
+ Diseño
-
+ Diseño único
-
+ Diseño único
-
+ Diseño de dos columnas
-
+ Diseño de dos columnas
-
+ Diseño de tres columnas
-
+ Diseño de tres columnas
-
+ Diseño de dos filas
-
+ Diseño de dos filas
-
+ Diseño de tres filas
-
+ Diseño de tres filas
-
+ Diseño de cuadrícula
-
+ Diseño de cuadrícula
-
+ Diseño de dos filas a la derecha
-
+ Diseño de dos filas a la derecha
-
+ Diseño de dos columnas en la parte inferior
-
+ Diseño de dos columnas en la parte inferior
-
+ Voltear diseño
-
+ Voltear diseño
-
+ Barra de menús
-
+ Mostrar/Ocultar barra de menús <Alt+U>
-
+ Mostrar/Ocultar barra de herramientas
-
+ Barra de estado
-
+ Mostrar/Ocultar barra de estado
-
+ Ventana de comandos
-
+ Mostrar/Ocultar ventana de comandos
-
+ Barra de conexión
-
+ Mostrar/Ocultar barra de conexión
-
+ Ventana lateral
-
+ Mostrar/Ocultar ventana lateral
-
+ Transparencia de ventanas
-
+ Habilitar/Deshabilitar transparencia alfa
-
+ Barra de desplazamiento vertical
-
+ Mostrar/Ocultar barra de desplazamiento vertical
-
+ Siempre encima
-
+ Mostrar ventana siempre encima
-
+ Pantalla completa
-
+ Alternar entre pantalla completa y modo normal <Alt+Enter>
-
+ Opciones de sesión...
-
+ Configurar opciones de sesión
-
+ Opciones globales...
-
+ Configurar opciones globales
-
+ Opciones de guardado en tiempo real
-
+ Opciones de guardado en tiempo real de la sesión y opciones globales
-
+ Guardar configuración ahora
-
+ Guardar configuración de opciones ahora
-
+ Enviar ASCII...
-
+ Enviar archivo ASCII
-
+ Recibir ASCII...
-
+ Recibir archivo ASCII
-
+ Enviar binario...
-
+ Enviar archivo binario
-
+ Enviar Kermit...
-
+ Enviar un archivo usando Kermit
-
+ Recibir Kermit...
-
+ Recibir un archivo usando Kermit
-
+ Enviar Xmodem...
-
+ Enviar un archivo usando Xmodem
-
+ Recibir Xmodem...
-
+ Recibir un archivo usando Xmodem
-
+ Enviar Ymodem...
-
+ Enviar un archivo usando Ymodem
-
+ Recibir Ymodem...
-
+ Recibir un archivo usando Ymodem
-
+ Lista de subida Zmodem...
-
+ Mostrar lista de subida de archivos Zmodem
-
+ Iniciar subida Zmodem
-
+ Iniciar subida de archivo Zmodem
-
+ Iniciar servidor TFTP
-
+ Iniciar/Detener el servidor TFTP
-
+ Ejecutar...
-
+ Ejecutar un script
-
+ Cancelar
@@ -1213,759 +1214,759 @@
Cambiar color
-
+ Cancelar ejecución de script
-
+ Iniciar grabación de script
-
+ Iniciar grabación de script
-
+ Detener grabación de script...
-
+ Detener grabación de script
-
+ Cancelar grabación de script
-
+ Cancelar grabación de script
-
+ Añadir marcador
-
+ Añadir un marcador
-
-
+
+ Eliminar marcador
-
+ Eliminar un marcador
-
-
+
+ Limpiar todos los marcadores
-
+ Limpiar todos los marcadores
-
+ Administrador de mapas de teclas
-
+ Mostrar editor de mapas de teclas
-
+ Crear clave pública...
-
+ Crear una clave pública
-
+ Administrador de claves públicas
-
+ Mostrar administrador de claves públicas
-
+ Comando interno
-
+ Mostrar ventana de comando interno
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Color del tema
-
+ Establecer color del tema, cancelar para usar el predeterminado
-
-
+
+ Referencia de atajos de teclado
-
+ Mostrar referencia de atajos de teclado
-
-
+
+ Declaración de privacidad
-
+ Mostrar declaración de privacidad
-
-
+
+ Acerca de Python
-
+ Mostrar diálogo acerca de Python
-
+ Laboratorio
-
-
+
+ Escaneo SSH
-
+ Mostrar diálogo de escaneo SSH
-
+ ¡No se encontraron metadatos del complemento!
-
+ ¡No se encontró la versión de la API del complemento!
-
+ ¡La versión de la API del complemento no coincide!
-
+ ¡Menú del complemento no encontrado!
-
+ ¡Error al inicializar el complemento!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ ¡La sesión de difusión no puede transferir archivos!
-
+ Seleccionar archivos para enviar como ASCII
-
-
+
+ Archivos de texto (*.txt);;Todos los archivos (*)
-
+ Guardar datos recibidos como ASCII
-
+ Seleccionar archivos para enviar como BINARIO
-
-
-
-
-
-
+
+
+
+
+
+ Todos los archivos (*)
-
+ Seleccionar archivos para enviar usando Kermit
-
+ Seleccionar archivos para enviar usando Xmodem
-
+ Guardar archivos recibidos usando Xmodem
-
+ Seleccionar archivos para enviar usando Ymodem
-
+ Seleccionar archivos para enviar usando Zmodem
-
+ Seleccionar un archivo de script
-
+ Archivos de Python (*.py);;Todos los archivos (*)
-
+ Seleccionar color
-
+ ¿Está seguro de desconectar "
-
+ " sesión?
-
+ Este software es un emulador de terminal que proporciona una conexión de shell seguro (SSH), una conexión telnet, una conexión de puerto serie y otras funciones.
-
+ Este software no recopila ninguna información personal y no envía ninguna información al servidor.
-
+ Este software no contiene ningún código malicioso y no contiene ninguna puerta trasera.
-
+ Este software es un software de código abierto, puede ver el código fuente en el sitio web de github.
-
+ Este software se proporciona tal cual, sin garantía alguna.
-
+ Si tiene alguna pregunta o sugerencia, póngase en contacto con el autor.
-
+ Versión
-
+ Confirmar
-
+ Fecha
-
-
+
+ Autor
-
+ Sitio web
-
+ Pestaña
-
+ Organizar sesiones en pestañas
-
+ Mosaico
-
+ Organizar sesiones en mosaicos no superpuestos
-
+ Cascada
-
+ Organizar sesiones para que se superpongan entre sí
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Claro
-
+ Cambiar a tema claro
-
+ Oscuro
-
+ Cambiar a tema oscuro
-
+ Mostrar ayuda
-
+ Comprobar actualizaciones
-
+ Buscar actualizaciones
-
-
+
+ Acerca de
-
+ Mostrar diálogo acerca de
-
+ Acerca de Qt
-
+ Mostrar diálogo acerca de Qt
-
+ Información del complemento
-
+ Mostrar diálogo de información del complemento
-
+ Imprimir pantalla guardada en %1
-
+ Guardar captura de pantalla
-
+ Archivos de imagen (*.jpg)
-
-
+
+ Captura de pantalla guardada en %1
-
+ Guardar exportación de sesión
-
+ Archivos de texto (*.txt);;Archivos HTML (*.html)
-
+ Archivos de texto (*.txt)
-
+ Archivos HTML (*.html)
-
+ Exportación de sesión guardada en %1
-
+ Error al guardar la exportación de sesión en %1
-
+ Seleccionar un directorio
-
+ Seleccionar un marcador
-
+ ¿Está seguro de limpiar todos los marcadores?
-
+ Puerto
-
+ El fondo de video está habilitado, habilite la animación en las opciones globales (más recursos del sistema) o cambie la imagen de fondo.
-
+ Error al obtener la información de la sesión.
-
+
-
+
-
+ Serie -
-
+ Serie
-
+ Crudo -
-
+ Crudo
-
+ Nombre de tubería -
-
+ Nombre de tubería
-
-
+
+ Shell local
-
+ Shell local -
-
+ Atajos globales:
-
+ mostrar/ocultar barra de menús
-
+ conectar a Shell local
-
+ clonar sesión actual
-
+ cambiar la interfaz de usuario al modo STD
-
+ cambiar la interfaz de usuario al modo MINI
-
+ cambiar a la sesión anterior
-
+ cambiar a la siguiente sesión
-
+ cambiar a la sesión [num]
-
+ Ir al inicio de la línea
-
+ Ir al final de la línea
-
+ Hay sesiones que aún no se han desbloqueado, desbloquéelas primero.
-
+ ¿Está seguro de salir?
@@ -2707,8 +2708,8 @@
-
-
+
+ Advertencia
@@ -2745,7 +2746,7 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
-
+ ¡El Shell local predeterminado no es un archivo válido!
@@ -2795,7 +2796,7 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
Transferir
-
+ ¡La ruta de los complementos de usuario no es un directorio!
@@ -2869,93 +2870,36 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
Comando interno
-
+ Copiar
-
+ Pegar
-
+ Seleccionar todo
-
+ Buscar
-
+ Acercar
-
+ Alejar
-
- Session
-
-
-
- Campana en la sesión '%1'
-
-
-
- TerminalDisplay
-
-
-
- Tamaño: XXX x XXX
-
-
-
-
- Tamaño: %1 x %2
-
-
-
-
- Pegar texto de varias líneas
-
-
-
-
- ¿Está seguro de que desea pegar este texto?
-
-
-
-
- <qt>La salida ha sido <a href="http://en.wikipedia.org/wiki/Flow_control">suspendida</a> al presionar Ctrl+S. Presione <b>Ctrl+Q</b> para reanudar.</qt>
-
-
-
- UrlFilter
-
-
-
- Seguir enlace (ctrl + clic)
-
-
-
-
- Seguir ruta (ctrl + clic)
-
-
-
- Vt102Emulation
-
-
-
- No hay traductor de teclado disponible. Falta la información necesaria para convertir las pulsaciones de teclas en caracteres para enviar al terminal.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
QObject
-
+ Esquema de color sin nombre
-
+ Esquema de color accesible
-
+ Abrir enlace
-
+ Copiar dirección del enlace
-
+ Enviar correo electrónico a...
-
+ Copiar dirección de correo electrónico
-
+ Abrir ruta
-
+ Abrir carpeta contenedora
-
+ Copiar ruta
@@ -3587,12 +3531,12 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
QTermWidget
-
+ Error de esquema de color
-
+ No se puede cargar el esquema de color: %1
@@ -3915,6 +3859,13 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
Resaltar todas las coincidencias
+
+ Session
+
+
+ Campana en la sesión '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
SessionsWindow
-
+ Error de Telnet
-
+ Error de Telnet:
%1.
-
-
+
+ Error de serie
-
+
@@ -4279,133 +4230,133 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
%1.
-
+ Error de socket sin formato
-
+ Error de socket sin formato:
%1.
-
+ Error de nombre de tubería
-
+ Error de nombre de tubería:
%1.
-
-
+
+ Error de SSH2
-
-
+
+ Error de SSH2:
%1.
-
-
+
+ Abrir URL
-
-
+
+ No se puede abrir la URL %1.
-
+ Seleccionar archivos para enviar usando Zmodem
-
+ Todos los archivos (*)
-
+ Iniciar shell local
-
+ No se puede iniciar el shell local:
%1.
-
+ El puerto serie %1 ha sido eliminado.
-
+ Guardar registro...
-
+ archivos de registro (*.log)
-
+ Guardar registro
-
-
-
+
+
+ No se puede escribir el archivo %1:
%2.
-
+ Guardar registro sin formato...
-
+ archivos binarios (*.bin)
-
+ Guardar registro sin formato
-
+ Desbloquear sesión
-
+ ¡Contraseña incorrecta!
-
+ Recibir archivo ASCII
@@ -4662,6 +4613,34 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
Información de transferencia
+
+ TerminalDisplay
+
+
+
+ Tamaño: XXX x XXX
+
+
+
+
+ Tamaño: %1 x %2
+
+
+
+
+ Pegar texto de varias líneas
+
+
+
+
+ ¿Está seguro de que desea pegar este texto?
+
+
+
+
+ <qt>La salida ha sido <a href="http://en.wikipedia.org/wiki/Flow_control">suspendida</a> al presionar Ctrl+S. Presione <b>Ctrl+Q</b> para reanudar.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ Si necesita usar otro shell, cree una sesión a través de [conexión rápida &g
Sobrescribir %1 caracteres
+
+ UrlFilter
+
+
+
+ Seguir enlace (ctrl + clic)
+
+
+
+
+ Seguir ruta (ctrl + clic)
+
+
+
+ Vt102Emulation
+
+
+
+ No hay traductor de teclado disponible. Falta la información necesaria para convertir las pulsaciones de teclas en caracteres para enviar al terminal.
+
+keyMapManager
diff --git a/lang/quardCRT_fr_FR.ts b/lang/quardCRT_fr_FR.ts
index cf39fc90..06b696ca 100644
--- a/lang/quardCRT_fr_FR.ts
+++ b/lang/quardCRT_fr_FR.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Barre d'outils
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Attention
@@ -285,7 +285,7 @@
-
+ Prêt
@@ -464,7 +464,7 @@
-
+ Aide
@@ -566,26 +566,27 @@
+ Entrer l'hôte <Alt+R> pour se connecter
-
+ Déconnecter tout
-
+ Déconnecter toutes les sessions
-
+ Cloner la session
-
+ Cloner la session en cours <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Verrouiller la session
-
+ Journaliser la session
-
+ Créer un fichier journal pour la session en cours
-
+ Journal brut de la session
-
+ Créer un fichier journal brut pour la session en cours
-
+ Vue hexadécimale
-
+ Afficher/Masquer la vue hexadécimale pour la session en cours
-
+ Quitter
-
+ Quitter l'application
-
+ Copier
-
+ Copier le texte sélectionné dans le presse-papiers <Command+C>
-
+ Copier le texte sélectionné dans le presse-papiers <Ctrl+Ins>
-
+ Coller
-
+ Coller le texte du presse-papiers dans la session en cours <Command+V>
-
+ Coller le texte du presse-papiers dans la session en cours <Shift+Ins>
-
+ Copier et coller
-
+ Copier le texte sélectionné dans le presse-papiers et coller dans la session en cours
-
+ Tout sélectionner
-
+ Sélectionner tout le texte dans la session en cours <Ctrl+Shift+A>
-
+ Rechercher...
-
+ Rechercher du texte dans la session en cours <Ctrl+F>
-
+ Imprimer l'écran
-
+ Imprimer l'écran en cours
-
+ Capture d'écran
-
+ Capture d'écran de l'écran en cours <Alt+P>
-
+ Exportation de la session
-
+ Exporter la session en cours vers un fichier <Alt+O>
-
+ Effacer le défilement
-
+ Effacer le contenu des lignes de défilement
-
+ Effacer l'écran
-
+ Effacer le contenu de l'écran en cours
-
+ Effacer l'écran et le défilement
-
+ Effacer le contenu de l'écran et du défilement
-
+ Réinitialiser
-
+ Réinitialiser l'émulateur de terminal
-
+ Agrandir
-
+ Agrandir <Ctrl+"=">
-
+ Réduire
-
+ Réduire <Ctrl+"-">
-
-
+
+ Réinitialiser le zoom
-
+ Disposition
-
+ Disposition simple
-
+ Disposition simple
-
+ Disposition à deux colonnes
-
+ Disposition à deux colonnes
-
+ Disposition à trois colonnes
-
+ Disposition à trois colonnes
-
+ Disposition à deux rangées
-
+ Disposition à deux rangées
-
+ Disposition à trois rangées
-
+ Disposition à trois rangées
-
+ Disposition en grille
-
+ Disposition en grille
-
+ Disposition à deux rangées à droite
-
+ Disposition à deux rangées à droite
-
+ Disposition à deux colonnes en bas
-
+ Disposition à deux colonnes en bas
-
+ Retourner la disposition
-
+ Retourner la disposition
-
+ Barre de menu
-
+ Afficher/Masquer la barre de menu <Alt+U>
-
+ Afficher/Masquer la barre d'outils
-
+ Barre d'état
-
+ Afficher/Masquer la barre d'état
-
+ Fenêtre de commande
-
+ Afficher/Masquer la fenêtre de commande
-
+ Barre de connexion
-
+ Afficher/Masquer la barre de connexion
-
+ Fenêtre latérale
-
+ Afficher/Masquer la fenêtre latérale
-
+ Transparence des fenêtres
-
+ Activer/Désactiver la transparence alpha
-
+ Barre de défilement verticale
-
+ Afficher/Masquer la barre de défilement verticale
-
+ Toujours au premier plan
-
+ Afficher la fenêtre toujours au premier plan
-
+ Plein écran
-
+ Basculer entre le mode plein écran et le mode normal <Alt+Entrée>
-
+ Options de la session...
-
+ Configurer les options de la session
-
+ Options globales...
-
+ Configurer les options globales
-
+ Options d'enregistrement en temps réel
-
+ Enregistrer en temps réel les options de session et les options globales
-
+ Enregistrer les paramètres maintenant
-
+ Enregistrer la configuration des options maintenant
-
+ Envoyer ASCII...
-
+ Envoyer un fichier ASCII
-
+ Recevoir ASCII...
-
+ Recevoir un fichier ASCII
-
+ Envoyer binaire...
-
+ Envoyer un fichier binaire
-
+ Envoyer Kermit...
-
+ Envoyer un fichier en utilisant Kermit
-
+ Recevoir Kermit...
-
+ Recevoir un fichier en utilisant Kermit
-
+ Envoyer Xmodem...
-
+ Envoyer un fichier en utilisant Xmodem
-
+ Recevoir Xmodem...
-
+ Recevoir un fichier en utilisant Xmodem
-
+ Envoyer Ymodem...
-
+ Envoyer un fichier en utilisant Ymodem
-
+ Recevoir Ymodem...
-
+ Recevoir un fichier en utilisant Ymodem
-
+ Liste de téléchargement Zmodem...
-
+ Afficher la liste de téléchargement de fichiers Zmodem
-
+ Démarrer le téléchargement Zmodem
-
+ Démarrer le téléchargement de fichiers Zmodem
-
+ Démarrer le serveur TFTP
-
+ Démarrer/Arrêter le serveur TFTP
-
+ Exécuter...
-
+ Exécuter un script
-
+ Annuler
@@ -1213,759 +1214,759 @@
Changer la couleur
-
+ Annuler l'exécution du script
-
+ Commencer l'enregistrement du script
-
+ Commencer l'enregistrement du script
-
+ Arrêter l'enregistrement du script...
-
+ Arrêter l'enregistrement du script
-
+ Annuler l'enregistrement du script
-
+ Annuler l'enregistrement du script
-
+ Ajouter un marque-page
-
+ Ajouter un marque-page
-
-
+
+ Supprimer un marque-page
-
+ Supprimer un marque-page
-
-
+
+ Nettoyer tous les marque-pages
-
+ Nettoyer tous les marque-pages
-
+ Gestionnaire de mappage des touches
-
+ Afficher l'éditeur de mappage des touches
-
+ Créer une clé publique...
-
+ Créer une clé publique
-
+ Gestionnaire de clés publiques
-
+ Afficher le gestionnaire de clés publiques
-
+ Commande interne
-
+ Afficher la fenêtre de commande interne
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Couleur du thème
-
+ Définir la couleur du thème, annuler pour utiliser la valeur par défaut
-
-
+
+ Référence des raccourcis clavier
-
+ Afficher la référence des raccourcis clavier
-
-
+
+ Déclaration de confidentialité
-
+ Afficher la déclaration de confidentialité
-
-
+
+ À propos de Python
-
+ Afficher la boîte de dialogue À propos de Python
-
+ Laboratoire
-
-
+
+ Exploration SSH
-
+ Afficher la boîte de dialogue d'exploration SSH
-
+ Métadonnées du plugin introuvables !
-
+ Version de l'API du plugin introuvable !
-
+ La version de l'API du plugin ne correspond pas !
-
+ Menu du plugin introuvable !
-
+ Échec de l'initialisation du plugin !
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ La session de diffusion ne peut pas transférer de fichier !
-
+ Sélectionner les fichiers à envoyer en ASCII
-
-
+
+ Fichiers texte (*.txt);;Tous les fichiers (*)
-
+ Enregistrer les données reçues en ASCII
-
+ Sélectionner les fichiers à envoyer en BINAIRE
-
-
-
-
-
-
+
+
+
+
+
+ Tous les fichiers (*)
-
+ Sélectionner les fichiers à envoyer en utilisant Kermit
-
+ Sélectionner les fichiers à envoyer en utilisant Xmodem
-
+ Enregistrer les fichiers reçus en utilisant Xmodem
-
+ Sélectionner les fichiers à envoyer en utilisant Ymodem
-
+ Sélectionner les fichiers à envoyer en utilisant Zmodem
-
+ Sélectionner un fichier de script
-
+ Fichiers Python (*.py);;Tous les fichiers (*)
-
+ Sélectionner une couleur
-
+ Êtes-vous sûr de vouloir vous déconnecter de "
-
+ " session ?
-
+ Ce logiciel est un émulateur de terminal qui fournit une connexion shell sécurisée (SSH), une connexion telnet, une connexion de port série et d'autres fonctions.
-
+ Ce logiciel ne collecte aucune information personnelle et n'envoie aucune information au serveur.
-
+ Ce logiciel ne contient aucun code malveillant et ne contient aucune porte dérobée.
-
+ Ce logiciel est un logiciel open source, vous pouvez consulter le code source sur le site web de github.
-
+ Ce logiciel est fourni tel quel, sans aucune garantie.
-
+ Si vous avez des questions ou des suggestions, veuillez contacter l'auteur.
-
+ Version
-
+ Validation
-
+ Date
-
-
+
+ Auteur
-
+ Site web
-
+ Onglet
-
+ Organiser les sessions dans des onglets
-
+ Mosaïque
-
+ Organiser les sessions dans des mosaïques non superposées
-
+ Cascade
-
+ Organiser les sessions pour qu'elles se chevauchent
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Clair
-
+ Passer au thème clair
-
+ Sombre
-
+ Passer au thème sombre
-
+ Afficher l'aide
-
+ Vérifier les mises à jour
-
+ Vérifier les mises à jour
-
-
+
+ À propos de
-
+ Afficher la boîte de dialogue À propos de
-
+ À propos de Qt
-
+ Afficher la boîte de dialogue À propos de Qt
-
+ Informations sur le plugin
-
+ Afficher la boîte de dialogue d'informations sur le plugin
-
+ PrintScreen enregistré dans %1
-
+ Enregistrer la capture d'écran
-
+ Fichiers image (*.jpg)
-
-
+
+ Capture d'écran enregistrée dans %1
-
+ Enregistrer l'exportation de la session
-
+ Fichiers texte (*.txt);;Fichiers HTML (*.html)
-
+ Fichiers texte (*.txt)
-
+ Fichiers HTML (*.html)
-
+ Exportation de la session enregistrée dans %1
-
+ Échec de l'enregistrement de l'exportation de la session dans %1
-
+ Sélectionner un répertoire
-
+ Sélectionner un marque-page
-
+ Êtes-vous sûr de vouloir nettoyer tous les marque-pages ?
-
+ Port
-
+ L'arrière-plan vidéo est activé, veuillez activer l'animation dans les options globales (plus de ressources système) ou changer l'image d'arrière-plan.
-
+ Échec de l'obtention des informations de session.
-
+ Telnet -
-
+ Telnet
-
+ Série -
-
+ Série
-
+ Brut -
-
+ Brut
-
+ Tube nommé -
-
+ Tube nommé
-
-
+
+ Shell local
-
+ Shell local -
-
+ Raccourcis globaux :
-
+ Afficher/Masquer la barre de menu
-
+ Se connecter à LocalShell
-
+ Cloner la session actuelle
-
+ Passer l'interface utilisateur en mode STD
-
+ Passer l'interface utilisateur en mode MINI
-
+ Passer à la session précédente
-
+ Passer à la session suivante
-
+ Passer à la session [num]
-
+ Aller au début de la ligne
-
+ Aller à la fin de la ligne
-
+ Il y a des sessions qui n'ont pas encore été déverrouillées, veuillez les déverrouiller d'abord.
-
+ Êtes-vous sûr de vouloir quitter ?
@@ -2707,8 +2708,8 @@
-
-
+
+ Attention
@@ -2745,7 +2746,7 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
-
+ Le shell local par défaut n'est pas un fichier valide !
@@ -2795,7 +2796,7 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
Transfert
-
+ Le chemin des plugins utilisateur n'est pas un répertoire !
@@ -2869,93 +2870,36 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
Commande interne
-
+ Copier
-
+ Coller
-
+ Tout sélectionner
-
+ Rechercher
-
+ Agrandir
-
+ Réduire
-
- Session
-
-
-
- Sonnerie dans la session '%1'
-
-
-
- TerminalDisplay
-
-
-
- Taille : XXX x XXX
-
-
-
-
- Taille : %1 x %2
-
-
-
-
- Coller du texte multiligne
-
-
-
-
- Êtes-vous sûr de vouloir coller ce texte ?
-
-
-
-
- <qt>La sortie a été <a href="http://en.wikipedia.org/wiki/Flow_control">suspendue</a> en appuyant sur Ctrl+S. Appuyez sur <b>Ctrl+Q</b> pour reprendre.</qt>
-
-
-
- UrlFilter
-
-
-
- Suivre le lien (ctrl + clic)
-
-
-
-
- Suivre le chemin (ctrl + clic)
-
-
-
- Vt102Emulation
-
-
-
- Aucun traducteur de clavier disponible. Les informations nécessaires à la conversion des frappes de touches en caractères à envoyer au terminal sont manquantes.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
QObject
-
+ Schéma de couleur sans nom
-
+ Schéma de couleur accessible
-
+ Ouvrir le lien
-
+ Copier l'adresse du lien
-
+ Envoyer un courriel à...
-
+ Copier l'adresse de courriel
-
+ Ouvrir le chemin
-
+ Ouvrir le dossier contenant
-
+ Copier le chemin
@@ -3587,12 +3531,12 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
QTermWidget
-
+ Erreur de schéma de couleur
-
+ Impossible de charger le schéma de couleur : %1
@@ -3915,6 +3859,13 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
Surligner toutes les correspondances
+
+ Session
+
+
+ Sonnerie dans la session '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
SessionsWindow
-
+ Erreur Telnet
-
+ Erreur Telnet :
%1.
-
-
+
+ Erreur série
-
+
@@ -4279,133 +4230,133 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
%1.
-
+ Erreur de socket brut
-
+ Erreur de socket brut :
%1.
-
+ Erreur de tube nommé
-
+ Erreur de tube nommé :
%1.
-
-
+
+ Erreur SSH2
-
-
+
+ Erreur SSH2 :
%1.
-
-
+
+ Ouvrir l'URL
-
-
+
+ Impossible d'ouvrir l'URL %1.
-
+ Sélectionner les fichiers à envoyer en utilisant Zmodem
-
+ Tous les fichiers (*)
-
+ Démarrer le shell local
-
+ Impossible de démarrer le shell local :
%1.
-
+ Le port série %1 a été supprimé.
-
+ Enregistrer le journal...
-
+ Fichiers journaux (*.log)
-
+ Enregistrer le journal
-
-
-
+
+
+ Impossible d'écrire le fichier %1 :
%2.
-
+ Enregistrer le journal brut...
-
+ Fichiers binaires (*.bin)
-
+ Enregistrer le journal brut
-
+ Déverrouiller la session
-
+ Mot de passe incorrect !
-
+ Recevoir un fichier ASCII
@@ -4662,6 +4613,34 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
Informations de transfert
+
+ TerminalDisplay
+
+
+
+ Taille : XXX x XXX
+
+
+
+
+ Taille : %1 x %2
+
+
+
+
+ Coller du texte multiligne
+
+
+
+
+ Êtes-vous sûr de vouloir coller ce texte ?
+
+
+
+
+ <qt>La sortie a été <a href="http://en.wikipedia.org/wiki/Flow_control">suspendue</a> en appuyant sur Ctrl+S. Appuyez sur <b>Ctrl+Q</b> pour reprendre.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ Si vous avez besoin d'utiliser un autre shell, veuillez créer une session
Écraser %1 caractères
+
+ UrlFilter
+
+
+
+ Suivre le lien (ctrl + clic)
+
+
+
+
+ Suivre le chemin (ctrl + clic)
+
+
+
+ Vt102Emulation
+
+
+
+ Aucun traducteur de clavier disponible. Les informations nécessaires à la conversion des frappes de touches en caractères à envoyer au terminal sont manquantes.
+
+keyMapManager
diff --git a/lang/quardCRT_ja_JP.ts b/lang/quardCRT_ja_JP.ts
index 5dd30fde..3382ca5a 100644
--- a/lang/quardCRT_ja_JP.ts
+++ b/lang/quardCRT_ja_JP.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ ツールバー
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 警告
@@ -285,7 +285,7 @@
-
+ 準備完了
@@ -464,7 +464,7 @@
-
+ ヘルプ
@@ -566,26 +566,27 @@
+ 接続するホストを入力 <Alt+R>
-
+ 全て切断
-
+ 全てのセッションを切断
-
+ セッションを複製
-
+ 現在のセッションを複製 <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
セッションをロック
-
+ セッションを記録
-
+ 現在のセッションを記録
-
+ セッションを生記録
-
+ 現在のセッションを生記録
-
+ 16進数ビュー
-
+ 現在のセッションの16進数ビューを表示/非表示
-
+ 終了
-
+ アプリケーションを終了
-
+ コピー
-
+ 選択したテキストをクリップボードにコピー <Command+C>
-
+ 選択したテキストをクリップボードにコピー <Ctrl+Ins>
-
+ 貼り付け
-
+ クリップボードのテキストを現在のセッションに貼り付け <Command+V>
-
+ クリップボードのテキストを現在のセッションに貼り付け <Shift+Ins>
-
+ コピーと貼り付け
-
+ 選択したテキストをクリップボードにコピーして現在のセッションに貼り付け
-
+ 全て選択
-
+ 現在のセッションの全てのテキストを選択 <Ctrl+Shift+A>
-
+ 検索...
-
+ 現在のセッションのテキストを検索 <Ctrl+F>
-
+ プリントスクリーン
-
+ 現在のスクリーンを印刷
-
+ スクリーンショット
-
+ 現在の画面をスクリーンショット <Alt+P>
-
+ セッションをエクスポート
-
+ 現在のセッションをファイルにエクスポート <Alt+O>
-
+ スクロールバックをクリア
-
+ スクロールバックの内容をクリア
-
+ 画面をクリア
-
+ 現在の画面の内容をクリア
-
+ 画面とスクロールバックをクリア
-
+ 画面とスクロールバックの内容をクリア
-
+ リセット
-
+ 端末エミュレータをリセット
-
+ 拡大
-
+ 拡大 <Ctrl+"=">
-
+ 縮小
-
+ 縮小 <Ctrl+"-">
-
-
+
+ ズームリセット
-
+ レイアウト
-
+ シングルレイアウト
-
+ シングルレイアウト
-
+ 2列レイアウト
-
+ 2列レイアウト
-
+ 3列レイアウト
-
+ 3列レイアウト
-
+ 2行レイアウト
-
+ 2行レイアウト
-
+ 3行レイアウト
-
+ 3行レイアウト
-
+ グリッドレイアウト
-
+ グリッドレイアウト
-
+ 2行右レイアウト
-
+ 2行右レイアウト
-
+ 2列下レイアウト
-
+ 2列下レイアウト
-
+ レイアウトを反転
-
+ レイアウトを反転
-
+ メニューバー
-
+ メニューバーを表示/非表示 <Alt+U>
-
+ ツールバーを表示/非表示
-
+ ステータスバー
-
+ ステータスバーを表示/非表示
-
+ コマンドウィンドウ
-
+ コマンドウィンドウを表示/非表示
-
+ 接続バー
-
+ 接続バーを表示/非表示
-
+ サイドウィンドウ
-
+ サイドウィンドウを表示/非表示
-
+ ウィンドウの透明度
-
+ アルファ透明度を有効/無効
-
+ 垂直スクロールバー
-
+ 垂直スクロールバーを表示/非表示
-
+ 常に最前面に表示
-
+ ウィンドウを常に最前面に表示
-
+ 全画面表示
-
+ 全画面表示と通常表示を切り替え <Alt+Enter>
-
+ セッションオプション...
-
+ セッションオプションを設定
-
+ グローバルオプション...
-
+ グローバルオプションを設定
-
+ リアルタイム保存設定
-
+ セッションオプションとグローバルオプションをリアルタイムで保存
-
+ 設定を保存
-
+ オプション設定を保存
-
+ ASCII送信...
-
+ ASCIIファイルを送信
-
+ ASCII受信...
-
+ ASCIIファイルを受信
-
+ バイナリ送信...
-
+ バイナリファイルを送信
-
+ Kermit送信...
-
+ Kermitでファイルを送信
-
+ Kermit受信...
-
+ Kermitでファイルを受信
-
+ Xmodem送信...
-
+ Xmodemでファイルを送信
-
+ Xmodem受信...
-
+ Xmodemでファイルを受信
-
+ Ymodem送信...
-
+ Ymodemでファイルを送信
-
+ Ymodem受信...
-
+ Ymodemでファイルを受信
-
+ Zmodemアップロードリスト...
-
+ Zmodemファイルアップロードリストを表示
-
+ Zmodemアップロード開始
-
+ Zmodemファイルアップロードを開始
-
+ TFTPサーバー開始
-
+ TFTPサーバーを開始/停止
-
+ 実行...
-
+ スクリプトを実行
-
+ キャンセル
@@ -1213,759 +1214,759 @@
色を変更
-
+ スクリプト実行をキャンセル
-
+ スクリプト記録開始
-
+ スクリプト記録を開始
-
+ スクリプト記録停止...
-
+ スクリプト記録を停止
-
+ スクリプト記録キャンセル
-
+ スクリプト記録をキャンセル
-
+ ブックマークを追加
-
+ ブックマークを追加
-
-
+
+ ブックマークを削除
-
+ ブックマークを削除
-
-
+
+ 全てのブックマークをクリア
-
+ 全てのブックマークをクリア
-
+ キーマップマネージャー
-
+ キーマップエディターを表示
-
+ 公開鍵を作成...
-
+ 公開鍵を作成
-
+ 公開鍵マネージャー
-
+ 公開鍵マネージャーを表示
-
+ 内部コマンド
-
+ 内部コマンドウィンドウを表示
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ テーマカラー
-
+ テーマカラーを設定、デフォルトを使用するにはキャンセル
-
-
+
+ キーボードショートカットリファレンス
-
+ キーボードショートカットリファレンスを表示
-
-
+
+ プライバシーステートメント
-
+ プライバシーステートメントを表示
-
-
+
+ Pythonについて
-
+ Pythonについてのダイアログを表示
-
+ 実験室
-
-
+
+ SSHスキャン
-
+ SSHスキャンダイアログを表示
-
+ プラグインのメタデータが見つかりません!
-
+ プラグインAPIバージョンが見つかりません!
-
+ プラグインAPIバージョンが一致しません!
-
+ プラグインメニューが見つかりません!
-
+ プラグインの初期化に失敗しました!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ ブロードキャストセッションはファイルを転送できません!
-
+ ASCIIとして送信するファイルを選択
-
-
+
+ テキストファイル (*.txt);;全てのファイル (*)
-
+ 受信データをASCIIとして保存
-
+ バイナリとして送信するファイルを選択
-
-
-
-
-
-
+
+
+
+
+
+ 全てのファイル (*)
-
+ Kermitを使用して送信するファイルを選択
-
+ Xmodemを使用して送信するファイルを選択
-
+ Xmodemを使用して受信したファイルを保存
-
+ Ymodemを使用して送信するファイルを選択
-
+ Zmodemを使用して送信するファイルを選択
-
+ スクリプトファイルを選択
-
+ Pythonファイル (*.py);;全てのファイル (*)
-
+ 色を選択
-
+ 本当に切断しますか"
-
+ " セッション?
-
+ このソフトウェアは、セキュアシェル(SSH)接続、telnet接続、シリアルポート接続などを提供する端末エミュレータです。
-
+ このソフトウェアは個人情報を収集せず、サーバーに情報を送信しません。
-
+ このソフトウェアには悪意のあるコードは含まれておらず、バックドアも含まれていません。
-
+ このソフトウェアはオープンソースソフトウェアです。ソースコードはgithubのウェブサイトで閲覧できます。
-
+ このソフトウェアは無保証で提供されます。
-
+ 質問や提案がある場合は、作者に連絡してください。
-
+ バージョン
-
+ コミット
-
+ 日付
-
-
+
+ 作者
-
+ ウェブサイト
-
+ タブ
-
+ セッションをタブで表示
-
+ タイル
-
+ セッションを重ならないようにタイルで表示
-
+ カスケード
-
+ セッションを重ねて表示
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ 明るい
-
+ 明るいテーマに切り替える
-
+ 暗い
-
+ 暗いテーマに切り替える
-
+ ヘルプを表示
-
+ 更新をチェック
-
+ 更新をチェック
-
-
+
+ について
-
+ についてのダイアログを表示
-
+ Qtについて
-
+ Qtについてのダイアログを表示
-
+ プラグイン情報
-
+ プラグイン情報ダイアログを表示
-
+ プリントスクリーンを %1 に保存
-
+ スクリーンショットを保存
-
+ 画像ファイル (*.jpg)
-
-
+
+ スクリーンショットを %1 に保存
-
+ セッションエクスポートを保存
-
+ テキストファイル (*.txt);;HTMLファイル (*.html)
-
+ テキストファイル (*.txt)
-
+ HTMLファイル (*.html)
-
+ セッションエクスポートを %1 に保存
-
+ セッションエクスポートを %1 に保存できませんでした
-
+ ディレクトリを選択
-
+ ブックマークを選択
-
+ 全てのブックマークをクリアしてもよろしいですか?
-
+ ポート
-
+ ビデオ背景が有効になっています。グローバルオプションでアニメーションを有効にするか、背景画像を変更してください(システムリソースが増えます)。
-
+ セッション情報の取得に失敗しました。
-
+
-
+
-
+ シリアル -
-
+ シリアル
-
+
-
+
-
+ 名前付きパイプ -
-
+ 名前付きパイプ
-
-
+
+ ローカル端末
-
+ ローカル端末 -
-
+ グローバルショートカット:
-
+ メニューバーを表示/非表示
-
+ ローカル端末に接続
-
+ 現在のセッションを複製
-
+ UIを標準モードに切り替え
-
+ UIをミニモードに切り替え
-
+ 前のセッションに切り替え
-
+ 次のセッションに切り替え
-
+ セッション[num]に切り替え
-
+ 行頭に移動
-
+ 行末に移動
-
+ ロックされていないセッションがあります。まずロックを解除して下さい。
-
+ 終了してもよろしいですか?
@@ -2697,8 +2698,8 @@
-
-
+
+ 警告
@@ -2735,7 +2736,7 @@ PowerShell 5以降を使用してください!
-
+ デフォルトのローカル端末は有効なファイルではありません!
@@ -2785,7 +2786,7 @@ PowerShell 5以降を使用してください!
転送
-
+ ユーザープラグインのパスはディレクトリではありません!
@@ -2869,93 +2870,36 @@ PowerShell 5以降を使用してください!
内部コマンド
-
+ コピー
-
+ 貼り付け
-
+ 全て選択
-
+ 検索
-
+ 拡大
-
+ 縮小
-
- Session
-
-
-
- セッション '%1' でベル
-
-
-
- TerminalDisplay
-
-
-
- サイズ: XXX x XXX
-
-
-
-
- サイズ: %1 x %2
-
-
-
-
- 複数行のテキストを貼り付ける
-
-
-
-
- このテキストを貼り付けてもよろしいですか?
-
-
-
-
- <qt>Ctrl+Sを押すと出力が<a href="http://en.wikipedia.org/wiki/Flow_control">中断</a>されます。再開するには<b>Ctrl+Q</b>を押して下さい。</qt>
-
-
-
- UrlFilter
-
-
-
- リンクを開く (ctrl + click)
-
-
-
-
- パスを開く (ctrl + click)
-
-
-
- Vt102Emulation
-
-
-
- キーボード変換がありません。キー入力を端末に送信するための情報がありません。
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ PowerShell 5以降を使用してください!
QObject
-
+ 名前のないカラースキーム
-
+ アクセシブルカラースキーム
-
+ リンクを開く
-
+ リンクアドレスをコピー
-
+ メールを送信...
-
+ メールアドレスをコピー
-
+ パスを開く
-
+ 含まれるフォルダを開く
-
+ パスをコピー
@@ -3587,12 +3531,12 @@ PowerShell 5以降を使用してください!
QTermWidget
-
+ カラースキームエラー
-
+ カラースキームを読み込めません: %1
@@ -3915,6 +3859,13 @@ PowerShell 5以降を使用してください!
全ての一致箇所をハイライトする
+
+ Session
+
+
+ セッション '%1' でベル
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ PowerShell 5以降を使用してください!
SessionsWindow
-
+ TELNETエラー
-
+ TELNETエラー:
%1.
-
-
+
+ シリアルエラー
-
+
@@ -4279,133 +4230,133 @@ PowerShell 5以降を使用してください!
%1.
-
+ 生ソケットエラー
-
+ 生ソケットエラー:
%1.
-
+ 名前付きパイプエラー
-
+ 名前付きパイプエラー:
%1.
-
-
+
+ SSH2エラー
-
-
+
+ SSH2エラー:
%1.
-
-
+
+ URLを開く
-
-
+
+ URL %1 を開けません。
-
+ Zmodemを使用して送信するファイルを選択
-
+ 全てのファイル (*)
-
+ ローカル端末を開始
-
+ ローカル端末を開始できません:
%1.
-
+ シリアルポート %1 が削除されました。
-
+ ログを保存...
-
+ ログファイル (*.log)
-
+ ログを保存
-
-
-
+
+
+ ファイル %1 に書き込めません:
%2.
-
+ 生ログを保存...
-
+ バイナリファイル (*.bin)
-
+ 生ログを保存
-
+ セッションをアンロック
-
+ パスワードが間違っています!
-
+ ASCIIファイルを受信
@@ -4662,6 +4613,34 @@ PowerShell 5以降を使用してください!
転送情報
+
+ TerminalDisplay
+
+
+
+ サイズ: XXX x XXX
+
+
+
+
+ サイズ: %1 x %2
+
+
+
+
+ 複数行のテキストを貼り付ける
+
+
+
+
+ このテキストを貼り付けてもよろしいですか?
+
+
+
+
+ <qt>Ctrl+Sを押すと出力が<a href="http://en.wikipedia.org/wiki/Flow_control">中断</a>されます。再開するには<b>Ctrl+Q</b>を押して下さい。</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ PowerShell 5以降を使用してください!
%1 文字を上書き
+
+ UrlFilter
+
+
+
+ リンクを開く (ctrl + click)
+
+
+
+
+ パスを開く (ctrl + click)
+
+
+
+ Vt102Emulation
+
+
+
+ キーボード変換がありません。キー入力を端末に送信するための情報がありません。
+
+keyMapManager
diff --git a/lang/quardCRT_ko_KR.ts b/lang/quardCRT_ko_KR.ts
index 3f9bf470..aa08dd0f 100644
--- a/lang/quardCRT_ko_KR.ts
+++ b/lang/quardCRT_ko_KR.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ 툴바
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 경고
@@ -285,7 +285,7 @@
-
+ 준비 완료
@@ -464,7 +464,7 @@
-
+ 도움말
@@ -566,26 +566,27 @@
+ 연결할 호스트 입력 <Alt+R>
-
+ 모두 연결 해제
-
+ 모든 세션 연결 해제
-
+ 세션 복제
-
+ 현재 세션 복제 <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
세션 잠금
-
+ 세션 로그
-
+ 현재 세션의 로그 파일 생성
-
+ 세션 로그(원본)
-
+ 현재 세션의 원본 로그 파일 생성
-
+ 16진수 보기
-
+ 현재 세션의 16진수 보기 표시/숨기기
-
+ 종료
-
+ 애플리케이션 종료
-
+ 복사
-
+ 선택한 텍스트를 클립보드에 복사 <Command+C>
-
+ 선택한 텍스트를 클립보드에 복사 <Ctrl+Ins>
-
+ 붙여넣기
-
+ 클립보드 텍스트를 현재 세션에 붙여넣기 <Command+V>
-
+ 클립보드 텍스트를 현재 세션에 붙여넣기 <Shift+Ins>
-
+ 복사 및 붙여넣기
-
+ 선택한 텍스트를 클립보드에 복사하고 현재 세션에 붙여넣기
-
+ 모두 선택
-
+ 현재 세션의 모든 텍스트 선택 <Ctrl+Shift+A>
-
+ 찾기...
-
+ 현재 세션에서 텍스트 찾기 <Ctrl+F>
-
+ 스크린 샷
-
+ 현재 화면 인쇄
-
+ 스크린 샷
-
+ 현재 화면 스크린 샷 <Alt+P>
-
+ 세션 내보내기
-
+ 현재 세션을 파일로 내보내기 <Alt+O>
-
+ 스크롤백 지우기
-
+ 스크롤백 행의 내용 지우기
-
+ 화면 지우기
-
+ 현재 화면의 내용 지우기
-
+ 화면과 스크롤백 지우기
-
+ 화면과 스크롤백의 내용 지우기
-
+ 재설정
-
+ 터미널 에뮬레이터 재설정
-
+ 확대
-
+ 확대 <Ctrl+"=">
-
+ 축소
-
+ 축소 <Ctrl+"-">
-
-
+
+ 확대/축소 초기화
-
+ 레이아웃
-
+ 단일 레이아웃
-
+ 단일 레이아웃
-
+ 두 열 레이아웃
-
+ 두 열 레이아웃
-
+ 세 열 레이아웃
-
+ 세 열 레이아웃
-
+ 두 행 레이아웃
-
+ 두 행 레이아웃
-
+ 세 행 레이아웃
-
+ 세 행 레이아웃
-
+ 그리드 레이아웃
-
+ 그리드 레이아웃
-
+ 오른쪽 두 행 레이아웃
-
+ 오른쪽 두 행 레이아웃
-
+ 아래쪽 두 열 레이아웃
-
+ 아래쪽 두 열 레이아웃
-
+ 레이아웃 뒤집기
-
+ 레이아웃 뒤집기
-
+ 메뉴 바
-
+ 메뉴 바 표시/숨기기 <Alt+U>
-
+ 툴바 표시/숨기기
-
+ 상태 바
-
+ 상태 바 표시/숨기기
-
+ 명령 창
-
+ 명령 창 표시/숨기기
-
+ 연결 바
-
+ 연결 바 표시/숨기기
-
+ 사이드 창
-
+ 사이드 창 표시/숨기기
-
+ 창 투명도
-
+ 알파 투명도 사용/사용 안 함
-
+ 수직 스크롤 바
-
+ 수직 스크롤 바 표시/숨기기
-
+ 항상 위에 표시
-
+ 창을 항상 위에 표시
-
+ 전체 화면
-
+ 전체 화면 모드와 일반 모드 전환 <Alt+Enter>
-
+ 세션 옵션...
-
+ 세션 옵션 구성
-
+ 전역 옵션...
-
+ 전역 옵션 구성
-
+ 실시간 저장 옵션
-
+ 세션 옵션과 전역 옵션을 실시간으로 저장
-
+ 설정 지금 저장
-
+ 옵션 구성 지금 저장
-
+ ASCII 전송...
-
+ ASCII 파일 전송
-
+ ASCII 수신...
-
+ ASCII 파일 수신
-
+ 바이너리 전송...
-
+ 바이너리 파일 전송
-
+ Kermit 전송...
-
+ Kermit을 사용하여 파일 전송
-
+ Kermit 수신...
-
+ Kermit을 사용하여 파일 수신
-
+ Xmodem 전송...
-
+ Xmodem을 사용하여 파일 전송
-
+ Xmodem 수신...
-
+ Xmodem을 사용하여 파일 수신
-
+ Ymodem 전송...
-
+ Ymodem을 사용하여 파일 전송
-
+ Ymodem 수신...
-
+ Ymodem을 사용하여 파일 수신
-
+ Zmodem 파일 업로드 목록...
-
+ Zmodem 파일 업로드 목록 표시
-
+ Zmodem 파일 업로드 시작
-
+ Zmodem 파일 업로드 시작
-
+ TFTP 서버 시작
-
+ TFTP 서버 시작/중지
-
+ 실행...
-
+ 스크립트 실행
-
+ 취소
@@ -1213,759 +1214,759 @@
색상 변경
-
+ 스크립트 실행 취소
-
+ 스크립트 녹화 시작
-
+ 스크립트 녹화 시작
-
+ 스크립트 녹화 중지...
-
+ 스크립트 녹화 중지
-
+ 스크립트 녹화 취소
-
+ 스크립트 녹화 취소
-
+ 북마크 추가
-
+ 북마크 추가
-
-
+
+ 북마크 제거
-
+ 북마크 제거
-
-
+
+ 모든 북마크 지우기
-
+ 모든 북마크 지우기
-
+ 키맵 관리자
-
+ 키맵 편집기 표시
-
+ 공개 키 생성...
-
+ 공개 키 생성
-
+ 공개 키 관리자
-
+ 공개 키 관리자 표시
-
+ 내부 명령
-
+ 내부 명령 창 표시
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ 테마 색상
-
+ 테마 색상 설정, 기본값 사용하려면 취소
-
-
+
+ 키보드 단축키 참조
-
+ 키보드 단축키 참조 표시
-
-
+
+ 개인 정보 보호 정책
-
+ 개인 정보 보호 정책 표시
-
-
+
+ Python 정보
-
+ Python 정보 대화 상자 표시
-
+ 실험실
-
-
+
+ SSH 스캔
-
+ SSH 스캔 대화 상자 표시
-
+ 플러그인 메타데이터를 찾을 수 없습니다!
-
+ 플러그인 API 버전을 찾을 수 없습니다!
-
+ 플러그인 API 버전이 일치하지 않습니다!
-
+ 플러그인 메뉴를 찾을 수 없습니다!
-
+ 플러그인 초기화 실패!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 브로드캐스트 세션은 파일을 전송할 수 없습니다!
-
+ ASCII로 전송할 파일 선택
-
-
+
+ 텍스트 파일 (*.txt);;모든 파일 (*)
-
+ 수신된 데이터를 ASCII로 저장
-
+ 바이너리로 전송할 파일 선택
-
-
-
-
-
-
+
+
+
+
+
+ 모든 파일 (*)
-
+ Kermit을 사용하여 전송할 파일 선택
-
+ Xmodem을 사용하여 전송할 파일 선택
-
+ Xmodem을 사용하여 수신된 파일 저장
-
+ Ymodem을 사용하여 전송할 파일 선택
-
+ Zmodem을 사용하여 전송할 파일 선택
-
+ 스크립트 파일 선택
-
+ Python 파일 (*.py);;모든 파일 (*)
-
+ 색상 선택
-
+ 를 연결 해제하시겠습니까? "
-
+ " 세션?
-
+ 이 소프트웨어는 안전한 셸 (SSH) 연결, 텔넷 연결, 시리얼 포트 연결 및 기타 기능을 제공하는 터미널 에뮬레이터입니다.
-
+ 이 소프트웨어는 개인 정보를 수집하지 않으며 서버로 정보를 전송하지 않습니다.
-
+ 이 소프트웨어에는 악성 코드가 포함되어 있지 않으며 백도어도 포함되어 있지 않습니다.
-
+ 이 소프트웨어는 오픈 소스 소프트웨어이며, 소스 코드를 github 웹사이트에서 볼 수 있습니다.
-
+ 이 소프트웨어는 어떠한 보증도 없이 제공됩니다.
-
+ 질문이나 제안 사항이 있으면 작성자에게 문의하십시오.
-
+ 버전
-
+ 커밋
-
+ 날짜
-
-
+
+ 작성자
-
+ 웹사이트
-
+ 탭
-
+ 탭에 세션 정렬
-
+ 타일
-
+ 겹치지 않는 타일에 세션 정렬
-
+ 계단식
-
+ 서로 겹치도록 세션 정렬
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ 밝게
-
+ 밝은 테마로 전환
-
+ 어둡게
-
+ 어두운 테마로 전환
-
+ 도움말 표시
-
+ 업데이트 확인
-
+ 업데이트 확인
-
-
+
+ 정보
-
+ 정보 대화 상자 표시
-
+ Qt 정보
-
+ Qt 정보 대화 상자 표시
-
+ 플러그인 정보
-
+ 플러그인 정보 대화 상자 표시
-
+ 스크린 샷 저장 위치: %1
-
+ 스크린 샷 저장
-
+ 이미지 파일 (*.jpg)
-
-
+
+ 스크린 샷 저장 위치: %1
-
+ 세션 내보내기 저장
-
+ 텍스트 파일 (*.txt);;HTML 파일 (*.html)
-
+ 텍스트 파일 (*.txt)
-
+ HTML 파일 (*.html)
-
+ 세션 내보내기 저장 위치: %1
-
+ 세션 내보내기 저장 위치: %1
-
+ 디렉터리 선택
-
+ 북마크 선택
-
+ 모든 북마크를 지우시겠습니까?
-
+ 포트
-
+ 비디오 배경이 활성화되었습니다. 전역 옵션에서 애니메이션을 활성화하거나(시스템 리소스가 더 필요함) 배경 이미지를 변경하십시오.
-
+ 세션 정보 가져오기 실패.
-
+
-
+ 텔넷
-
+ 시리얼 -
-
+ 시리얼
-
+ Raw -
-
+ Raw
-
+ 네임 파이프 -
-
+ 네임 파이프
-
-
+
+ 로컬 쉘
-
+ 로컬 쉘 -
-
+ 전역 단축키:
-
+ 메뉴 바 표시/숨기기
-
+ 로컬 쉘에 연결
-
+ 현재 세션 복제
-
+ STD 모드로 UI 전환
-
+ MINI 모드로 UI 전환
-
+ 이전 세션으로 전환
-
+ 다음 세션으로 전환
-
+ 세션 [num]으로 전환
-
+ 줄 시작으로 이동
-
+ 줄 끝으로 이동
-
+ 아직 잠금 해제되지 않은 세션이 있습니다. 먼저 잠금을 해제하십시오.
-
+ 종료하시겠습니까?
@@ -2707,8 +2708,8 @@
-
-
+
+ 경고
@@ -2745,7 +2746,7 @@ PowerShell 5 이상을 사용하십시오!
-
+ 기본 로컬 쉘이 유효한 파일이 아닙니다!
@@ -2795,7 +2796,7 @@ PowerShell 5 이상을 사용하십시오!
전송
-
+ 사용자 플러그인 경로가 디렉터리가 아닙니다!
@@ -2869,93 +2870,36 @@ PowerShell 5 이상을 사용하십시오!
내부 명령어
-
+ 복사
-
+ 붙여넣기
-
+ 모두 선택
-
+ 찾기
-
+ 확대
-
+ 축소
-
- Session
-
-
-
- '%1' 세션에서 벨
-
-
-
- TerminalDisplay
-
-
-
- 크기: XXX x XXX
-
-
-
-
- 크기: %1 x %2
-
-
-
-
- 여러 줄 텍스트 붙여넣기
-
-
-
-
- 이 텍스트를 붙여넣으시겠습니까?
-
-
-
-
- <qt>Ctrl+S를 눌러 출력이 <a href="http://en.wikipedia.org/wiki/Flow_control">중지</a>되었습니다. 재개하려면 <b>Ctrl+Q</b>를 누르십시오.</qt>
-
-
-
- UrlFilter
-
-
-
- 링크 따라가기 (ctrl + 클릭)
-
-
-
-
- 경로 따라가기 (ctrl + 클릭)
-
-
-
- Vt102Emulation
-
-
-
- 사용 가능한 키보드 변환기가 없습니다. 키를 문자로 변환하여 터미널로 보내는 데 필요한 정보가 없습니다.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ PowerShell 5 이상을 사용하십시오!
QObject
-
+ 이름 없는 색상 구성표
-
+ 접근 가능한 색상 구성표
-
+ 링크 열기
-
+ 링크 주소 복사
-
+ 이메일 보내기...
-
+ 이메일 주소 복사
-
+ 경로 열기
-
+ 폴더 열기
-
+ 경로 복사
@@ -3587,12 +3531,12 @@ PowerShell 5 이상을 사용하십시오!
QTermWidget
-
+ 색상 구성표 오류
-
+ 색상 구성표를 불러올 수 없습니다: %1
@@ -3915,6 +3859,13 @@ PowerShell 5 이상을 사용하십시오!
모든 일치 항목 강조 표시
+
+ Session
+
+
+ '%1' 세션에서 벨
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ PowerShell 5 이상을 사용하십시오!
SessionsWindow
-
+ 텔넷 오류
-
+ 텔넷 오류:
%1.
-
-
+
+ 시리얼 오류
-
+
@@ -4279,133 +4230,133 @@ PowerShell 5 이상을 사용하십시오!
%1.
-
+ Raw 소켓 오류
-
+ Raw 소켓 오류:
%1.
-
+ 네임 파이프 오류
-
+ 네임 파이프 오류:
%1.
-
-
+
+ SSH2 오류
-
-
+
+ SSH2 오류:
%1.
-
-
+
+ URL 열기
-
-
+
+ %1 URL을 열 수 없습니다.
-
+ Zmodem을 사용하여 전송할 파일 선택
-
+ 모든 파일 (*)
-
+ 로컬 쉘 시작
-
+ 로컬 쉘을 시작할 수 없습니다:
%1.
-
+ 시리얼 포트 %1이 제거되었습니다.
-
+ 로그 저장...
-
+ 로그 파일 (*.log)
-
+ 로그 저장
-
-
-
+
+
+ %1 파일을 쓸 수 없습니다:
%2.
-
+ Raw 로그 저장...
-
+ 바이너리 파일 (*.bin)
-
+ Raw 로그 저장
-
+ 세션 잠금 해제
-
+ 잘못된 비밀번호!
-
+ ASCII 파일 받기
@@ -4662,6 +4613,34 @@ PowerShell 5 이상을 사용하십시오!
전송 정보
+
+ TerminalDisplay
+
+
+
+ 크기: XXX x XXX
+
+
+
+
+ 크기: %1 x %2
+
+
+
+
+ 여러 줄 텍스트 붙여넣기
+
+
+
+
+ 이 텍스트를 붙여넣으시겠습니까?
+
+
+
+
+ <qt>Ctrl+S를 눌러 출력이 <a href="http://en.wikipedia.org/wiki/Flow_control">중지</a>되었습니다. 재개하려면 <b>Ctrl+Q</b>를 누르십시오.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ PowerShell 5 이상을 사용하십시오!
%1 문자 덮어쓰기
+
+ UrlFilter
+
+
+
+ 링크 따라가기 (ctrl + 클릭)
+
+
+
+
+ 경로 따라가기 (ctrl + 클릭)
+
+
+
+ Vt102Emulation
+
+
+
+ 사용 가능한 키보드 변환기가 없습니다. 키를 문자로 변환하여 터미널로 보내는 데 필요한 정보가 없습니다.
+
+keyMapManager
diff --git a/lang/quardCRT_pt_BR.ts b/lang/quardCRT_pt_BR.ts
index df7f5b33..8bbd4c8c 100644
--- a/lang/quardCRT_pt_BR.ts
+++ b/lang/quardCRT_pt_BR.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Barra de ferramentas
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Aviso
@@ -285,7 +285,7 @@
-
+ Pronto
@@ -464,7 +464,7 @@
-
+ Ajuda
@@ -566,26 +566,27 @@
+ Informe o host <Alt+R> para conectar
-
+ Desconectar todas
-
+ Desconectar todas as sessões
-
+ Clonar sessão
-
+ Clonar sessão atual <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Bloquear sessão
-
+ Log da sessão
-
+ Criar um arquivo de log para a sessão atual
-
+ Log bruto da sessão
-
+ Criar um arquivo de log bruto para a sessão atual
-
+ Visualização hexadecimal
-
+ Mostrar/Ocultar visualização hexadecimal para a sessão atual
-
+ Sair
-
+ Fechar o aplicativo
-
+ Copiar
-
+ Copiar o texto selecionado para a área de transferência <Command+C>
-
+ Copiar o texto selecionado para a área de transferência <Ctrl+Ins>
-
+ Colar
-
+ Colar o texto da área de transferência na sessão atual <Command+V>
-
+ Colar o texto da área de transferência na sessão atual <Shift+Ins>
-
+ Copiar e colar
-
+ Copiar o texto selecionado para a área de transferência e colar na sessão atual
-
+ Selecionar tudo
-
+ Selecionar todo o texto na sessão atual <Ctrl+Shift+A>
-
+ Localizar...
-
+ Localizar texto na sessão atual <Ctrl+F>
-
+ Imprimir tela
-
+ Imprimir tela atual
-
+ Captura de tela
-
+ Captura de tela da tela atual <Alt+P>
-
+ Exportar sessão
-
+ Exportar sessão atual para um arquivo <Alt+O>
-
+ Limpar rolagem
-
+ Limpar o conteúdo das linhas de rolagem
-
+ Limpar tela
-
+ Limpar o conteúdo da tela atual
-
+ Limpar tela e rolagem
-
+ Limpar o conteúdo da tela e rolagem
-
+ Redefinir
-
+ Redefinir emulador de terminal
-
+ Ampliar
-
+ Ampliar <Ctrl+"=">
-
+ Reduzir
-
+ Reduzir <Ctrl+"-">
-
-
+
+ Redefinir zoom
-
+ Layout
-
+ Layout único
-
+ Layout único
-
+ Layout de duas colunas
-
+ Layout de duas colunas
-
+ Layout de três colunas
-
+ Layout de três colunas
-
+ Layout de duas linhas
-
+ Layout de duas linhas
-
+ Layout de três linhas
-
+ Layout de três linhas
-
+ Layout de grade
-
+ Layout de grade
-
+ Layout de duas linhas à direita
-
+ Layout de duas linhas à direita
-
+ Layout de duas colunas na parte inferior
-
+ Layout de duas colunas na parte inferior
-
+ Virar layout
-
+ Virar layout
-
+ Barra de menu
-
+ Mostrar/Ocultar barra de menu <Alt+U>
-
+ Mostrar/Ocultar barra de ferramentas
-
+ Barra de status
-
+ Mostrar/Ocultar barra de status
-
+ Janela de comando
-
+ Mostrar/Ocultar janela de comando
-
+ Barra de conexão
-
+ Mostrar/Ocultar barra de conexão
-
+ Janela lateral
-
+ Mostrar/Ocultar janela lateral
-
+ Transparência das janelas
-
+ Ativar/Desativar transparência alfa
-
+ Barra de rolagem vertical
-
+ Mostrar/Ocultar barra de rolagem vertical
-
+ Sempre no topo
-
+ Mostrar janela sempre no topo
-
+ Tela cheia
-
+ Alternar entre tela cheia e modo normal <Alt+Enter>
-
+ Opções da sessão...
-
+ Configurar opções da sessão
-
+ Opções globais...
-
+ Configurar opções globais
-
+ Salvar opções em tempo real
-
+ Salvar opções da sessão e opções globais em tempo real
-
+ Salvar configurações agora
-
+ Salvar configuração de opções agora
-
+ Enviar ASCII...
-
+ Enviar arquivo ASCII
-
+ Receber ASCII...
-
+ Receber arquivo ASCII
-
+ Enviar binário...
-
+ Enviar arquivo binário
-
+ Enviar Kermit...
-
+ Enviar um arquivo usando Kermit
-
+ Receber Kermit...
-
+ Receber um arquivo usando Kermit
-
+ Enviar Xmodem...
-
+ Enviar um arquivo usando Xmodem
-
+ Receber Xmodem...
-
+ Receber um arquivo usando Xmodem
-
+ Enviar Ymodem...
-
+ Enviar um arquivo usando Ymodem
-
+ Receber Ymodem...
-
+ Receber um arquivo usando Ymodem
-
+ Lista de envio Zmodem...
-
+ Mostrar lista de envio de arquivos Zmodem
-
+ Iniciar envio Zmodem
-
+ Iniciar envio de arquivo Zmodem
-
+ Iniciar servidor TFTP
-
+ Iniciar/Parar o servidor TFTP
-
+ Executar...
-
+ Executar um script
-
+ Cancelar
@@ -1213,759 +1214,759 @@
Alterar cor
-
+ Cancelar execução de script
-
+ Iniciar gravação de script
-
+ Iniciar gravação de script
-
+ Parar gravação de script...
-
+ Parar gravação de script
-
+ Cancelar gravação de script
-
+ Cancelar gravação de script
-
+ Adicionar favorito
-
+ Adicionar um favorito
-
-
+
+ Remover favorito
-
+ Remover um favorito
-
-
+
+ Limpar todos os favoritos
-
+ Limpar todos os favoritos
-
+ Gerenciador de mapeamento de teclas
-
+ Mostrar editor de mapeamento de teclas
-
+ Criar chave pública...
-
+ Criar uma chave pública
-
+ Gerenciador de chaves públicas
-
+ Mostrar gerenciador de chaves públicas
-
+ Comando interno
-
+ Mostrar janela de comando interno
-
+ Aba
-
+ Organizar sessões em abas
-
+ Mosaico
-
+ Organizar sessões em mosaicos não sobrepostos
-
+ Cascata
-
+ Organizar sessões para se sobrepor umas às outras
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Claro
-
+ Mudar para o tema claro
-
+ Escuro
-
+ Mudar para o tema escuro
-
+ Cor do tema
-
+ Definir cor do tema, cancelar para usar o padrão
-
+ Mostrar ajuda
-
-
+
+ Referência de atalhos do teclado
-
+ Mostrar referência de atalhos do teclado
-
+ Verificar atualização
-
+ Verificar atualizações
-
-
+
+ Declaração de privacidade
-
+ Mostrar declaração de privacidade
-
-
+
+ Sobre
-
+ Mostrar diálogo sobre
-
+ Sobre o Qt
-
+ Mostrar diálogo sobre o Qt
-
-
+
+ Sobre o Python
-
+ Mostrar diálogo sobre o Python
-
+ Laboratório
-
-
+
+ Varredura SSH
-
+ Mostrar diálogo de varredura SSH
-
+ Informações do plugin
-
+ Mostrar diálogo de informações do plugin
-
+ Metadados do plugin não encontrados!
-
+ Versão da API do plugin não encontrada!
-
+ Versão da API do plugin não corresponde!
-
+ Menu do plugin não encontrado!
-
+ Falha na inicialização do plugin!
-
+ PrintScreen salvo em %1
-
+ Salvar captura de tela
-
+ Arquivos de imagem (*.jpg)
-
-
+
+ Captura de tela salva em %1
-
+ Salvar exportação de sessão
-
+ Arquivos de texto (*.txt);;Arquivos HTML (*.html)
-
+ Arquivos de texto (*.txt)
-
+ Arquivos HTML (*.html)
-
+ Exportação de sessão salva em %1
-
+ Falha ao salvar a exportação de sessão em %1
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ A sessão de transmissão não pode transferir arquivos!
-
+ Selecionar arquivos para enviar como ASCII
-
-
+
+ Arquivos de texto (*.txt);;Todos os arquivos (*)
-
+ Salvar dados recebidos como ASCII
-
+ Selecionar arquivos para enviar como BINÁRIO
-
-
-
-
-
-
+
+
+
+
+
+ Todos os arquivos (*)
-
+ Selecionar arquivos para enviar usando Kermit
-
+ Selecionar arquivos para enviar usando Xmodem
-
+ Salvar arquivos recebidos usando Xmodem
-
+ Selecionar arquivos para enviar usando Ymodem
-
+ Selecionar arquivos para enviar usando Zmodem
-
+ Selecione um arquivo de script
-
+ Arquivos Python (*.py);;Todos os arquivos (*)
-
+ Selecione um diretório
-
+ Selecione um favorito
-
+ Você tem certeza de que deseja limpar todos os favoritos?
-
+ Porta
-
+ Selecionar cor
-
+ O plano de fundo de vídeo está ativado, ative a animação nas opções globais (mais recursos do sistema) ou altere a imagem de fundo.
-
+ Falha ao obter informações da sessão.
-
+ Telnet -
-
+ Telnet
-
+ Serial -
-
+ Serial
-
+ Raw -
-
+ Raw
-
+ NamePipe -
-
+ NamePipe
-
-
+
+ Shell local
-
+ Shell local -
-
+ Este software é um emulador de terminal que fornece uma conexão shell segura (SSH), conexão telnet, conexão de porta serial e outras funções.
-
+ Este software não coleta nenhuma informação pessoal e não envia nenhuma informação para o servidor.
-
+ Este software não contém nenhum código malicioso e não contém nenhuma porta dos fundos.
-
+ Este software é um software de código aberto, você pode visualizar o código-fonte no site do github.
-
+ Este software é fornecido como está, sem qualquer garantia.
-
+ Se você tiver alguma dúvida ou sugestão, entre em contato com o autor.
-
+ Versão
-
+ Commit
-
+ Data
-
-
+
+ Autor
-
+ Você tem certeza de que deseja desconectar "
-
+ " sessão?
-
+ Site
-
+ Atalhos globais:
-
+ mostrar/ocultar barra de menu
-
+ conectar ao Shell local
-
+ clonar sessão atual
-
+ alternar interface do usuário para o modo STD
-
+ alternar interface do usuário para o modo MINI
-
+ alternar para a sessão anterior
-
+ alternar para a próxima sessão
-
+ alternar para a sessão [num]
-
+ Ir para o início da linha
-
+ Ir para o final da linha
-
+ Há sessões que ainda não foram desbloqueadas, desbloqueie-as primeiro.
-
+ Você tem certeza de que deseja sair?
@@ -2707,8 +2708,8 @@
-
-
+
+ Aviso
@@ -2745,7 +2746,7 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
-
+ O Shell local padrão não é um arquivo válido!
@@ -2795,7 +2796,7 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
Transferir
-
+ O caminho dos plugins do usuário não é um diretório!
@@ -2869,93 +2870,36 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
Comando interno
-
+ Copiar
-
+ Colar
-
+ Selecionar tudo
-
+ Localizar
-
+ Ampliar
-
+ Reduzir
-
- Session
-
-
-
- Sinal sonoro na sessão '%1'
-
-
-
- TerminalDisplay
-
-
-
- Tamanho: XXX x XXX
-
-
-
-
- Tamanho: %1 x %2
-
-
-
-
- Colar texto multilinha
-
-
-
-
- Você tem certeza de que deseja colar este texto?
-
-
-
-
- <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control">suspensa</a> pressionando Ctrl+S. Pressione <b>Ctrl+Q</b> para retomar.</qt>
-
-
-
- UrlFilter
-
-
-
- Seguir link (ctrl + clique)
-
-
-
-
- Seguir caminho (ctrl + clique)
-
-
-
- Vt102Emulation
-
-
-
- Nenhum tradutor de teclado disponível. As informações necessárias para converter as teclas pressionadas em caracteres a serem enviados ao terminal estão faltando.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
QObject
-
+ Esquema de cores sem nome
-
+ Esquema de cores acessível
-
+ Abrir link
-
+ Copiar endereço do link
-
+ Enviar e-mail para...
-
+ Copiar endereço de e-mail
-
+ Abrir caminho
-
+ Abrir pasta contendo
-
+ Copiar caminho
@@ -3587,12 +3531,12 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
QTermWidget
-
+ Erro no esquema de cores
-
+ Não é possível carregar o esquema de cores: %1
@@ -3915,6 +3859,13 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
Realçar todas as correspondências
+
+ Session
+
+
+ Sinal sonoro na sessão '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
SessionsWindow
-
+ Erro no Telnet
-
+ Erro no Telnet:
%1.
-
-
+
+ Erro serial
-
+
@@ -4279,133 +4230,133 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
%1.
-
+ Erro no soquete bruto
-
+ Erro no soquete bruto:
%1.
-
+ Erro no tubo nomeado
-
+ Erro no tubo nomeado:
%1.
-
-
+
+ Erro SSH2
-
-
+
+ Erro SSH2:
%1.
-
-
+
+ Abrir URL
-
-
+
+ Não é possível abrir a URL %1.
-
+ Selecionar arquivos para enviar usando Zmodem
-
+ Todos os arquivos (*)
-
+ Iniciar shell local
-
+ Não é possível iniciar o shell local:
%1.
-
+ A porta serial %1 foi removida.
-
+ Salvar log...
-
+ arquivos de log (*.log)
-
+ Salvar log
-
-
-
+
+
+ Não é possível escrever o arquivo %1:
%2.
-
+ Salvar log bruto...
-
+ arquivos binários (*.bin)
-
+ Salvar log bruto
-
+ Desbloquear sessão
-
+ Senha incorreta!
-
+ Receber arquivo ASCII
@@ -4662,6 +4613,34 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
Informações de transferência
+
+ TerminalDisplay
+
+
+
+ Tamanho: XXX x XXX
+
+
+
+
+ Tamanho: %1 x %2
+
+
+
+
+ Colar texto multilinha
+
+
+
+
+ Você tem certeza de que deseja colar este texto?
+
+
+
+
+ <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control">suspensa</a> pressionando Ctrl+S. Pressione <b>Ctrl+Q</b> para retomar.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ Se você precisar usar outro shell, crie uma sessão através de [conexão rápi
Sobrescrever %1 caracteres
+
+ UrlFilter
+
+
+
+ Seguir link (ctrl + clique)
+
+
+
+
+ Seguir caminho (ctrl + clique)
+
+
+
+ Vt102Emulation
+
+
+
+ Nenhum tradutor de teclado disponível. As informações necessárias para converter as teclas pressionadas em caracteres a serem enviados ao terminal estão faltando.
+
+keyMapManager
diff --git a/lang/quardCRT_ru_RU.ts b/lang/quardCRT_ru_RU.ts
index f2311b2d..39f336bf 100644
--- a/lang/quardCRT_ru_RU.ts
+++ b/lang/quardCRT_ru_RU.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ Панель инструментов
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Предупреждение
@@ -285,7 +285,7 @@
-
+ Готово
@@ -464,7 +464,7 @@
-
+ Помощь
@@ -566,26 +566,27 @@
+ Введите хост <Alt+R> для подключения
-
+ Отключить все
-
+ Отключить все сессии
-
+ Клонировать сессию
-
+ Клонировать текущую сессию <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
Блокировка сессии
-
+ Журнал сессии
-
+ Создать файл журнала для текущей сессии
-
+ Сырой журнал сессии
-
+ Создать сырой файл журнала для текущей сессии
-
+ Шестнадцатеричный просмотр
-
+ Показать/Скрыть шестнадцатеричный просмотр для текущей сессии
-
+ Выход
-
+ Выйти из приложения
-
+ Копировать
-
+ Копировать выделенный текст в буфер обмена <Command+C>
-
+ Копировать выделенный текст в буфер обмена <Ctrl+Ins>
-
+ Вставить
-
+ Вставить текст из буфера обмена в текущую сессию <Command+V>
-
+ Вставить текст из буфера обмена в текущую сессию <Shift+Ins>
-
+ Копировать и вставить
-
+ Копировать выделенный текст в буфер обмена и вставить в текущую сессию
-
+ Выделить все
-
+ Выделить весь текст в текущей сессии <Ctrl+Shift+A>
-
+ Найти...
-
+ Найти текст в текущей сессии <Ctrl+F>
-
+ Печать экрана
-
+ Печать текущего экрана
-
+ Снимок экрана
-
+ Снимок текущего экрана <Alt+P>
-
+ Экспорт сессии
-
+ Экспортировать текущую сессию в файл <Alt+O>
-
+ Очистить буфер прокрутки
-
+ Очистить содержимое строк буфера прокрутки
-
+ Очистить экран
-
+ Очистить содержимое текущего экрана
-
+ Очистить экран и буфер прокрутки
-
+ Очистить содержимое экрана и буфера прокрутки
-
+ Сбросить
-
+ Сбросить эмулятор терминала
-
+ Увеличить
-
+ Увеличить <Ctrl+"=">
-
+ Уменьшить
-
+ Уменьшить <Ctrl+"-">
-
-
+
+ Сбросить масштаб
-
+ Макет
-
+ Одиночный макет
-
+ Одиночный макет
-
+ Двухколоночный макет
-
+ Двухколоночный макет
-
+ Трехколоночный макет
-
+ Трехколоночный макет
-
+ Двухстрочный макет
-
+ Двухстрочный макет
-
+ Трехстрочный макет
-
+ Трехстрочный макет
-
+ Сеточный макет
-
+ Сеточный макет
-
+ Две строки справа
-
+ Две строки справа
-
+ Две колонки снизу
-
+ Две колонки снизу
-
+ Перевернуть макет
-
+ Перевернуть макет
-
+ Меню
-
+ Показать/Скрыть меню <Alt+U>
-
+ Показать/Скрыть панель инструментов
-
+ Строка состояния
-
+ Показать/Скрыть строку состояния
-
+ Окно команд
-
+ Показать/Скрыть окно команд
-
+ Панель подключения
-
+ Показать/Скрыть панель подключения
-
+ Боковое окно
-
+ Показать/Скрыть боковое окно
-
+ Прозрачность окон
-
+ Включить/Выключить альфа прозрачность
-
+ Вертикальная полоса прокрутки
-
+ Показать/Скрыть вертикальную полосу прокрутки
-
+ Поверх всех окон
-
+ Показать окно поверх всех окон
-
+ Полный экран
-
+ Переключиться между полноэкранным и нормальным режимом <Alt+Enter>
-
+ Настройки сессии...
-
+ Настроить параметры сессии
-
+ Глобальные настройки...
-
+ Настроить глобальные параметры
-
+ Настройки сохранения в реальном времени
-
+ Настройки сохранения сессии и глобальные настройки в реальном времени
-
+ Сохранить настройки сейчас
-
+ Сохранить конфигурацию настроек сейчас
-
+ Отправить ASCII...
-
+ Отправить файл ASCII
-
+ Принять ASCII...
-
+ Принять файл ASCII
-
+ Отправить бинарный файл...
-
+ Отправить бинарный файл
-
+ Отправить Kermit...
-
+ Отправить файл, используя Kermit
-
+ Принять Kermit...
-
+ Принять файл, используя Kermit
-
+ Отправить Xmodem...
-
+ Отправить файл, используя Xmodem
-
+ Принять Xmodem...
-
+ Принять файл, используя Xmodem
-
+ Отправить Ymodem...
-
+ Отправить файл, используя Ymodem
-
+ Принять Ymodem...
-
+ Принять файл, используя Ymodem
-
+ Список загрузки Zmodem...
-
+ Показать список загрузки файлов Zmodem
-
+ Начать загрузку Zmodem
-
+ Начать загрузку файла Zmodem
-
+ Запустить TFTP сервер
-
+ Запустить/Остановить TFTP сервер
-
+ Запустить...
-
+ Запустить скрипт
-
+ Отменить
@@ -1213,759 +1214,759 @@
Изменить цвет
-
+ Отменить выполнение скрипта
-
+ Начать запись скрипта
-
+ Начать запись скрипта
-
+ Остановить запись скрипта...
-
+ Остановить запись скрипта
-
+ Отменить запись скрипта
-
+ Отменить запись скрипта
-
+ Добавить закладку
-
+ Добавить закладку
-
-
+
+ Удалить закладку
-
+ Удалить закладку
-
-
+
+ Очистить все закладки
-
+ Очистить все закладки
-
+ Менеджер клавиатурных схем
-
+ Показать редактор клавиатурных схем
-
+ Создать публичный ключ...
-
+ Создать публичный ключ
-
+ Менеджер публичных ключей
-
+ Показать менеджер публичных ключей
-
+ Внутренняя команда
-
+ Показать окно внутренних команд
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ Цвет темы
-
+ Установить цвет темы, отменить для использования по умолчанию
-
-
+
+ Справочник по клавиатурным сокращениям
-
+ Показать справочник по клавиатурным сокращениям
-
-
+
+ Заявление о конфиденциальности
-
+ Показать заявление о конфиденциальности
-
-
+
+ О Python
-
+ Показать диалоговое окно о Python
-
+ Лаборатория
-
-
+
+ Сканирование SSH
-
+ Показать диалог сканирования SSH
-
+ Метаданные плагина не найдены!
-
+ Версия API плагина не найдена!
-
+ Версия API плагина не соответствует!
-
+ Меню плагина не найдено!
-
+ Ошибка инициализации плагина!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Сеанс широковещания не может передавать файлы!
-
+ Выберите файлы для отправки в виде ASCII
-
-
+
+ Текстовые файлы (*.txt);;Все файлы (*)
-
+ Сохранить полученные данные в виде ASCII
-
+ Выберите файлы для отправки в виде BINARY
-
-
-
-
-
-
+
+
+
+
+
+ Все файлы (*)
-
+ Выберите файлы для отправки с использованием Kermit
-
+ Выберите файлы для отправки с использованием Xmodem
-
+ Сохранить полученные файлы с использованием Xmodem
-
+ Выберите файлы для отправки с использованием Ymodem
-
+ Выберите файлы для отправки с использованием Zmodem
-
+ Выберите файл скрипта
-
+ Файлы Python (*.py);;Все файлы (*)
-
+ Выберите цвет
-
+ Вы уверены, что хотите отключиться от "
-
+ " сессии?
-
+ Это эмулятор терминала, который обеспечивает безопасное соединение по протоколу SSH, соединение по протоколу telnet, соединение с последовательным портом и другие функции.
-
+ Это программное обеспечение не собирает никакой личной информации и не отправляет никакую информацию на сервер.
-
+ Это программное обеспечение не содержит вредоносного кода и не содержит никаких задних дверей.
-
+ Это программное обеспечение с открытым исходным кодом, вы можете просмотреть исходный код на веб-сайте github.
-
+ Это программное обеспечение предоставляется "как есть", без каких-либо гарантий.
-
+ Если у вас есть какие-либо вопросы или предложения, пожалуйста, свяжитесь с автором.
-
+ Версия
-
+ Коммит
-
+ Дата
-
-
+
+ Автор
-
+ Вебсайт
-
+ Вкладка
-
+ Расположить сессии во вкладках
-
+
-
+ Расположить сессии в неперекрывающихся плитках
-
+ Каскад
-
+ Расположить сессии так, чтобы они перекрывали друг друга
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ Светлая
-
+ Переключиться на светлую тему
-
+ Темная
-
+ Переключиться на темную тему
-
+ Показать справку
-
+ Проверить обновления
-
+ Проверить наличие обновлений
-
-
+
+ О программе
-
+ Показать диалоговое окно "О программе"
-
+ О Qt
-
+ Показать диалоговое окно "О Qt"
-
+ Информация о плагине
-
+ Показать диалоговое окно информации о плагине
-
+ Снимок экрана сохранен в %1
-
+ Сохранить снимок экрана
-
+ Файлы изображений (*.jpg)
-
-
+
+ Снимок экрана сохранен в %1
-
+ Сохранить экспорт сессии
-
+ Текстовые файлы (*.txt);;HTML файлы (*.html)
-
+ Текстовые файлы (*.txt)
-
+ HTML файлы (*.html)
-
+ Экспорт сессии сохранен в %1
-
+ Экспорт сессии не удалось сохранить в %1
-
+ Выберите каталог
-
+ Выберите закладку
-
+ Вы уверены, что хотите очистить все закладки?
-
+ Порт
-
+ Включен видеофон, пожалуйста, включите анимацию в глобальных настройках (больше системных ресурсов) или измените фоновое изображение.
-
+ Не удалось получить информацию о сессии.
-
+ Телнет -
-
+ Телнет
-
+ Серийный порт -
-
+ Серийный порт
-
+ Raw -
-
+ Raw
-
+ Именованный канал -
-
+ Именованный канал
-
-
+
+ Локальная оболочка
-
+ Локальная оболочка -
-
+ Глобальные ярлыки:
-
+ показать/скрыть меню
-
+ подключиться к локальной оболочке
-
+ клонировать текущую сессию
-
+ переключить интерфейс в режим STD
-
+ переключить интерфейс в режим MINI
-
+ переключиться на предыдущую сессию
-
+ переключиться на следующую сессию
-
+ переключиться на сессию [num]
-
+ Перейти в начало строки
-
+ Перейти в конец строки
-
+ Есть сессии, которые еще не были разблокированы, пожалуйста, сначала разблокируйте их.
-
+ Вы уверены, что хотите выйти?
@@ -2707,8 +2708,8 @@
-
-
+
+ Предупреждение
@@ -2745,7 +2746,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+ Локальная оболочка по умолчанию не является допустимым файлом!
@@ -2795,7 +2796,7 @@ If you need to use another shell, please create a session through [quick-connect
Передача
-
+ Путь к пользовательским плагинам не является каталогом!
@@ -2869,93 +2870,36 @@ If you need to use another shell, please create a session through [quick-connect
Внутренняя команда
-
+ Копировать
-
+ Вставить
-
+ Выделить все
-
+ Найти
-
+ Увеличить
-
+ Уменьшить
-
- Session
-
-
-
- Сигнал в сессии '%1'
-
-
-
- TerminalDisplay
-
-
-
- Размер: XXX x XXX
-
-
-
-
- Размер: %1 x %2
-
-
-
-
- Вставить многострочный текст
-
-
-
-
- Вы уверены, что хотите вставить этот текст?
-
-
-
-
- <qt>Вывод был <a href="http://en.wikipedia.org/wiki/Flow_control">приостановлен</a> нажатием Ctrl+S. Нажмите <b>Ctrl+Q</b> для продолжения.</qt>
-
-
-
- UrlFilter
-
-
-
- Перейти по ссылке (ctrl + click)
-
-
-
-
- Перейти по пути (ctrl + click)
-
-
-
- Vt102Emulation
-
-
-
- Нет доступного переводчика клавиатуры. Недостающая информация для преобразования нажатий клавиш в символы для отправки в терминал.
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ If you need to use another shell, please create a session through [quick-connect
QObject
-
+ Безымянная цветовая схема
-
+ Доступная цветовая схема
-
+ Открыть ссылку
-
+ Копировать адрес ссылки
-
+ Отправить письмо на...
-
+ Копировать адрес электронной почты
-
+ Открыть путь
-
+ Открыть папку с содержимым
-
+ Копировать путь
@@ -3587,12 +3531,12 @@ If you need to use another shell, please create a session through [quick-connect
QTermWidget
-
+ Ошибка цветовой схемы
-
+ Не удается загрузить цветовую схему: %1
@@ -3915,6 +3859,13 @@ If you need to use another shell, please create a session through [quick-connect
Подсвечивать все совпадения
+
+ Session
+
+
+ Сигнал в сессии '%1'
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ If you need to use another shell, please create a session through [quick-connect
SessionsWindow
-
+ Ошибка Telnet
-
+ Ошибка Telnet:
%1.
-
-
+
+ Ошибка серийного порта
-
+
@@ -4279,133 +4230,133 @@ If you need to use another shell, please create a session through [quick-connect
%1.
-
+ Ошибка Raw Socket
-
+ Ошибка Raw Socket:
%1.
-
+ Ошибка именованного канала
-
+ Ошибка именованного канала:
%1.
-
-
+
+ Ошибка SSH2
-
-
+
+ Ошибка SSH2:
%1.
-
-
+
+ Открыть URL
-
-
+
+ Не удалось открыть URL %1.
-
+ Выберите файлы для отправки с использованием Zmodem
-
+ Все файлы (*)
-
+ Запустить локальную оболочку
-
+ Не удалось запустить локальную оболочку:
%1.
-
+ Серийный порт %1 был удален.
-
+ Сохранить журнал...
-
+ файлы журналов (*.log)
-
+ Сохранить журнал
-
-
-
+
+
+ Не удалось записать файл %1:
%2.
-
+ Сохранить Raw журнал...
-
+ бинарные файлы (*.bin)
-
+ Сохранить Raw журнал
-
+ Разблокировать сессию
-
+ Неверный пароль!
-
+ Получить ASCII файл
@@ -4662,6 +4613,34 @@ If you need to use another shell, please create a session through [quick-connect
Информация о передаче
+
+ TerminalDisplay
+
+
+
+ Размер: XXX x XXX
+
+
+
+
+ Размер: %1 x %2
+
+
+
+
+ Вставить многострочный текст
+
+
+
+
+ Вы уверены, что хотите вставить этот текст?
+
+
+
+
+ <qt>Вывод был <a href="http://en.wikipedia.org/wiki/Flow_control">приостановлен</a> нажатием Ctrl+S. Нажмите <b>Ctrl+Q</b> для продолжения.</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ If you need to use another shell, please create a session through [quick-connect
Перезапись %1 символов
+
+ UrlFilter
+
+
+
+ Перейти по ссылке (ctrl + click)
+
+
+
+
+ Перейти по пути (ctrl + click)
+
+
+
+ Vt102Emulation
+
+
+
+ Нет доступного переводчика клавиатуры. Недостающая информация для преобразования нажатий клавиш в символы для отправки в терминал.
+
+keyMapManager
diff --git a/lang/quardCRT_zh_CN.ts b/lang/quardCRT_zh_CN.ts
index 69f38ce6..ad58c43e 100644
--- a/lang/quardCRT_zh_CN.ts
+++ b/lang/quardCRT_zh_CN.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ 工具栏
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 警告
@@ -285,7 +285,7 @@
-
+ 就绪
@@ -464,7 +464,7 @@
-
+ 帮助
@@ -566,26 +566,27 @@
+ 输入主机地址 <Alt+R> 连接
-
+ 断开所有连接
-
+ 断开所有会话连接
-
+ 克隆会话
-
+ 克隆当前会话 <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
锁定会话
-
+ 记录日志
-
+ 为当前会话创建日志文件
-
+ 记录原始日志
-
+ 为当前会话创建原始日志文件
-
+ 十六进制视图
-
+ 显示/隐藏当前会话的十六进制视图
-
+ 退出
-
+ 退出应用程序
-
+ 复制
-
+ 复制选中的文本到剪贴板 <Command+C>
-
+ 复制选中的文本到剪贴板 <Ctrl+Ins>
-
+ 粘贴
-
+ 粘贴剪贴板文本到当前会话 <Command+V>
-
+ 粘贴剪贴板文本到当前会话 <Shift+Ins>
-
+ 复制并粘贴
-
+ 复制选中的文本到剪贴板并粘贴到当前会话
-
+ 全选
-
+ 选择当前会话中的所有文本 <Ctrl+Shift+A>
-
+ 查找...
-
+ 在当前会话中查找文本 <Ctrl+F>
-
+ 打印屏幕
-
+ 打印当前屏幕
-
+ 屏幕截图
-
+ 截屏当前屏幕 <Alt+P>
-
+ 会话导出
-
+ 导出当前会话到文件 <Alt+O>
-
+ 清除滚动行
-
+ 清除滚动行的内容
-
+ 清除屏幕
-
+ 清除当前屏幕的内容
-
+ 清除屏幕和滚动行
-
+ 清除屏幕和滚动行的内容
-
+ 重置
-
+ 重置终端仿真器
-
+ 放大
-
+ 放大 <Ctrl+"=">
-
+ 缩小
-
+ 缩小 <Ctrl+"-">
-
-
+
+ 重置缩放
-
+ 布局
-
+ 单列布局
-
+ 单列布局
-
+ 两列布局
-
+ 两列布局
-
+ 三列布局
-
+ 三列布局
-
+ 两行布局
-
+ 两行布局
-
+ 三行布局
-
+ 三行布局
-
+ 网格布局
-
+ 网格布局
-
+ 两行右侧布局
-
+ 两行右侧布局
-
+ 两列底部布局
-
+ 两列底部布局
-
+ 翻转布局
-
+ 翻转布局
-
+ 菜单栏
-
+ 显示/隐藏菜单栏 <Alt+U>
-
+ 显示/隐藏工具栏
-
+ 状态栏
-
+ 显示/隐藏状态栏
-
+ 命令窗口
-
+ 显示/隐藏命令窗口
-
+ 连接栏
-
+ 显示/隐藏连接栏
-
+ 侧边窗口
-
+ 显示/隐藏侧边窗口
-
+ 窗口透明度
-
+ 启用/禁用透明度
-
+ 垂直滚动条
-
+ 显示/隐藏垂直滚动条
-
+ 总在最前
-
+ 总在最前显示窗口
-
+ 全屏
-
+ 在全屏和正常模式之间切换 <Alt+Enter>
-
+ 会话选项...
-
+ 配置会话选项
-
+ 全局选项...
-
+ 配置全局选项
-
+ 实时保存选项
-
+ 实时保存会话选项和全局选项
-
+ 立即保存设置
-
+ 立即保存选项配置
-
+ 发送 ASCII...
-
+ 发送 ASCII 文件
-
+ 接收 ASCII...
-
+ 接收 ASCII 文件
-
+ 发送二进制...
-
+ 发送二进制文件
-
+ 发送 Kermit...
-
+ 使用 Kermit 发送文件
-
+ 接收 Kermit...
-
+ 使用 Kermit 接收文件
-
+ 发送 Xmodem...
-
+ 使用 Xmodem 发送文件
-
+ 接收 Xmodem...
-
+ 使用 Xmodem 接收文件
-
+ 发送 Ymodem...
-
+ 使用 Ymodem 发送文件
-
+ 接收 Ymodem...
-
+ 使用 Ymodem 接收文件
-
+ Zmodem 上传列表...
-
+ 显示 Zmodem 文件上传列表
-
+ 开始 Zmodem 上传
-
+ 开始 Zmodem 文件上传
-
+ 启动 TFTP 服务器
-
+ 启动/停止 TFTP 服务器
-
+ 运行...
-
+ 运行脚本
-
+ 取消
@@ -1213,759 +1214,759 @@
更改颜色
-
+ 取消脚本执行
-
+ 开始录制脚本
-
+ 开始录制脚本
-
+ 停止录制脚本...
-
+ 停止录制脚本
-
+ 取消录制脚本
-
+ 取消录制脚本
-
+ 添加书签
-
+ 添加书签
-
-
+
+ 删除书签
-
+ 删除书签
-
-
+
+ 清除所有书签
-
+ 清除所有书签
-
+ 键盘映射管理器
-
+ 显示键盘映射编辑器
-
+ 创建公钥...
-
+ 创建公钥
-
+ 公钥管理器
-
+ 显示公钥管理器
-
+ 内部命令
-
+ 显示内部命令窗口
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ 主题颜色
-
+ 设置主题颜色,取消使用默认值
-
-
+
+ 键盘快捷键参考
-
+ 显示键盘快捷键参考
-
-
+
+ 隐私声明
-
+ 显示隐私声明
-
-
+
+ 关于 Python
-
+ 显示关于 Python 对话框
-
+ 实验室
-
-
+
+ SSH 扫描
-
+ 显示 SSH 扫描对话框
-
+ 未找到插件元数据!
-
+ 未找到插件 API 版本!
-
+ 插件 API 版本不匹配!
-
+ 未找到插件菜单!
-
+ 插件初始化失败!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 广播会话无法传输文件!
-
+ 选择要发送的文件为 ASCII
-
-
+
+ 文本文件 (*.txt);;所有文件 (*)
-
+ 将接收的数据保存为 ASCII
-
+ 选择要发送的文件为二进制
-
-
-
-
-
-
+
+
+
+
+
+ 所有文件 (*)
-
+ 选择要使用 Kermit 发送的文件
-
+ 选择要使用 Xmodem 发送的文件
-
+ 使用 Xmodem 保存接收的文件
-
+ 选择要使用 Ymodem 发送的文件
-
+ 选择要使用 Zmodem 发送的文件
-
+ 选择一个脚本文件
-
+ Python 文件 (*.py);;所有文件 (*)
-
+ 选择颜色
-
+ 您确定要断开连接 "
-
+ " 会话?
-
+ 此软件是一个终端仿真器,提供安全外壳 (SSH) 连接、 Telnet 连接、串口连接和其他功能。
-
+ 此软件不收集任何个人信息,也不向服务器发送任何信息。
-
+ 此软件不包含任何恶意代码,也不包含任何后门。
-
+ 此软件是开源软件,您可以在 github 网站上查看源代码。
-
+ 此软件按原样提供,不提供任何保证。
-
+ 如果您有任何问题或建议,请联系作者。
-
+ 版本
-
+ 提交
-
+ 日期
-
-
+
+ 作者
-
+ 网站
-
+ 标签
-
+ 在标签中排列会话
-
+ 平铺
-
+ 在不重叠的平铺中排列会话
-
+ 层叠
-
+ 排列会话以彼此重叠
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ 明亮
-
+ 切换到明亮主题
-
+ 暗黑
-
+ 切换到暗黑主题
-
+ 显示帮助
-
+ 检查更新
-
+ 检查更新
-
-
+
+ 关于
-
+ 显示关于对话框
-
+ 关于 Qt
-
+ 显示关于 Qt 对话框
-
+ 插件信息
-
+ 显示插件信息窗口
-
+ 打印屏幕保存到 %1
-
+ 保存屏幕截图
-
+ 图像文件 (*.jpg)
-
-
+
+ 屏幕截图保存到 %1
-
+ 保存会话导出
-
+ 文本文件 (*.txt);;HTML 文件 (*.html)
-
+ 文本文件 (*.txt)
-
+ HTML 文件 (*.html)
-
+ 会话导出保存到 %1
-
+ 会话导出保存到 %1 失败
-
+ 选择一个目录
-
+ 选择一个书签
-
+ 您确定要清除所有书签吗?
-
+ 端口
-
+ 视频背景已启用,请在全局选项中启用动画(更多系统资源)或更改背景图像。
-
+ 会话信息获取失败。
-
+
-
+
-
+ 串行通讯 -
-
+ 串行通讯
-
+
-
+
-
+ 命名管道 -
-
+ 命名管道
-
-
+
+ 本机终端
-
+ 本机终端 -
-
+ 全局快捷键:
-
+ 显示/隐藏菜单栏
-
+ 连接到本机终端
-
+ 克隆当前会话
-
+ 切换 UI 到标准模式
-
+ 切换 UI 到迷你模式
-
+ 切换到上一个会话
-
+ 切换到下一个会话
-
+ 切换到会话 [num]
-
+ 跳转到行首
-
+ 跳转到行尾
-
+ 有会话尚未解锁,请先解锁。
-
+ 确定要退出吗?
@@ -2697,8 +2698,8 @@
-
-
+
+ 警告
@@ -2735,7 +2736,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+ 默认本地终端不是有效文件!
@@ -2785,7 +2786,7 @@ If you need to use another shell, please create a session through [quick-connect
传输
-
+ 用户插件路径不是一个目录!
@@ -2869,93 +2870,36 @@ If you need to use another shell, please create a session through [quick-connect
内部命令
-
+ 复制
-
+ 粘贴
-
+ 全选
-
+ 查找
-
+ 放大
-
+ 缩小
-
- Session
-
-
-
- 会话 '%1' 中的铃声
-
-
-
- TerminalDisplay
-
-
-
- 大小: XXX x XXX
-
-
-
-
- 大小: %1 x %2
-
-
-
-
- 粘贴多行文本
-
-
-
-
- 您确定要粘贴此文本吗?
-
-
-
-
- <qt>按下 Ctrl+S 已 <a href="http://en.wikipedia.org/wiki/Flow_control">挂起</a> 输出。按 <b>Ctrl+Q</b> 恢复。</qt>
-
-
-
- UrlFilter
-
-
-
- 跳转链接 (ctrl + 单击)
-
-
-
-
- 跳转路径 (ctrl + 单击)
-
-
-
- Vt102Emulation
-
-
-
- 没有可用的键盘转换器。缺少将按键转换为要发送到终端的字符所需的信息。
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ If you need to use another shell, please create a session through [quick-connect
QObject
-
+ 未命名的颜色方案
-
+ 可访问的颜色方案
-
+ 打开链接
-
+ 复制链接
-
+ 发送邮件到...
-
+ 复制邮件地址
-
+ 打开路径
-
+ 打开包含的文件夹
-
+ 复制路径
@@ -3587,12 +3531,12 @@ If you need to use another shell, please create a session through [quick-connect
QTermWidget
-
+ 颜色方案错误
-
+ 无法加载颜色方案:%1
@@ -3915,6 +3859,13 @@ If you need to use another shell, please create a session through [quick-connect
高亮显示所有匹配项
+
+ Session
+
+
+ 会话 '%1' 中的铃声
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ If you need to use another shell, please create a session through [quick-connect
SessionsWindow
-
+ TELNET 错误
-
+ TELNET 错误:
%1.
-
-
+
+ 串行通讯错误
-
+
@@ -4279,133 +4230,133 @@ If you need to use another shell, please create a session through [quick-connect
%1.
-
+ 原始套接字错误
-
+ 原始套接字错误:
%1.
-
+ 命名管道错误
-
+ 命名管道错误:
%1.
-
-
+
+ SSH2 错误
-
-
+
+ SSH2 错误:
%1.
-
-
+
+ 打开 URL
-
-
+
+ 无法打开 URL %1.
-
+ 选择要使用 Zmodem 发送的文件
-
+ 所有文件 (*)
-
+ 启动本机终端
-
+ 无法启动本机终端:
%1.
-
+ 串行端口 %1 已被移除。
-
+ 保存日志...
-
+ 日志文件 (*.log)
-
+ 保存日志
-
-
-
+
+
+ 无法写入文件 %1:
%2.
-
+ 保存原始日志...
-
+ 二进制文件 (*.bin)
-
+ 保存原始日志
-
+ 解锁会话
-
+ 密码错误!
-
+ 接收 ASCII 文件
@@ -4662,6 +4613,34 @@ If you need to use another shell, please create a session through [quick-connect
传输信息
+
+ TerminalDisplay
+
+
+
+ 大小: XXX x XXX
+
+
+
+
+ 大小: %1 x %2
+
+
+
+
+ 粘贴多行文本
+
+
+
+
+ 您确定要粘贴此文本吗?
+
+
+
+
+ <qt>按下 Ctrl+S 已 <a href="http://en.wikipedia.org/wiki/Flow_control">挂起</a> 输出。按 <b>Ctrl+Q</b> 恢复。</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ If you need to use another shell, please create a session through [quick-connect
覆盖 %1 字符
+
+ UrlFilter
+
+
+
+ 跳转链接 (ctrl + 单击)
+
+
+
+
+ 跳转路径 (ctrl + 单击)
+
+
+
+ Vt102Emulation
+
+
+
+ 没有可用的键盘转换器。缺少将按键转换为要发送到终端的字符所需的信息。
+
+keyMapManager
diff --git a/lang/quardCRT_zh_HK.ts b/lang/quardCRT_zh_HK.ts
index 87e60137..a801245f 100644
--- a/lang/quardCRT_zh_HK.ts
+++ b/lang/quardCRT_zh_HK.ts
@@ -13,7 +13,7 @@
CentralWidget
-
+ 工具欄
@@ -26,21 +26,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 警告
@@ -285,7 +285,7 @@
-
+ 就緒
@@ -464,7 +464,7 @@
-
+ 幫助
@@ -566,26 +566,27 @@
+ 輸入主機 <Alt+R> 連接
-
+ 斷開所有
-
+ 斷開所有會話
-
+ 克隆會話
-
+ 克隆當前會話 <Ctrl+Shift+T>
@@ -595,564 +596,564 @@
鎖定會話
-
+ 記錄日誌
-
+ 為當前會話創建日誌文件
-
+ 記錄原始日誌
-
+ 為當前會話創建原始日誌文件
-
+ 十六進制視圖
-
+ 顯示/隱藏當前會話的十六進制視圖
-
+ 退出
-
+ 退出應用程序
-
+ 複製
-
+ 將所選文本複製到剪貼板 <Command+C>
-
+ 將所選文本複製到剪貼板 <Ctrl+Ins>
-
+ 粘貼
-
+ 將剪貼板文本粘貼到當前會話 <Command+V>
-
+ 將剪貼板文本粘貼到當前會話 <Shift+Ins>
-
+ 複製和粘貼
-
+ 將所選文本複製到剪貼板並粘貼到當前會話
-
+ 全選
-
+ 選擇當前會話中的所有文本 <Ctrl+Shift+A>
-
+ 查找...
-
+ 在當前會話中查找文本 <Ctrl+F>
-
+ 打印屏幕
-
+ 打印當前屏幕
-
+ 屏幕截圖
-
+ 截圖當前屏幕 <Alt+P>
-
+ 會話導出
-
+ 將當前會話導出到文件 <Alt+O>
-
+ 清除滾動內容
-
+ 清除滾動行的內容
-
+ 清除屏幕
-
+ 清除當前屏幕的內容
-
+ 清除屏幕和滾動內容
-
+ 清除屏幕和滾動內容的內容
-
+ 重置
-
+ 重置終端仿真器
-
+ 放大
-
+ 放大 <Ctrl+"=">
-
+ 縮小
-
+ 縮小 <Ctrl+"-">
-
-
+
+ 重置縮放
-
+ 佈局
-
+ 單個佈局
-
+ 單個佈局
-
+ 兩列佈局
-
+ 兩列佈局
-
+ 三列佈局
-
+ 三列佈局
-
+ 兩行佈局
-
+ 兩行佈局
-
+ 三行佈局
-
+ 三行佈局
-
+ 網格佈局
-
+ 網格佈局
-
+ 兩行右側佈局
-
+ 兩行右側佈局
-
+ 兩列底部佈局
-
+ 兩列底部佈局
-
+ 翻轉佈局
-
+ 翻轉佈局
-
+ 菜單欄
-
+ 顯示/隱藏菜單欄 <Alt+U>
-
+ 顯示/隱藏工具欄
-
+ 狀態欄
-
+ 顯示/隱藏狀態欄
-
+ 命令窗口
-
+ 顯示/隱藏命令窗口
-
+ 連接欄
-
+ 顯示/隱藏連接欄
-
+ 側邊窗口
-
+ 顯示/隱藏側邊窗口
-
+ 窗口透明
-
+ 啟用/禁用alpha透明度
-
+ 垂直滾動條
-
+ 顯示/隱藏垂直滾動條
-
+ 總在最前
-
+ 總是顯示窗口在最上面
-
+ 全屏
-
+ 在全屏模式和正常模式之間切換 <Alt+Enter>
-
+ 會話選項...
-
+ 配置會話選項
-
+ 全局選項...
-
+ 配置全局選項
-
+ 實時保存選項
-
+ 實時保存會話選項和全局選項
-
+ 立即保存設置
-
+ 立即保存選項配置
-
+ 發送ASCII...
-
+ 發送ASCII文件
-
+ 接收ASCII...
-
+ 接收ASCII文件
-
+ 發送二進制...
-
+ 發送二進制文件
-
+ 發送Kermit...
-
+ 使用Kermit發送文件
-
+ 接收Kermit...
-
+ 使用Kermit接收文件
-
+ 發送Xmodem...
-
+ 使用Xmodem發送文件
-
+ 接收Xmodem...
-
+ 使用Xmodem接收文件
-
+ 發送Ymodem...
-
+ 使用Ymodem發送文件
-
+ 接收Ymodem...
-
+ 使用Ymodem接收文件
-
+ Zmodem上傳列表...
-
+ 顯示Zmodem文件上傳列表
-
+ 開始Zmodem上傳
-
+ 開始Zmodem文件上傳
-
+ 啟動TFTP服務器
-
+ 啟動/停止TFTP服務器
-
+ 運行...
-
+ 運行腳本
-
+ 取消
@@ -1213,759 +1214,759 @@
更改顏色
-
+ 取消腳本執行
-
+ 開始記錄腳本
-
+ 開始記錄腳本
-
+ 停止記錄腳本...
-
+ 停止記錄腳本
-
+ 取消記錄腳本
-
+ 取消記錄腳本
-
+ 添加書籤
-
+ 添加書籤
-
-
+
+ 刪除書籤
-
+ 刪除書籤
-
-
+
+ 清除所有書籤
-
+ 清除所有書籤
-
+ 鍵盤映射管理器
-
+ 顯示鍵盤映射編輯器
-
+ 創建公鑰...
-
+ 創建公鑰
-
+ 公鑰管理器
-
+ 顯示公鑰管理器
-
+ 內部命令
-
+ 顯示內部命令窗口
-
+ Português (Brasil)
-
+ Mudar para Português (Brasil)
-
+ Deutsch
-
+ Wechseln Sie zu Deutsch
-
+ čeština
-
+ Přepnout do češtiny
-
+ عربي
-
+ التبديل إلى العربية
-
+ 主題顏色
-
+ 設置主題顏色,取消使用默認值
-
-
+
+ 鍵盤快捷鍵參考
-
+ 顯示鍵盤快捷鍵參考
-
-
+
+ 隱私聲明
-
+ 顯示隱私聲明
-
-
+
+ 關於Python
-
+ 顯示關於Python對話框
-
+ 實驗室
-
-
+
+ SSH掃描
-
+ 顯示SSH掃描對話框
-
+ 未找到插件元數據!
-
+ 未找到插件api版本!
-
+ 插件api版本不匹配!
-
+ 未找到插件菜單!
-
+ 插件初始化失敗!
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 廣播會話無法傳輸文件!
-
+ 選擇要發送的文件為ASCII
-
-
+
+ 文本文件 (*.txt);;所有文件 (*)
-
+ 將接收的數據保存為ASCII
-
+ 選擇要發送的文件為二進制
-
-
-
-
-
-
+
+
+
+
+
+ 所有文件 (*)
-
+ 選擇要使用Kermit發送的文件
-
+ 選擇要使用Xmodem發送的文件
-
+ 使用Xmodem保存接收的文件
-
+ 選擇要使用Ymodem發送的文件
-
+ 選擇要使用Zmodem發送的文件
-
+ 選擇一個腳本文件
-
+ Python文件 (*.py);;所有文件 (*)
-
+ 選擇顏色
-
+ 您確定要斷開連接"
-
+ "會話?
-
+ 此軟件是一個終端仿真器,提供安全外殼(SSH)連接,telnet連接,串口連接和其他功能。
-
+ 此軟件不收集任何個人信息,也不向服務器發送任何信息。
-
+ 此軟件不包含任何惡意代碼,也不包含任何後門。
-
+ 此軟件是開源軟件,您可以在github網站上查看源代碼。
-
+ 此軟件按原樣提供,不提供任何保證。
-
+ 如果您有任何問題或建議,請聯繫作者。
-
+ 版本
-
+ 提交
-
+ 日期
-
-
+
+ 作者
-
+ 網站
-
+ 標籤
-
+ 在標籤中排列會話
-
+ 平鋪
-
+ 在不重疊的平鋪中排列會話
-
+ 級聯
-
+ 安排會話互相重疊
-
+ 简体中文
-
+ 切换到简体中文
-
+ 繁體中文
-
+ 切換到繁體中文
-
+ Русский
-
+ Переключиться на русский
-
+ 한국어
-
+ 한국어로 전환
-
+ 日本語
-
+ 日本語に切り替える
-
+ français
-
+ Passer au français
-
+ español
-
+ Cambiar a español
-
+
-
+
-
+ 明亮
-
+ 切換到明亮的主題
-
+ 暗黑
-
+ 切換到暗黑主題
-
+ 顯示幫助
-
+ 檢查更新
-
+ 檢查更新
-
-
+
+ 關於
-
+ 顯示關於對話框
-
+ 關於Qt
-
+ 顯示關於Qt對話框
-
+ 插件信息
-
+ 顯示插件信息對話框
-
+ PrintScreen保存到%1
-
+ 保存屏幕截圖
-
+ 圖像文件(*.jpg)
-
-
+
+ 屏幕截圖保存到%1
-
+ 保存會話導出
-
+ 文本文件(*.txt);;HTML文件(*.html)
-
+ 文本文件(*.txt)
-
+ HTML文件(*.html)
-
+ 會話導出保存到%1
-
+ 會話導出保存到%1失敗
-
+ 選擇一個目錄
-
+ 選擇一個書籤
-
+ 您確定要清除所有書籤嗎?
-
+ 端口
-
+ 視頻背景已啟用,請在全局選項中啟用動畫(更多系統資源)或更改背景圖像。
-
+ 會話信息獲取失敗。
-
+
-
+
-
+ 串口 -
-
+ 串口
-
+
-
+
-
+ 命名管道 -
-
+ 命名管道
-
-
+
+ 本地Shell
-
+ 本地Shell -
-
+ 全局快捷鍵:
-
+ 顯示/隱藏菜單欄
-
+ 連接到本地Shell
-
+ 克隆當前會話
-
+ 切換ui到STD模式
-
+ 切換ui到MINI模式
-
+ 切換到上一個會話
-
+ 切換到下一個會話
-
+ 切換到會話[num]
-
+ 跳轉到行首
-
+ 跳轉到行尾
-
+ 有會話尚未解鎖,請先解鎖它們。
-
+ 您確定要退出嗎?
@@ -2707,8 +2708,8 @@
-
-
+
+ 警告
@@ -2745,7 +2746,7 @@ If you need to use another shell, please create a session through [quick-connect
-
+ 默認本地終端不是有效文件!
@@ -2795,7 +2796,7 @@ If you need to use another shell, please create a session through [quick-connect
傳輸
-
+ 用戶插件路徑不是一個目錄!
@@ -2869,93 +2870,36 @@ If you need to use another shell, please create a session through [quick-connect
內部命令
-
+ 複製
-
+ 粘貼
-
+ 全選
-
+ 查找
-
+ 放大
-
+ 縮小
-
- Session
-
-
-
- 會話 '%1' 中的鈴聲
-
-
-
- TerminalDisplay
-
-
-
- 大小: XXX x XXX
-
-
-
-
- 大小: %1 x %2
-
-
-
-
- 粘貼多行文本
-
-
-
-
- 您確定要粘貼此文本嗎?
-
-
-
-
- <qt>通過按Ctrl+S已經<a href="http://en.wikipedia.org/wiki/Flow_control">暫停</a>輸出。 按<b>Ctrl+Q</b>恢復。</qt>
-
-
-
- UrlFilter
-
-
-
- 跳轉鏈接 (ctrl + 單擊)
-
-
-
-
- 跳轉路徑 (ctrl + 單擊)
-
-
-
- Vt102Emulation
-
-
-
- 沒有可用的鍵盤轉換器。 缺少將按鍵轉換為要發送到終端的字符所需的信息。
-
-LockSessionWindow
@@ -3484,47 +3428,47 @@ If you need to use another shell, please create a session through [quick-connect
QObject
-
+ 未命名的配色方案
-
+ 無障礙配色方案
-
+ 打開鏈接
-
+ 複製鏈接
-
+ 發送郵件給...
-
+ 複製郵件地址
-
+ 打開路徑
-
+ 打開包含的文件夾
-
+ 複製路徑
@@ -3587,12 +3531,12 @@ If you need to use another shell, please create a session through [quick-connect
QTermWidget
-
+ 配色方案錯誤
-
+ 無法加載配色方案:%1
@@ -3915,6 +3859,13 @@ If you need to use another shell, please create a session through [quick-connect
高亮所有匹配項
+
+ Session
+
+
+ 會話 '%1' 中的鈴聲
+
+SessionManagerTreeModel
@@ -4252,25 +4203,25 @@ If you need to use another shell, please create a session through [quick-connect
SessionsWindow
-
+ telnet錯誤
-
+ telnet錯誤:
%1。
-
-
+
+ 串口錯誤
-
+
@@ -4279,133 +4230,133 @@ If you need to use another shell, please create a session through [quick-connect
%1。
-
+ 原始套接字錯誤
-
+ 原始套接字錯誤:
%1。
-
+ 命名管道錯誤
-
+ 命名管道錯誤:
%1。
-
-
+
+ SSH2錯誤
-
-
+
+ SSH2錯誤:
%1。
-
-
+
+ 打開URL
-
-
+
+ 無法打開URL %1。
-
+ 選擇要使用Zmodem發送的文件
-
+ 所有文件 (*)
-
+ 啟動本地Shell
-
+ 無法啟動本地shell:
%1。
-
+ 串口%1已被移除。
-
+ 保存日誌...
-
+ 日誌文件(*.log)
-
+ 保存日誌
-
-
-
+
+
+ 無法寫入文件%1:
%2。
-
+ 保存原始日誌...
-
+ 二進制文件(*.bin)
-
+ 保存原始日誌
-
+ 解鎖會話
-
+ 密碼錯誤!
-
+ 接收ASCII文件
@@ -4662,6 +4613,34 @@ If you need to use another shell, please create a session through [quick-connect
傳輸信息
+
+ TerminalDisplay
+
+
+
+ 大小: XXX x XXX
+
+
+
+
+ 大小: %1 x %2
+
+
+
+
+ 粘貼多行文本
+
+
+
+
+ 您確定要粘貼此文本嗎?
+
+
+
+
+ <qt>通過按Ctrl+S已經<a href="http://en.wikipedia.org/wiki/Flow_control">暫停</a>輸出。 按<b>Ctrl+Q</b>恢復。</qt>
+
+UndoStack
@@ -4680,6 +4659,27 @@ If you need to use another shell, please create a session through [quick-connect
覆蓋%1字符
+
+ UrlFilter
+
+
+
+ 跳轉鏈接 (ctrl + 單擊)
+
+
+
+
+ 跳轉路徑 (ctrl + 單擊)
+
+
+
+ Vt102Emulation
+
+
+
+ 沒有可用的鍵盤轉換器。 缺少將按鍵轉換為要發送到終端的字符所需的信息。
+
+keyMapManager
diff --git a/lib/qtermwidget/BlockArray.cpp b/lib/qtermwidget/BlockArray.cpp
index dce84b66..28952fe4 100644
--- a/lib/qtermwidget/BlockArray.cpp
+++ b/lib/qtermwidget/BlockArray.cpp
@@ -1,24 +1,23 @@
/*
- This file is part of Konsole, an X terminal.
- Copyright (C) 2000 by Stephan Kulow
-
- Rewritten for QT4 by e_k , Copyright (C)2008
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
-
+ This file is part of Konsole, an X terminal.
+ Copyright (C) 2000 by Stephan Kulow
+
+ Rewritten for QT4 by e_k , Copyright (C)2008
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include
@@ -30,12 +29,12 @@
#include
#else if defined(Q_CC_MSVC)
#include
-#define dup _dup
-#define fileno _fileno
-#define write _write
-#define read _read
-#define close _close
-#define lseek _lseek
+#define dup _dup
+#define fileno _fileno
+#define write _write
+#define read _read
+#define close _close
+#define lseek _lseek
#define ftruncate _chsize
#endif
#else
@@ -48,34 +47,32 @@
static int blocksize = 0;
BlockArray::BlockArray()
- : size(0),
- current(size_t(-1)),
- index(size_t(-1)),
- lastmap(nullptr),
- lastmap_index(size_t(-1)),
- lastblock(nullptr), ion(-1),
- length(0)
-{
+ : size(0)
+ , current(size_t(-1))
+ , index(size_t(-1))
+ , lastmap(nullptr)
+ , lastmap_index(size_t(-1))
+ , lastblock(nullptr)
+ , ion(-1)
+ , length(0) {
// lastmap_index = index = current = size_t(-1);
if (blocksize == 0) {
-#if defined(Q_OS_WIN)
+ #if defined(Q_OS_WIN)
SYSTEM_INFO system_info;
GetSystemInfo(&system_info);
blocksize = ((sizeof(Block) / system_info.dwPageSize) + 1) * system_info.dwPageSize;
-#else
+ #else
blocksize = ((sizeof(Block) / getpagesize()) + 1) * getpagesize();
-#endif
+ #endif
}
}
-BlockArray::~BlockArray()
-{
+BlockArray::~BlockArray() {
setHistorySize(0);
Q_ASSERT(!lastblock);
}
-size_t BlockArray::append(Block * block)
-{
+size_t BlockArray::append(Block *block) {
if (!size) {
return size_t(-1);
}
@@ -110,8 +107,7 @@ size_t BlockArray::append(Block * block)
return current;
}
-size_t BlockArray::newBlock()
-{
+size_t BlockArray::newBlock() {
if (!size) {
return size_t(-1);
}
@@ -121,13 +117,11 @@ size_t BlockArray::newBlock()
return index + 1;
}
-Block * BlockArray::lastBlock() const
-{
- return lastblock;
+Block *BlockArray::lastBlock() const {
+ return lastblock;
}
-bool BlockArray::has(size_t i) const
-{
+bool BlockArray::has(size_t i) const {
if (i == index + 1) {
return true;
}
@@ -141,8 +135,7 @@ bool BlockArray::has(size_t i) const
return true;
}
-const Block * BlockArray::at(size_t i)
-{
+const Block *BlockArray::at(size_t i) {
if (i == index + 1) {
return lastblock;
}
@@ -156,9 +149,9 @@ const Block * BlockArray::at(size_t i)
return nullptr;
}
-// if (index - i >= length) {
-// return 0;
-// }
+ //if (index - i >= length) {
+ // return 0;
+ //}
size_t j = i; // (current - (index - i) + (index/size+1)*size) % size ;
@@ -166,9 +159,9 @@ const Block * BlockArray::at(size_t i)
unmap();
#if defined(Q_OS_WIN)
- Block * block = (Block *)VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
+ Block *block = (Block *)VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
#else
- Block * block = (Block *)mmap(nullptr, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize);
+ Block *block = (Block *)mmap(nullptr, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize);
#endif
if (block == (Block *)-1) {
@@ -182,30 +175,26 @@ const Block * BlockArray::at(size_t i)
return block;
}
-void BlockArray::unmap()
-{
+void BlockArray::unmap() {
if (lastmap) {
-#if defined(Q_OS_WIN)
- int res = 0;
- VirtualFree((VOID *) lastmap, 0, MEM_RELEASE );
-#else
+ #if defined(Q_OS_WIN)
+ VirtualFree((VOID *)lastmap, 0, MEM_RELEASE);
+ #else
int res = munmap((char *)lastmap, blocksize);
-#endif
if (res < 0) {
perror("munmap");
}
+ #endif
}
lastmap = nullptr;
lastmap_index = size_t(-1);
}
-bool BlockArray::setSize(size_t newsize)
-{
+bool BlockArray::setSize(size_t newsize) {
return setHistorySize(newsize * 1024 / blocksize);
}
-bool BlockArray::setHistorySize(size_t newsize)
-{
+bool BlockArray::setHistorySize(size_t newsize) {
if (size == newsize) {
return false;
}
@@ -216,7 +205,7 @@ bool BlockArray::setHistorySize(size_t newsize)
delete lastblock;
lastblock = nullptr;
if (ion >= 0) {
- close(ion);
+ close(ion);
}
ion = -1;
current = size_t(-1);
@@ -224,12 +213,12 @@ bool BlockArray::setHistorySize(size_t newsize)
}
if (!size) {
- FILE * tmp = tmpfile();
+ FILE *tmp = tmpfile();
if (!tmp) {
perror("konsole: cannot open temp file.\n");
} else {
ion = dup(fileno(tmp));
- if (ion<0) {
+ if (ion < 0) {
perror("konsole: cannot dup temp file.\n");
fclose(tmp);
}
@@ -251,7 +240,7 @@ bool BlockArray::setHistorySize(size_t newsize)
return false;
} else {
decreaseBuffer(newsize);
- int f = ftruncate(ion, length*blocksize);
+ int f = ftruncate(ion, length * blocksize);
Q_UNUSED(f);
size = newsize;
@@ -259,8 +248,7 @@ bool BlockArray::setHistorySize(size_t newsize)
}
}
-void moveBlock(FILE * fion, int cursor, int newpos, char * buffer2)
-{
+void moveBlock(FILE *fion, int cursor, int newpos, char *buffer2) {
int res = fseek(fion, cursor * blocksize, SEEK_SET);
if (res) {
perror("fseek");
@@ -278,11 +266,10 @@ void moveBlock(FILE * fion, int cursor, int newpos, char * buffer2)
if (res != 1) {
perror("fwrite");
}
- // printf("moving block %d to %d\n", cursor, newpos);
+ //printf("moving block %d to %d\n", cursor, newpos);
}
-void BlockArray::decreaseBuffer(size_t newsize)
-{
+void BlockArray::decreaseBuffer(size_t newsize) {
if (index < newsize) { // still fits in whole
return;
}
@@ -294,11 +281,11 @@ void BlockArray::decreaseBuffer(size_t newsize)
}
// The Block constructor could do something in future...
- char * buffer1 = new char[blocksize];
+ char *buffer1 = new char[blocksize];
- FILE * fion = fdopen(dup(ion), "w+b");
+ FILE *fion = fdopen(dup(ion), "w+b");
if (!fion) {
- delete [] buffer1;
+ delete[] buffer1;
perror("fdopen/dup");
return;
}
@@ -311,7 +298,7 @@ void BlockArray::decreaseBuffer(size_t newsize)
}
size_t oldpos;
- for (size_t i = 0, cursor=firstblock; i < newsize; i++) {
+ for (size_t i = 0, cursor = firstblock; i < newsize; i++) {
oldpos = (size + cursor + offset) % size;
moveBlock(fion, oldpos, cursor, buffer1);
if (oldpos < newsize) {
@@ -324,13 +311,12 @@ void BlockArray::decreaseBuffer(size_t newsize)
current = newsize - 1;
length = newsize;
- delete [] buffer1;
+ delete[] buffer1;
fclose(fion);
}
-void BlockArray::increaseBuffer()
-{
+void BlockArray::increaseBuffer() {
if (index < size) { // not even wrapped once
return;
}
@@ -341,8 +327,8 @@ void BlockArray::increaseBuffer()
}
// The Block constructor could do something in future...
- char * buffer1 = new char[blocksize];
- char * buffer2 = new char[blocksize];
+ char *buffer1 = new char[blocksize];
+ char *buffer2 = new char[blocksize];
int runs = 1;
int bpr = size; // blocks per run
@@ -352,11 +338,11 @@ void BlockArray::increaseBuffer()
runs = offset;
}
- FILE * fion = fdopen(dup(ion), "w+b");
+ FILE *fion = fdopen(dup(ion), "w+b");
if (!fion) {
perror("fdopen/dup");
- delete [] buffer1;
- delete [] buffer2;
+ delete[] buffer1;
+ delete[] buffer2;
return;
}
@@ -373,7 +359,7 @@ void BlockArray::increaseBuffer()
perror("fread");
}
int newpos = 0;
- for (int j = 1, cursor=firstblock; j < bpr; j++) {
+ for (int j = 1, cursor = firstblock; j < bpr; j++) {
cursor = (cursor + offset) % size;
newpos = (cursor - offset + size) % size;
moveBlock(fion, cursor, newpos, buffer2);
@@ -390,9 +376,8 @@ void BlockArray::increaseBuffer()
current = size - 1;
length = size;
- delete [] buffer1;
- delete [] buffer2;
+ delete[] buffer1;
+ delete[] buffer2;
fclose(fion);
}
-
diff --git a/lib/qtermwidget/BlockArray.h b/lib/qtermwidget/BlockArray.h
index b3cc6de1..c93e2188 100644
--- a/lib/qtermwidget/BlockArray.h
+++ b/lib/qtermwidget/BlockArray.h
@@ -1,83 +1,78 @@
/*
- This file is part of Konsole, an X terminal.
- Copyright (C) 2000 by Stephan Kulow
-
- Rewritten for QT4 by e_k , Copyright (C)2008
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+ Copyright (C) 2000 by Stephan Kulow
+
+ Rewritten for QT4 by e_k , Copyright (C)2008
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef BLOCKARRAY_H
#define BLOCKARRAY_H
-
-//#error Do not use in KDE 2.1
-
-#define QTERMWIDGET_BLOCKSIZE (1 << 12)
-#define ENTRIES (QTERMWIDGET_BLOCKSIZE - sizeof(size_t))
+#define QTERMWIDGET_BLOCKSIZE (1 << 12)
+#define ENTRIES (QTERMWIDGET_BLOCKSIZE - sizeof(size_t))
struct Block {
unsigned char data[ENTRIES] = {};
size_t size = 0;
};
-// ///////////////////////////////////////////////////////
-
class BlockArray {
public:
/**
- * Creates a history file for holding
- * maximal size blocks. If more blocks
- * are requested, then it drops earlier
- * added ones.
- */
+ * Creates a history file for holding
+ * maximal size blocks. If more blocks
+ * are requested, then it drops earlier
+ * added ones.
+ */
BlockArray();
/// destructor
~BlockArray();
/**
- * adds the Block at the end of history.
- * This may drop other blocks.
- *
- * The ownership on the block is transferred.
- * An unique index number is returned for accessing
- * it later (if not yet dropped then)
- *
- * Note, that the block may be dropped completely
- * if history is turned off.
- */
+ * adds the Block at the end of history.
+ * This may drop other blocks.
+ *
+ * The ownership on the block is transferred.
+ * An unique index number is returned for accessing
+ * it later (if not yet dropped then)
+ *
+ * Note, that the block may be dropped completely
+ * if history is turned off.
+ */
size_t append(Block * block);
/**
- * gets the block at the index. Function may return
- * 0 if the block isn't available any more.
- *
- * The returned block is strictly readonly as only
- * mapped in memory - and will be invalid on the next
- * operation on this class.
- */
+ * gets the block at the index. Function may return
+ * 0 if the block isn't available any more.
+ *
+ * The returned block is strictly readonly as only
+ * mapped in memory - and will be invalid on the next
+ * operation on this class.
+ */
const Block * at(size_t index);
/**
- * reorders blocks as needed. If newsize is null,
- * the history is emptied completely. The indices
- * returned on append won't change their semantic,
- * but they may not be valid after this call.
- */
+ * reorders blocks as needed. If newsize is null,
+ * the history is emptied completely. The indices
+ * returned on append won't change their semantic,
+ * but they may not be valid after this call.
+ */
bool setHistorySize(size_t newsize);
size_t newBlock();
@@ -85,9 +80,9 @@ class BlockArray {
Block * lastBlock() const;
/**
- * Convenient function to set the size in KBytes
- * instead of blocks
- */
+ * Convenient function to set the size in KBytes
+ * instead of blocks
+ */
bool setSize(size_t newsize);
size_t len() const {
diff --git a/lib/qtermwidget/CharWidth.cpp b/lib/qtermwidget/CharWidth.cpp
index 0737f0f6..715ac274 100644
--- a/lib/qtermwidget/CharWidth.cpp
+++ b/lib/qtermwidget/CharWidth.cpp
@@ -1,36 +1,30 @@
#include "CharWidth.h"
-CharWidth::CharWidth(QFont font)
-{
+CharWidth::CharWidth(QFont font) {
fm = new QFontMetrics(font);
}
-CharWidth::~CharWidth()
-{
+CharWidth::~CharWidth() {
delete fm;
}
-void CharWidth::setFont(QFont font)
-{
+void CharWidth::setFont(QFont font) {
delete fm;
fm = new QFontMetrics(font);
}
-int CharWidth::font_width(wchar_t ucs)
-{
+int CharWidth::font_width(wchar_t ucs) {
if(ucs <= 0xffff)
return fm->horizontalAdvance(QString(QChar(ucs)),1)/fm->horizontalAdvance("0",1);
else
return unicode_width(ucs);
}
-int CharWidth::font_width(const QChar & c)
-{
+int CharWidth::font_width(const QChar & c) {
return fm->horizontalAdvance(c,1)/fm->horizontalAdvance("0",1);
}
-int CharWidth::string_font_width( const std::wstring & wstr )
-{
+int CharWidth::string_font_width( const std::wstring & wstr ) {
int width = 0;
for (auto & c : wstr) {
width += font_width(c);
@@ -38,8 +32,7 @@ int CharWidth::string_font_width( const std::wstring & wstr )
return width;
}
-int CharWidth::string_font_width( const QString & str )
-{
+int CharWidth::string_font_width( const QString & str ) {
int width = 0;
for (auto & c : str) {
width += font_width(c.unicode());
@@ -47,8 +40,7 @@ int CharWidth::string_font_width( const QString & str )
return width;
}
-int CharWidth::unicode_width(wchar_t ucs, bool fix_width)
-{
+int CharWidth::unicode_width(wchar_t ucs, bool fix_width) {
utf8proc_category_t cat = utf8proc_category( ucs );
if (cat == UTF8PROC_CATEGORY_CO) {
// Co: Private use area. libutf8proc makes them zero width, while tmux
@@ -65,13 +57,11 @@ int CharWidth::unicode_width(wchar_t ucs, bool fix_width)
return utf8proc_charwidth( ucs );
}
-int CharWidth::unicode_width(const QChar & c, bool fix_width)
-{
+int CharWidth::unicode_width(const QChar & c, bool fix_width) {
return unicode_width(c.unicode(),fix_width);
}
-int CharWidth::string_unicode_width(const std::wstring & wstr, bool fix_width)
-{
+int CharWidth::string_unicode_width(const std::wstring & wstr, bool fix_width) {
int width = 0;
for (auto & c : wstr) {
width += unicode_width(c,fix_width);
@@ -79,8 +69,7 @@ int CharWidth::string_unicode_width(const std::wstring & wstr, bool fix_width)
return width;
}
-int CharWidth::string_unicode_width(const QString & str, bool fix_width)
-{
+int CharWidth::string_unicode_width(const QString & str, bool fix_width) {
int width = 0;
for (auto & c : str) {
width += unicode_width(c.unicode(),fix_width);
diff --git a/lib/qtermwidget/Character.h b/lib/qtermwidget/Character.h
index d657e22f..4c8eaf4a 100644
--- a/lib/qtermwidget/Character.h
+++ b/lib/qtermwidget/Character.h
@@ -1,23 +1,23 @@
/*
- This file is part of Konsole, KDE's terminal.
-
- Copyright 2007-2008 by Robert Knight
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, KDE's terminal.
+
+ Copyright 2007-2008 by Robert Knight
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef CHARACTER_H
#define CHARACTER_H
@@ -55,105 +55,104 @@ static const int LINE_DOUBLEHEIGHT = (1 << 2);
class Character
{
public:
- /**
- * Constructs a new character.
- *
- * @param _c The unicode character value of this character.
- * @param _f The foreground color used to draw the character.
- * @param _b The color used to draw the character's background.
- * @param _r A set of rendition flags which specify how this character is to be drawn.
- */
- inline Character(quint16 _c = ' ',
+ /**
+ * Constructs a new character.
+ *
+ * @param _c The unicode character value of this character.
+ * @param _f The foreground color used to draw the character.
+ * @param _b The color used to draw the character's background.
+ * @param _r A set of rendition flags which specify how this character is to be drawn.
+ */
+ inline Character(quint16 _c = ' ',
CharacterColor _f = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR),
CharacterColor _b = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR),
quint8 _r = DEFAULT_RENDITION)
- : character(_c), rendition(_r), foregroundColor(_f), backgroundColor(_b) {}
+ : character(_c)
+ , rendition(_r)
+ , foregroundColor(_f)
+ , backgroundColor(_b) {
+
+ }
+
+ union
+ {
+ /** The unicode character value for this character. */
+ wchar_t character;
+ /**
+ * Experimental addition which allows a single Character instance to contain more than
+ * one unicode character.
+ *
+ * charSequence is a hash code which can be used to look up the unicode
+ * character sequence in the ExtendedCharTable used to create the sequence.
+ */
+ quint16 charSequence;
+ };
+
+ /** A combination of RENDITION flags which specify options for drawing the character. */
+ quint8 rendition;
+
+ /** The foreground color used to draw this character. */
+ CharacterColor foregroundColor;
+ /** The color used to draw this character's background. */
+ CharacterColor backgroundColor;
- union
- {
- /** The unicode character value for this character. */
- wchar_t character;
/**
- * Experimental addition which allows a single Character instance to contain more than
- * one unicode character.
- *
- * charSequence is a hash code which can be used to look up the unicode
- * character sequence in the ExtendedCharTable used to create the sequence.
+ * Returns true if this character has a transparent background when
+ * it is drawn with the specified @p palette.
+ */
+ bool isTransparent(const ColorEntry* palette) const;
+ /**
+ * Returns true if this character should always be drawn in bold when
+ * it is drawn with the specified @p palette, independent of whether
+ * or not the character has the RE_BOLD rendition flag.
+ */
+ ColorEntry::FontWeight fontWeight(const ColorEntry* base) const;
+
+ /**
+ * returns true if the format (color, rendition flag) of the compared characters is equal
*/
- quint16 charSequence;
- };
-
- /** A combination of RENDITION flags which specify options for drawing the character. */
- quint8 rendition;
-
- /** The foreground color used to draw this character. */
- CharacterColor foregroundColor;
- /** The color used to draw this character's background. */
- CharacterColor backgroundColor;
-
- /**
- * Returns true if this character has a transparent background when
- * it is drawn with the specified @p palette.
- */
- bool isTransparent(const ColorEntry* palette) const;
- /**
- * Returns true if this character should always be drawn in bold when
- * it is drawn with the specified @p palette, independent of whether
- * or not the character has the RE_BOLD rendition flag.
- */
- ColorEntry::FontWeight fontWeight(const ColorEntry* base) const;
-
- /**
- * returns true if the format (color, rendition flag) of the compared characters is equal
- */
- bool equalsFormat(const Character &other) const;
-
- /**
- * Compares two characters and returns true if they have the same unicode character value,
- * rendition and colors.
- */
- friend bool operator == (const Character& a, const Character& b);
- /**
- * Compares two characters and returns true if they have different unicode character values,
- * renditions or colors.
- */
- friend bool operator != (const Character& a, const Character& b);
+ bool equalsFormat(const Character &other) const;
+
+ /**
+ * Compares two characters and returns true if they have the same unicode character value,
+ * rendition and colors.
+ */
+ friend bool operator == (const Character& a, const Character& b);
+ /**
+ * Compares two characters and returns true if they have different unicode character values,
+ * renditions or colors.
+ */
+ friend bool operator != (const Character& a, const Character& b);
};
-inline bool operator == (const Character& a, const Character& b)
-{
- return a.character == b.character &&
- a.rendition == b.rendition &&
- a.foregroundColor == b.foregroundColor &&
- a.backgroundColor == b.backgroundColor;
+inline bool operator == (const Character& a, const Character& b) {
+ return a.character == b.character &&
+ a.rendition == b.rendition &&
+ a.foregroundColor == b.foregroundColor &&
+ a.backgroundColor == b.backgroundColor;
}
-inline bool operator != (const Character& a, const Character& b)
-{
- return a.character != b.character ||
- a.rendition != b.rendition ||
- a.foregroundColor != b.foregroundColor ||
- a.backgroundColor != b.backgroundColor;
+inline bool operator != (const Character& a, const Character& b) {
+ return a.character != b.character ||
+ a.rendition != b.rendition ||
+ a.foregroundColor != b.foregroundColor ||
+ a.backgroundColor != b.backgroundColor;
}
-inline bool Character::isTransparent(const ColorEntry* base) const
-{
- return ((backgroundColor._colorSpace == COLOR_SPACE_DEFAULT) &&
- base[backgroundColor._u+0+(backgroundColor._v?BASE_COLORS:0)].transparent)
- || ((backgroundColor._colorSpace == COLOR_SPACE_SYSTEM) &&
- base[backgroundColor._u+2+(backgroundColor._v?BASE_COLORS:0)].transparent);
+inline bool Character::isTransparent(const ColorEntry* base) const {
+ return ((backgroundColor._colorSpace == COLOR_SPACE_DEFAULT) &&
+ base[backgroundColor._u+0+(backgroundColor._v?BASE_COLORS:0)].transparent)
+ || ((backgroundColor._colorSpace == COLOR_SPACE_SYSTEM) &&
+ base[backgroundColor._u+2+(backgroundColor._v?BASE_COLORS:0)].transparent);
}
-inline bool Character::equalsFormat(const Character& other) const
-{
- return
- backgroundColor==other.backgroundColor &&
- foregroundColor==other.foregroundColor &&
- rendition==other.rendition;
+inline bool Character::equalsFormat(const Character& other) const {
+ return backgroundColor==other.backgroundColor &&
+ foregroundColor==other.foregroundColor &&
+ rendition==other.rendition;
}
-inline ColorEntry::FontWeight Character::fontWeight(const ColorEntry* base) const
-{
+inline ColorEntry::FontWeight Character::fontWeight(const ColorEntry* base) const {
if (backgroundColor._colorSpace == COLOR_SPACE_DEFAULT)
return base[backgroundColor._u+0+(backgroundColor._v?BASE_COLORS:0)].fontWeight;
else if (backgroundColor._colorSpace == COLOR_SPACE_SYSTEM)
@@ -162,9 +161,6 @@ inline ColorEntry::FontWeight Character::fontWeight(const ColorEntry* base) cons
return ColorEntry::UseCurrentFormat;
}
-extern unsigned short vt100_graphics[32];
-
-
/**
* A table which stores sequences of unicode characters, referenced
* by hash keys. The hash key itself is the same size as a unicode
diff --git a/lib/qtermwidget/CharacterColor.h b/lib/qtermwidget/CharacterColor.h
index eae90220..6dc16787 100644
--- a/lib/qtermwidget/CharacterColor.h
+++ b/lib/qtermwidget/CharacterColor.h
@@ -1,23 +1,23 @@
/*
- This file is part of Konsole, KDE's terminal.
-
- Copyright 2007-2008 by Robert Knight
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, KDE's terminal.
+
+ Copyright 2007-2008 by Robert Knight
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef CHARACTERCOLOR_H
#define CHARACTERCOLOR_H
@@ -40,56 +40,53 @@
class ColorEntry
{
public:
- /** Specifies the weight to use when drawing text with this color. */
- enum FontWeight
- {
- /** Always draw text in this color with a bold weight. */
- Bold,
- /** Always draw text in this color with a normal weight. */
- Normal,
+ /** Specifies the weight to use when drawing text with this color. */
+ enum FontWeight {
+ /** Always draw text in this color with a bold weight. */
+ Bold,
+ /** Always draw text in this color with a normal weight. */
+ Normal,
+ /**
+ * Use the current font weight set by the terminal application.
+ * This is the default behavior.
+ */
+ UseCurrentFormat
+ };
+
/**
- * Use the current font weight set by the terminal application.
- * This is the default behavior.
+ * Constructs a new color palette entry.
+ *
+ * @param c The color value for this entry.
+ * @param tr Specifies that the color should be transparent when used as a background color.
+ * @param weight Specifies the font weight to use when drawing text with this color.
*/
- UseCurrentFormat
- };
-
- /**
- * Constructs a new color palette entry.
- *
- * @param c The color value for this entry.
- * @param tr Specifies that the color should be transparent when used as a background color.
- * @param weight Specifies the font weight to use when drawing text with this color.
- */
- ColorEntry(QColor c, bool tr, FontWeight weight = UseCurrentFormat)
- : color(c), transparent(tr), fontWeight(weight) {}
-
- /**
- * Constructs a new color palette entry with an undefined color, and
- * with the transparent and bold flags set to false.
- */
- ColorEntry() : transparent(false), fontWeight(UseCurrentFormat) {}
-
- /** The color value of this entry for display. */
- QColor color;
-
- /**
- * If true character backgrounds using this color should be transparent.
- * This is not applicable when the color is used to render text.
- */
- bool transparent;
- /**
- * Specifies the font weight to use when drawing text with this color.
- * This is not applicable when the color is used to draw a character's background.
- */
- FontWeight fontWeight;
-};
+ ColorEntry(QColor c, bool tr, FontWeight weight = UseCurrentFormat)
+ : color(c), transparent(tr), fontWeight(weight) {}
+ /**
+ * Constructs a new color palette entry with an undefined color, and
+ * with the transparent and bold flags set to false.
+ */
+ ColorEntry() : transparent(false), fontWeight(UseCurrentFormat) {}
-// Attributed Character Representations ///////////////////////////////
+ /** The color value of this entry for display. */
+ QColor color;
+
+ /**
+ * If true character backgrounds using this color should be transparent.
+ * This is not applicable when the color is used to render text.
+ */
+ bool transparent;
+ /**
+ * Specifies the font weight to use when drawing text with this color.
+ * This is not applicable when the color is used to draw a character's background.
+ */
+ FontWeight fontWeight;
+};
-// Colors
+// Attributed Character Representations
+// Colors
#define BASE_COLORS (2+8)
#define INTENSITIES 2
#define TABLE_COLORS (INTENSITIES*BASE_COLORS)
@@ -99,7 +96,6 @@ class ColorEntry
//a standard set of colors using black text on a white background.
//defined in TerminalDisplay.cpp
-
extern const ColorEntry base_color_table[TABLE_COLORS];
/* CharacterColor is a union of the various color spaces.
@@ -117,7 +113,6 @@ extern const ColorEntry base_color_table[TABLE_COLORS];
Default colour space has two separate colours, namely
default foreground and default background colour.
*/
-
#define COLOR_SPACE_UNDEFINED 0
#define COLOR_SPACE_DEFAULT 1
#define COLOR_SPACE_SYSTEM 2
@@ -132,167 +127,158 @@ class CharacterColor
friend class Character;
public:
- /** Constructs a new CharacterColor whose color and color space are undefined. */
- CharacterColor()
- : _colorSpace(COLOR_SPACE_UNDEFINED),
- _u(0),
- _v(0),
- _w(0)
- {}
-
- /**
- * Constructs a new CharacterColor using the specified @p colorSpace and with
- * color value @p co
- *
- * The meaning of @p co depends on the @p colorSpace used.
- *
- * TODO : Document how @p co relates to @p colorSpace
- *
- * TODO : Add documentation about available color spaces.
- */
- CharacterColor(quint8 colorSpace, int co)
- : _colorSpace(colorSpace),
- _u(0),
- _v(0),
- _w(0)
- {
- switch (colorSpace)
- {
- case COLOR_SPACE_DEFAULT:
- _u = co & 1;
- break;
- case COLOR_SPACE_SYSTEM:
- _u = co & 7;
- _v = (co >> 3) & 1;
- break;
- case COLOR_SPACE_256:
- _u = co & 255;
- break;
- case COLOR_SPACE_RGB:
- _u = co >> 16;
- _v = co >> 8;
- _w = co;
- break;
- default:
- _colorSpace = COLOR_SPACE_UNDEFINED;
+ /** Constructs a new CharacterColor whose color and color space are undefined. */
+ CharacterColor()
+ : _colorSpace(COLOR_SPACE_UNDEFINED)
+ , _u(0)
+ , _v(0)
+ , _w(0) {
+
+ }
+
+ /**
+ * Constructs a new CharacterColor using the specified @p colorSpace and with
+ * color value @p co
+ *
+ * The meaning of @p co depends on the @p colorSpace used.
+ *
+ * TODO : Document how @p co relates to @p colorSpace
+ *
+ * TODO : Add documentation about available color spaces.
+ */
+ CharacterColor(quint8 colorSpace, int co)
+ : _colorSpace(colorSpace)
+ , _u(0)
+ , _v(0)
+ , _w(0) {
+ switch (colorSpace) {
+ case COLOR_SPACE_DEFAULT:
+ _u = co & 1;
+ break;
+ case COLOR_SPACE_SYSTEM:
+ _u = co & 7;
+ _v = (co >> 3) & 1;
+ break;
+ case COLOR_SPACE_256:
+ _u = co & 255;
+ break;
+ case COLOR_SPACE_RGB:
+ _u = co >> 16;
+ _v = co >> 8;
+ _w = co;
+ break;
+ default:
+ _colorSpace = COLOR_SPACE_UNDEFINED;
+ }
}
- }
-
- CharacterColor(quint8 colorSpace, QColor color)
- : _colorSpace(colorSpace),
- _u(0),
- _v(0),
- _w(0)
- {
- switch (colorSpace)
- {
- case COLOR_SPACE_RGB:
- _u = color.red();
- _v = color.green();
- _w = color.blue();
- break;
- default:
- _colorSpace = COLOR_SPACE_UNDEFINED;
+
+ CharacterColor(quint8 colorSpace, QColor color)
+ : _colorSpace(colorSpace)
+ , _u(0)
+ , _v(0)
+ , _w(0) {
+ switch (colorSpace) {
+ case COLOR_SPACE_RGB:
+ _u = color.red();
+ _v = color.green();
+ _w = color.blue();
+ break;
+ default:
+ _colorSpace = COLOR_SPACE_UNDEFINED;
+ break;
+ }
}
- }
- /**
- * Returns true if this character color entry is valid.
- */
- bool isValid() const
- {
+ /**
+ * Returns true if this character color entry is valid.
+ */
+ bool isValid() const {
return _colorSpace != COLOR_SPACE_UNDEFINED;
- }
-
- /**
- * Set the value of this color from a normal system color to the corresponding intensive
- * system color if it's not already an intensive system color.
- *
- * This is only applicable if the color is using the COLOR_SPACE_DEFAULT or COLOR_SPACE_SYSTEM
- * color spaces.
- */
- void setIntensive();
-
- /**
- * Returns the color within the specified color @p palette
- *
- * The @p palette is only used if this color is one of the 16 system colors, otherwise
- * it is ignored.
- */
- QColor color(const ColorEntry* palette) const;
-
- /**
- * Compares two colors and returns true if they represent the same color value and
- * use the same color space.
- */
- friend bool operator == (const CharacterColor& a, const CharacterColor& b);
- /**
- * Compares two colors and returns true if they represent different color values
- * or use different color spaces.
- */
- friend bool operator != (const CharacterColor& a, const CharacterColor& b);
+ }
+
+ /**
+ * Set the value of this color from a normal system color to the corresponding intensive
+ * system color if it's not already an intensive system color.
+ *
+ * This is only applicable if the color is using the COLOR_SPACE_DEFAULT or COLOR_SPACE_SYSTEM
+ * color spaces.
+ */
+ void setIntensive();
+
+ /**
+ * Returns the color within the specified color @p palette
+ *
+ * The @p palette is only used if this color is one of the 16 system colors, otherwise
+ * it is ignored.
+ */
+ QColor color(const ColorEntry* palette) const;
+
+ /**
+ * Compares two colors and returns true if they represent the same color value and
+ * use the same color space.
+ */
+ friend bool operator == (const CharacterColor& a, const CharacterColor& b);
+ /**
+ * Compares two colors and returns true if they represent different color values
+ * or use different color spaces.
+ */
+ friend bool operator != (const CharacterColor& a, const CharacterColor& b);
private:
- quint8 _colorSpace;
+ quint8 _colorSpace;
- // bytes storing the character color
- quint8 _u;
- quint8 _v;
- quint8 _w;
+ // bytes storing the character color
+ quint8 _u;
+ quint8 _v;
+ quint8 _w;
};
-inline bool operator == (const CharacterColor& a, const CharacterColor& b)
-{
- return a._colorSpace == b._colorSpace &&
- a._u == b._u &&
- a._v == b._v &&
- a._w == b._w;
+inline bool operator == (const CharacterColor& a, const CharacterColor& b) {
+ return a._colorSpace == b._colorSpace &&
+ a._u == b._u &&
+ a._v == b._v &&
+ a._w == b._w;
}
-inline bool operator != (const CharacterColor& a, const CharacterColor& b)
-{
+
+inline bool operator != (const CharacterColor& a, const CharacterColor& b) {
return !operator==(a,b);
}
-inline const QColor color256(quint8 u, const ColorEntry* base)
-{
- // 0.. 16: system colors
- if (u < 8) return base[u+2 ].color;
- u -= 8;
- if (u < 8) return base[u+2+BASE_COLORS].color;
- u -= 8;
-
- // 16..231: 6x6x6 rgb color cube
- if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
- ((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
- ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0);
- u -= 216;
-
- // 232..255: gray, leaving out black and white
- int gray = u*10+8; return QColor(gray,gray,gray);
+inline const QColor color256(quint8 u, const ColorEntry* base) {
+ // 0.. 16: system colors
+ if (u < 8) return base[u+2 ].color;
+ u -= 8;
+ if (u < 8) return base[u+2+BASE_COLORS].color;
+ u -= 8;
+
+ // 16..231: 6x6x6 rgb color cube
+ if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
+ ((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
+ ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0);
+ u -= 216;
+
+ // 232..255: gray, leaving out black and white
+ int gray = u*10+8; return QColor(gray,gray,gray);
}
-inline QColor CharacterColor::color(const ColorEntry* base) const
-{
- switch (_colorSpace)
- {
- case COLOR_SPACE_DEFAULT: return base[_u+0+(_v?BASE_COLORS:0)].color;
- case COLOR_SPACE_SYSTEM: return base[_u+2+(_v?BASE_COLORS:0)].color;
- case COLOR_SPACE_256: return color256(_u,base);
- case COLOR_SPACE_RGB: return {_u,_v,_w};
- case COLOR_SPACE_UNDEFINED: return QColor();
- }
-
- Q_ASSERT(false); // invalid color space
-
- return QColor();
+inline QColor CharacterColor::color(const ColorEntry* base) const {
+ switch (_colorSpace) {
+ case COLOR_SPACE_DEFAULT: return base[_u+0+(_v?BASE_COLORS:0)].color;
+ case COLOR_SPACE_SYSTEM: return base[_u+2+(_v?BASE_COLORS:0)].color;
+ case COLOR_SPACE_256: return color256(_u,base);
+ case COLOR_SPACE_RGB: return {_u,_v,_w};
+ case COLOR_SPACE_UNDEFINED: return QColor();
+ }
+
+ Q_ASSERT(false); // invalid color space
+
+ return QColor();
}
-inline void CharacterColor::setIntensive()
-{
- if (_colorSpace == COLOR_SPACE_SYSTEM || _colorSpace == COLOR_SPACE_DEFAULT)
- {
- _v = 1;
- }
+inline void CharacterColor::setIntensive() {
+ if (_colorSpace == COLOR_SPACE_SYSTEM || _colorSpace == COLOR_SPACE_DEFAULT) {
+ _v = 1;
+ }
}
#endif // CHARACTERCOLOR_H
diff --git a/lib/qtermwidget/ColorScheme.cpp b/lib/qtermwidget/ColorScheme.cpp
index dd61e487..ac25978b 100644
--- a/lib/qtermwidget/ColorScheme.cpp
+++ b/lib/qtermwidget/ColorScheme.cpp
@@ -1,91 +1,89 @@
/*
- This source file is part of Konsole, a terminal emulator.
+ This source file is part of Konsole, a terminal emulator.
- Copyright 2007-2008 by Robert Knight
+ Copyright 2007-2008 by Robert Knight
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include "ColorScheme.h"
#include "tools.h"
#include
+#include
#include
#include
-#include
-#include
-#include
-#include
#include
+#include
+#include
#include
+#include
-const ColorEntry ColorScheme::defaultTable[TABLE_COLORS] =
- // The following are almost IBM standard color codes, with some slight
- // gamma correction for the dim colors to compensate for bright X screens.
- // It contains the 8 ansiterm/xterm colors in 2 intensities.
-{
- ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry(
-QColor(0xFF,0xFF,0xFF), true), // Dfore, Dback
- ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry(
-QColor(0xB2,0x18,0x18), false), // Black, Red
- ColorEntry( QColor(0x18,0xB2,0x18), false), ColorEntry(
-QColor(0xB2,0x68,0x18), false), // Green, Yellow
- ColorEntry( QColor(0x18,0x18,0xB2), false), ColorEntry(
-QColor(0xB2,0x18,0xB2), false), // Blue, Magenta
- ColorEntry( QColor(0x18,0xB2,0xB2), false), ColorEntry(
-QColor(0xB2,0xB2,0xB2), false), // Cyan, White
+// The following are almost IBM standard color codes, with some slight
+// gamma correction for the dim colors to compensate for bright X screens.
+// It contains the 8 ansiterm/xterm colors in 2 intensities.
+const ColorEntry ColorScheme::defaultTable[TABLE_COLORS] = {
+ ColorEntry(QColor(0x00, 0x00, 0x00), false),
+ ColorEntry(QColor(0xFF, 0xFF, 0xFF), true) , // Dfore, Dback
+ ColorEntry(QColor(0x00, 0x00, 0x00), false),
+ ColorEntry(QColor(0xB2, 0x18, 0x18), false), // Black, Red
+ ColorEntry(QColor(0x18, 0xB2, 0x18), false),
+ ColorEntry(QColor(0xB2, 0x68, 0x18), false), // Green, Yellow
+ ColorEntry(QColor(0x18, 0x18, 0xB2), false),
+ ColorEntry(QColor(0xB2, 0x18, 0xB2), false), // Blue, Magenta
+ ColorEntry(QColor(0x18, 0xB2, 0xB2), false),
+ ColorEntry(QColor(0xB2, 0xB2, 0xB2), false), // Cyan, White
// intensive
- ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry(
-QColor(0xFF,0xFF,0xFF), true),
- ColorEntry( QColor(0x68,0x68,0x68), false), ColorEntry(
-QColor(0xFF,0x54,0x54), false),
- ColorEntry( QColor(0x54,0xFF,0x54), false), ColorEntry(
-QColor(0xFF,0xFF,0x54), false),
- ColorEntry( QColor(0x54,0x54,0xFF), false), ColorEntry(
-QColor(0xFF,0x54,0xFF), false),
- ColorEntry( QColor(0x54,0xFF,0xFF), false), ColorEntry(
-QColor(0xFF,0xFF,0xFF), false)
+ ColorEntry(QColor(0x00, 0x00, 0x00), false),
+ ColorEntry(QColor(0xFF, 0xFF, 0xFF), true) ,
+ ColorEntry(QColor(0x68, 0x68, 0x68), false),
+ ColorEntry(QColor(0xFF, 0x54, 0x54), false),
+ ColorEntry(QColor(0x54, 0xFF, 0x54), false),
+ ColorEntry(QColor(0xFF, 0xFF, 0x54), false),
+ ColorEntry(QColor(0x54, 0x54, 0xFF), false),
+ ColorEntry(QColor(0xFF, 0x54, 0xFF), false),
+ ColorEntry(QColor(0x54, 0xFF, 0xFF), false),
+ ColorEntry(QColor(0xFF, 0xFF, 0xFF), false),
};
-const char* const ColorScheme::colorNames[TABLE_COLORS] =
-{
- "Foreground",
- "Background",
- "Color0",
- "Color1",
- "Color2",
- "Color3",
- "Color4",
- "Color5",
- "Color6",
- "Color7",
- "ForegroundIntense",
- "BackgroundIntense",
- "Color0Intense",
- "Color1Intense",
- "Color2Intense",
- "Color3Intense",
- "Color4Intense",
- "Color5Intense",
- "Color6Intense",
- "Color7Intense"
+const char *const ColorScheme::colorNames[TABLE_COLORS] = {
+ "Foreground",
+ "Background",
+ "Color0",
+ "Color1",
+ "Color2",
+ "Color3",
+ "Color4",
+ "Color5",
+ "Color6",
+ "Color7",
+ "ForegroundIntense",
+ "BackgroundIntense",
+ "Color0Intense",
+ "Color1Intense",
+ "Color2Intense",
+ "Color3Intense",
+ "Color4Intense",
+ "Color5Intense",
+ "Color6Intense",
+ "Color7Intense"
};
+
// dummy silently comment out the tr_NOOP
#define tr_NOOP
-const char* const ColorScheme::translatedColorNames[TABLE_COLORS] =
-{
+const char *const ColorScheme::translatedColorNames[TABLE_COLORS] = {
tr_NOOP("Foreground"),
tr_NOOP("Background"),
tr_NOOP("Color 1"),
@@ -108,121 +106,123 @@ const char* const ColorScheme::translatedColorNames[TABLE_COLORS] =
tr_NOOP("Color 8 (Intense)")
};
-ColorScheme::ColorScheme()
-{
+ColorScheme::ColorScheme() {
_table = nullptr;
_randomTable = nullptr;
_opacity = 1.0;
}
-ColorScheme::ColorScheme(const ColorScheme& other)
- : _opacity(other._opacity)
- ,_table(nullptr)
- ,_randomTable(nullptr)
-{
+
+ColorScheme::ColorScheme(const ColorScheme &other)
+ : _opacity(other._opacity), _table(nullptr), _randomTable(nullptr) {
setName(other.name());
setDescription(other.description());
- if ( other._table != nullptr )
- {
- for ( int i = 0 ; i < TABLE_COLORS ; i++ )
- setColorTableEntry(i,other._table[i]);
+ if(other._table != nullptr) {
+ for (int i = 0; i < TABLE_COLORS; i++)
+ setColorTableEntry(i, other._table[i]);
}
- if ( other._randomTable != nullptr )
- {
- for ( int i = 0 ; i < TABLE_COLORS ; i++ )
- {
- const RandomizationRange& range = other._randomTable[i];
- setRandomizationRange(i,range.hue,range.saturation,range.value);
+ if(other._randomTable != nullptr) {
+ for(int i = 0; i < TABLE_COLORS; i++) {
+ const RandomizationRange &range = other._randomTable[i];
+ setRandomizationRange(i, range.hue, range.saturation, range.value);
}
}
}
-ColorScheme::~ColorScheme()
-{
+
+ColorScheme::~ColorScheme() {
delete[] _table;
delete[] _randomTable;
}
-void ColorScheme::setDescription(const QString& description) { _description = description; }
-QString ColorScheme::description() const { return _description; }
+void ColorScheme::setDescription(const QString &description) {
+ _description = description;
+}
+
+QString ColorScheme::description() const {
+ return _description;
+}
+
+void ColorScheme::setName(const QString &name) {
+ _name = name;
+}
-void ColorScheme::setName(const QString& name) { _name = name; }
-QString ColorScheme::name() const { return _name; }
+QString ColorScheme::name() const {
+ return _name;
+}
-void ColorScheme::setColorTableEntry(int index , const ColorEntry& entry)
-{
- Q_ASSERT( index >= 0 && index < TABLE_COLORS );
+void ColorScheme::setColorTableEntry(int index, const ColorEntry &entry) {
+ Q_ASSERT(index >= 0 && index < TABLE_COLORS);
- if ( !_table )
- {
+ if (!_table) {
_table = new ColorEntry[TABLE_COLORS];
- for (int i=0;i= 0 && index < TABLE_COLORS );
- ColorEntry entry = colorTable()[index];
+ColorEntry ColorScheme::colorEntry(int index) const {
+ Q_ASSERT(index >= 0 && index < TABLE_COLORS);
- if ( _randomTable != nullptr &&
- !_randomTable[index].isNull() )
- {
- const RandomizationRange& range = _randomTable[index];
+ ColorEntry entry = colorTable()[index];
+ if (_randomTable != nullptr && !_randomTable[index].isNull()) {
+ const RandomizationRange &range = _randomTable[index];
- int hueDifference = range.hue ? QRandomGenerator::global()->bounded(range.hue) - range.hue/2 : 0;
- int saturationDifference = range.saturation ? QRandomGenerator::global()->bounded(range.saturation) - range.saturation/2 : 0;
- int valueDifference = range.value ? QRandomGenerator::global()->bounded(range.value) - range.value/2 : 0;
+ int hueDifference = range.hue
+ ? QRandomGenerator::global()->bounded(range.hue) - range.hue / 2
+ : 0;
+ int saturationDifference = range.saturation
+ ? QRandomGenerator::global()->bounded(range.saturation) -
+ range.saturation / 2
+ : 0;
+ int valueDifference = range.value
+ ? QRandomGenerator::global()->bounded(range.value) - range.value / 2
+ : 0;
- QColor& color = entry.color;
+ QColor &color = entry.color;
- int newHue = qAbs( (color.hue() + hueDifference) % MAX_HUE );
- int newValue = qMin( qAbs(color.value() + valueDifference) , 255 );
- int newSaturation = qMin( qAbs(color.saturation() + saturationDifference) , 255 );
+ int newHue = qAbs((color.hue() + hueDifference) % MAX_HUE);
+ int newValue = qMin(qAbs(color.value() + valueDifference), 255);
+ int newSaturation = qMin(qAbs(color.saturation() + saturationDifference), 255);
- color.setHsv(newHue,newSaturation,newValue);
+ color.setHsv(newHue, newSaturation, newValue);
}
return entry;
}
-void ColorScheme::getColorTable(ColorEntry* table) const
-{
- for ( int i = 0 ; i < TABLE_COLORS ; i++ )
+
+void ColorScheme::getColorTable(ColorEntry *table) const {
+ for (int i = 0; i < TABLE_COLORS; i++)
table[i] = colorEntry(i);
}
-bool ColorScheme::randomizedBackgroundColor() const
-{
+
+bool ColorScheme::randomizedBackgroundColor() const {
return _randomTable == nullptr ? false : !_randomTable[1].isNull();
}
-void ColorScheme::setRandomizedBackgroundColor(bool randomize)
-{
+
+void ColorScheme::setRandomizedBackgroundColor(bool randomize) {
// the hue of the background colour is allowed to be randomly
// adjusted as much as possible.
//
// the value and saturation are left alone to maintain read-ability
- if ( randomize )
- {
- setRandomizationRange( 1 /* background color index */ , MAX_HUE , 255 , 0 );
- }
- else
- {
- if ( _randomTable )
- setRandomizationRange( 1 /* background color index */ , 0 , 0 , 0 );
+ if (randomize) {
+ setRandomizationRange(1 /* background color index */, MAX_HUE, 255, 0);
+ } else {
+ if (_randomTable)
+ setRandomizationRange(1 /* background color index */, 0, 0, 0);
}
}
-void ColorScheme::setRandomizationRange( int index , quint16 hue , quint8 saturation ,
- quint8 value )
-{
- Q_ASSERT( hue <= MAX_HUE );
- Q_ASSERT( index >= 0 && index < TABLE_COLORS );
+void ColorScheme::setRandomizationRange(int index, quint16 hue,
+ quint8 saturation, quint8 value) {
+ Q_ASSERT(hue <= MAX_HUE);
+ Q_ASSERT(index >= 0 && index < TABLE_COLORS);
- if ( _randomTable == nullptr )
+ if (_randomTable == nullptr)
_randomTable = new RandomizationRange[TABLE_COLORS];
_randomTable[index].hue = hue;
@@ -230,48 +230,52 @@ void ColorScheme::setRandomizationRange( int index , quint16 hue , quint8 satura
_randomTable[index].saturation = saturation;
}
-const ColorEntry* ColorScheme::colorTable() const
-{
- if ( _table )
+const ColorEntry *ColorScheme::colorTable() const {
+ if (_table)
return _table;
else
return defaultTable;
}
-QColor ColorScheme::foregroundColor() const
-{
- return colorTable()[0].color;
+
+QColor ColorScheme::foregroundColor() const {
+ return colorTable()[0].color;
}
-QColor ColorScheme::backgroundColor() const
-{
- return colorTable()[1].color;
+
+QColor ColorScheme::backgroundColor() const {
+ return colorTable()[1].color;
}
-bool ColorScheme::hasDarkBackground() const
-{
- // value can range from 0 - 255, with larger values indicating higher brightness.
- // so 127 is in the middle, anything less is deemed 'dark'
+
+bool ColorScheme::hasDarkBackground() const {
+ // value can range from 0 - 255, with larger values indicating higher
+ // brightness. so 127 is in the middle, anything less is deemed 'dark'
return backgroundColor().value() < 127;
}
-void ColorScheme::setOpacity(qreal opacity) { _opacity = opacity; }
-qreal ColorScheme::opacity() const { return _opacity; }
-void ColorScheme::read(const QString & fileName)
-{
+void ColorScheme::setOpacity(qreal opacity) {
+ _opacity = opacity;
+}
+
+qreal ColorScheme::opacity() const {
+ return _opacity;
+}
+
+void ColorScheme::read(const QString &fileName) {
QSettings s(fileName, QSettings::IniFormat);
s.beginGroup(QLatin1String("General"));
- _description = s.value(QLatin1String("Description"), QObject::tr("Un-named Color Scheme")).toString();
- _opacity = s.value(QLatin1String("Opacity"),qreal(1.0)).toDouble();
+ _description = s.value(QLatin1String("Description"),
+ QObject::tr("Un-named Color Scheme")).toString();
+ _opacity = s.value(QLatin1String("Opacity"), qreal(1.0)).toDouble();
s.endGroup();
- for (int i=0 ; i < TABLE_COLORS ; i++)
- {
+ for (int i = 0; i < TABLE_COLORS; i++) {
readColorEntry(&s, i);
}
}
+
#if 0
// implemented upstream - user apps
-void ColorScheme::read(KConfig& config)
-{
+void ColorScheme::read(KConfig& config) {
KConfigGroup configGroup = config.group("General");
QString description = configGroup.readEntry("Description", QObject::tr("Un-named Color Scheme"));
@@ -279,41 +283,37 @@ void ColorScheme::read(KConfig& config)
_description = tr(description.toUtf8());
_opacity = configGroup.readEntry("Opacity",qreal(1.0));
- for (int i=0 ; i < TABLE_COLORS ; i++)
- {
+ for (int i=0 ; i < TABLE_COLORS ; i++) {
readColorEntry(config,i);
}
}
-void ColorScheme::write(KConfig& config) const
-{
+
+void ColorScheme::write(KConfig& config) const {
KConfigGroup configGroup = config.group("General");
configGroup.writeEntry("Description",_description);
configGroup.writeEntry("Opacity",_opacity);
- for (int i=0 ; i < TABLE_COLORS ; i++)
- {
+ for (int i=0 ; i < TABLE_COLORS ; i++) {
RandomizationRange random = _randomTable != 0 ? _randomTable[i] : RandomizationRange();
writeColorEntry(config,colorNameForIndex(i),colorTable()[i],random);
}
}
#endif
-QString ColorScheme::colorNameForIndex(int index)
-{
- Q_ASSERT( index >= 0 && index < TABLE_COLORS );
+QString ColorScheme::colorNameForIndex(int index) {
+ Q_ASSERT(index >= 0 && index < TABLE_COLORS);
return QString::fromLatin1(colorNames[index]);
}
-QString ColorScheme::translatedColorNameForIndex(int index)
-{
- Q_ASSERT( index >= 0 && index < TABLE_COLORS );
+
+QString ColorScheme::translatedColorNameForIndex(int index) {
+ Q_ASSERT(index >= 0 && index < TABLE_COLORS);
return QString::fromLatin1(translatedColorNames[index]);
}
-void ColorScheme::readColorEntry(QSettings * s , int index)
-{
+void ColorScheme::readColorEntry(QSettings *s, int index) {
QString colorName = colorNameForIndex(index);
s->beginGroup(colorName);
@@ -326,12 +326,10 @@ void ColorScheme::readColorEntry(QSettings * s , int index)
bool ok = false;
// XXX: Undocumented(?) QSettings behavior: values with commas are parsed
// as QStringList and others QString
- if (colorValue.typeId() == QMetaType::QStringList)
- {
+ if (colorValue.typeId() == QMetaType::QStringList) {
QStringList rgbList = colorValue.toStringList();
colorStr = rgbList.join(QLatin1Char(','));
- if (rgbList.count() == 3)
- {
+ if (rgbList.count() == 3) {
bool parse_ok;
ok = true;
@@ -342,14 +340,12 @@ void ColorScheme::readColorEntry(QSettings * s , int index)
b = rgbList[2].toInt(&parse_ok);
ok = ok && parse_ok && (b >= 0 && b <= 0xff);
}
- }
- else
- {
+ } else {
colorStr = colorValue.toString();
- QRegularExpression hexColorPattern(QLatin1String("^#[0-9a-f]{6}$"),
- QRegularExpression::CaseInsensitiveOption);
- if (hexColorPattern.match(colorStr).hasMatch())
- {
+ QRegularExpression hexColorPattern(
+ QLatin1String("^#[0-9a-f]{6}$"),
+ QRegularExpression::CaseInsensitiveOption);
+ if (hexColorPattern.match(colorStr).hasMatch()) {
// Parsing is always ok as already matched by the regexp
r = QStringView{colorStr}.mid(1, 2).toInt(nullptr, 16);
g = QStringView{colorStr}.mid(3, 2).toInt(nullptr, 16);
@@ -357,15 +353,14 @@ void ColorScheme::readColorEntry(QSettings * s , int index)
ok = true;
}
}
- if (!ok)
- {
- qWarning().nospace() << "Invalid color value " << colorStr
- << " for " << colorName << ". Fallback to black.";
+ if (!ok) {
+ qWarning().nospace() << "Invalid color value " << colorStr << " for "
+ << colorName << ". Fallback to black.";
r = g = b = 0;
}
entry.color = QColor(r, g, b);
- entry.transparent = s->value(QLatin1String("Transparent"),false).toBool();
+ entry.transparent = s->value(QLatin1String("Transparent"), false).toBool();
// Deprecated key from KDE 4.0 which set 'Bold' to true to force
// a color to be bold or false to use the current format
@@ -373,37 +368,37 @@ void ColorScheme::readColorEntry(QSettings * s , int index)
// TODO - Add a new tri-state key which allows for bold, normal or
// current format
if (s->contains(QLatin1String("Bold")))
- entry.fontWeight = s->value(QLatin1String("Bold"),false).toBool() ? ColorEntry::Bold :
- ColorEntry::UseCurrentFormat;
+ entry.fontWeight = s->value(QLatin1String("Bold"), false).toBool()
+ ? ColorEntry::Bold
+ : ColorEntry::UseCurrentFormat;
- quint16 hue = s->value(QLatin1String("MaxRandomHue"),0).toInt();
- quint8 value = s->value(QLatin1String("MaxRandomValue"),0).toInt();
- quint8 saturation = s->value(QLatin1String("MaxRandomSaturation"),0).toInt();
+ quint16 hue = s->value(QLatin1String("MaxRandomHue"), 0).toInt();
+ quint8 value = s->value(QLatin1String("MaxRandomValue"), 0).toInt();
+ quint8 saturation = s->value(QLatin1String("MaxRandomSaturation"), 0).toInt();
- setColorTableEntry( index , entry );
+ setColorTableEntry(index, entry);
- if ( hue != 0 || value != 0 || saturation != 0 )
- setRandomizationRange( index , hue , saturation , value );
+ if (hue != 0 || value != 0 || saturation != 0)
+ setRandomizationRange(index, hue, saturation, value);
s->endGroup();
}
+
#if 0
// implemented upstream - user apps
-void ColorScheme::writeColorEntry(KConfig& config , const QString& colorName, const ColorEntry& entry , const RandomizationRange& random) const
-{
+void ColorScheme::writeColorEntry(KConfig& config , const QString& colorName,
+ const ColorEntry& entry , const RandomizationRange& random) const {
KConfigGroup configGroup(&config,colorName);
configGroup.writeEntry("Color",entry.color);
configGroup.writeEntry("Transparency",(bool)entry.transparent);
- if (entry.fontWeight != ColorEntry::UseCurrentFormat)
- {
+ if (entry.fontWeight != ColorEntry::UseCurrentFormat) {
configGroup.writeEntry("Bold",entry.fontWeight == ColorEntry::Bold);
}
// record randomization if this color has randomization or
// if one of the keys already exists
- if ( !random.isNull() || configGroup.hasKey("MaxRandomHue") )
- {
+ if ( !random.isNull() || configGroup.hasKey("MaxRandomHue") ) {
configGroup.writeEntry("MaxRandomHue",static_cast(random.hue));
configGroup.writeEntry("MaxRandomValue",static_cast(random.value));
configGroup.writeEntry("MaxRandomSaturation",static_cast(random.saturation));
@@ -438,9 +433,7 @@ void ColorScheme::writeColorEntry(KConfig& config , const QString& colorName, co
//
// -- Robert Knight 21/07/2007
//
-AccessibleColorScheme::AccessibleColorScheme()
- : ColorScheme()
-{
+AccessibleColorScheme::AccessibleColorScheme() : ColorScheme() {
#if 0
// It's not finished in konsole and it breaks Qt4 compilation as well
// basic attributes
@@ -452,8 +445,7 @@ AccessibleColorScheme::AccessibleColorScheme()
const KColorScheme colorScheme(QPalette::Active);
- QBrush colors[ColorRoleCount] =
- {
+ QBrush colors[ColorRoleCount] = {
colorScheme.foreground( colorScheme.NormalText ),
colorScheme.background( colorScheme.NormalBackground ),
@@ -465,8 +457,7 @@ AccessibleColorScheme::AccessibleColorScheme()
colorScheme.foreground( colorScheme.NeutralText )
};
- for ( int i = 0 ; i < TABLE_COLORS ; i++ )
- {
+ for ( int i = 0 ; i < TABLE_COLORS ; i++ ) {
ColorEntry entry;
entry.color = colors[ i % ColorRoleCount ].color();
@@ -475,88 +466,78 @@ AccessibleColorScheme::AccessibleColorScheme()
#endif
}
-ColorSchemeManager::ColorSchemeManager()
- : _haveLoadedAll(false)
-{
+ColorSchemeManager::ColorSchemeManager()
+ : _haveLoadedAll(false) {
+
}
-ColorSchemeManager::~ColorSchemeManager()
-{
- QHashIterator iter(_colorSchemes);
- while (iter.hasNext())
- {
+
+ColorSchemeManager::~ColorSchemeManager() {
+ QHashIterator iter(_colorSchemes);
+ while (iter.hasNext()) {
iter.next();
delete iter.value();
}
}
-void ColorSchemeManager::loadAllColorSchemes()
-{
+
+void ColorSchemeManager::loadAllColorSchemes() {
QList nativeColorSchemes = listColorSchemes();
QListIterator nativeIter(nativeColorSchemes);
- while ( nativeIter.hasNext() )
- {
- loadColorScheme( nativeIter.next() );
+ while (nativeIter.hasNext()) {
+ loadColorScheme(nativeIter.next());
}
_haveLoadedAll = true;
}
-QList ColorSchemeManager::allColorSchemes()
-{
- if ( !_haveLoadedAll )
- {
+
+QList ColorSchemeManager::allColorSchemes() {
+ if (!_haveLoadedAll) {
loadAllColorSchemes();
}
return _colorSchemes.values();
}
-bool ColorSchemeManager::loadCustomColorScheme(const QString& path)
-{
+bool ColorSchemeManager::loadCustomColorScheme(const QString &path) {
if (path.endsWith(QLatin1String(".colorscheme")))
return loadColorScheme(path);
return false;
}
-void ColorSchemeManager::addCustomColorSchemeDir(const QString& custom_dir)
-{
+void ColorSchemeManager::addCustomColorSchemeDir(const QString &custom_dir) {
add_custom_color_scheme_dir(custom_dir);
}
-bool ColorSchemeManager::loadColorScheme(const QString& filePath)
-{
- if ( !filePath.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(filePath) )
+bool ColorSchemeManager::loadColorScheme(const QString &filePath) {
+ if (!filePath.endsWith(QLatin1String(".colorscheme")) ||
+ !QFile::exists(filePath))
return false;
QFileInfo info(filePath);
- const QString& schemeName = info.baseName();
+ const QString &schemeName = info.baseName();
- ColorScheme* scheme = new ColorScheme();
+ ColorScheme *scheme = new ColorScheme();
scheme->setName(schemeName);
scheme->read(filePath);
- if (scheme->name().isEmpty())
- {
+ if (scheme->name().isEmpty()) {
delete scheme;
return false;
}
- if ( !_colorSchemes.contains(schemeName) )
- {
- _colorSchemes.insert(schemeName,scheme);
- }
- else
- {
+ if (!_colorSchemes.contains(schemeName)) {
+ _colorSchemes.insert(schemeName, scheme);
+ } else {
delete scheme;
}
return true;
}
-QList ColorSchemeManager::listColorSchemes()
-{
+
+QList ColorSchemeManager::listColorSchemes() {
QList ret;
- for (const QString &scheme_dir : get_color_schemes_dirs())
- {
+ for (const QString &scheme_dir : get_color_schemes_dirs()) {
const QString dname(scheme_dir);
QDir dir(dname);
QStringList filters;
@@ -567,67 +548,62 @@ QList ColorSchemeManager::listColorSchemes()
ret << dname + QLatin1Char('/') + i;
}
return ret;
-// return KGlobal::dirs()->findAllResources("data",
-// "konsole/*.colorscheme",
-// KStandardDirs::NoDuplicates);
+ //return KGlobal::dirs()->findAllResources("data",
+ // "konsole/*.colorscheme",
+ // KStandardDirs::NoDuplicates);
}
+
const ColorScheme ColorSchemeManager::_defaultColorScheme;
-const ColorScheme* ColorSchemeManager::defaultColorScheme() const
-{
+const ColorScheme *ColorSchemeManager::defaultColorScheme() const {
return &_defaultColorScheme;
}
-bool ColorSchemeManager::deleteColorScheme(const QString& name)
-{
- Q_ASSERT( _colorSchemes.contains(name) );
+
+bool ColorSchemeManager::deleteColorScheme(const QString &name) {
+ Q_ASSERT(_colorSchemes.contains(name));
// lookup the path and delete
QString path = findColorSchemePath(name);
- if ( QFile::remove(path) )
- {
+ if (QFile::remove(path)) {
_colorSchemes.remove(name);
return true;
- }
- else
- {
+ } else {
return false;
}
}
-QString ColorSchemeManager::findColorSchemePath(const QString& name) const
-{
+
+QString ColorSchemeManager::findColorSchemePath(const QString &name) const {
const QStringList dirs = get_color_schemes_dirs();
- if ( dirs.isEmpty() )
+ if (dirs.isEmpty())
return QString();
const QString dir = dirs.first();
- QString path(dir + QLatin1Char('/')+ name + QLatin1String(".colorscheme"));
- if ( !path.isEmpty() )
+ QString path(dir + QLatin1Char('/') + name + QLatin1String(".colorscheme"));
+ if (!path.isEmpty())
return path;
- path = dir + QLatin1Char('/')+ name + QLatin1String(".schema");
+ path = dir + QLatin1Char('/') + name + QLatin1String(".schema");
return path;
}
-const ColorScheme* ColorSchemeManager::findColorScheme(const QString& name)
-{
- if ( name.isEmpty() )
+
+const ColorScheme *ColorSchemeManager::findColorScheme(const QString &name) {
+ if (name.isEmpty())
return defaultColorScheme();
- if ( _colorSchemes.contains(name) )
+ if (_colorSchemes.contains(name)) {
return _colorSchemes[name];
- else
- {
+ } else {
// look for this color scheme
QString path = findColorSchemePath(name);
- if ( !path.isEmpty() && loadColorScheme(path) )
- {
+ if (!path.isEmpty() && loadColorScheme(path)) {
return findColorScheme(name);
}
return nullptr;
}
}
+
Q_GLOBAL_STATIC(ColorSchemeManager, theColorSchemeManager)
-ColorSchemeManager* ColorSchemeManager::instance()
-{
+ColorSchemeManager *ColorSchemeManager::instance() {
return theColorSchemeManager;
}
diff --git a/lib/qtermwidget/ColorScheme.h b/lib/qtermwidget/ColorScheme.h
index f40c8e8a..9a91ee82 100644
--- a/lib/qtermwidget/ColorScheme.h
+++ b/lib/qtermwidget/ColorScheme.h
@@ -1,22 +1,22 @@
/*
- This source file is part of Konsole, a terminal emulator.
-
- Copyright 2007-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This source file is part of Konsole, a terminal emulator.
+
+ Copyright 2007-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef COLORSCHEME_H
#define COLORSCHEME_H
@@ -60,7 +60,7 @@ class ColorScheme
QString name() const;
#if 0
-// Implemented upstream - in user apps
+ // Implemented upstream - in user apps
/** Reads the color scheme from the specified configuration source */
void read(KConfig& config);
/** Writes the color scheme to the specified configuration source */
@@ -140,13 +140,11 @@ class ColorScheme
private:
// specifies how much a particular color can be randomized by
- class RandomizationRange
- {
+ class RandomizationRange {
public:
RandomizationRange() : hue(0) , saturation(0) , value(0) {}
- bool isNull() const
- {
+ bool isNull() const {
return ( hue == 0 && saturation == 0 && value == 0 );
}
@@ -160,7 +158,7 @@ class ColorScheme
const ColorEntry* colorTable() const;
#if 0
-// implemented upstream - user apps
+ // implemented upstream - user apps
// reads a single colour entry from a KConfig source
// and sets the palette entry at 'index' to the entry read.
void readColorEntry(KConfig& config , int index);
diff --git a/lib/qtermwidget/DefaultTranslatorText.h b/lib/qtermwidget/DefaultTranslatorText.h
deleted file mode 100644
index e47417c5..00000000
--- a/lib/qtermwidget/DefaultTranslatorText.h
+++ /dev/null
@@ -1,2 +0,0 @@
-"keyboard \"Fallback Key Translator\"\n"
-"key Tab : \"\\t\" \0"
diff --git a/lib/qtermwidget/Emulation.cpp b/lib/qtermwidget/Emulation.cpp
index e51272c9..fa51be31 100644
--- a/lib/qtermwidget/Emulation.cpp
+++ b/lib/qtermwidget/Emulation.cpp
@@ -1,24 +1,23 @@
/*
- Copyright 2007-2008 Robert Knight
- Copyright 1997,1998 by Lars Doelle
- Copyright 1996 by Matthias Ettrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2007-2008 Robert Knight
+ Copyright 1997,1998 by Lars Doelle
+ Copyright 1996 by Matthias Ettrich
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
-
#include "Emulation.h"
#include
@@ -35,200 +34,184 @@
#include "KeyboardTranslator.h"
#include "Screen.h"
-#include "TerminalCharacterDecoder.h"
#include "ScreenWindow.h"
+#include "TerminalCharacterDecoder.h"
-Emulation::Emulation() :
- _currentScreen(nullptr),
- _keyTranslator(nullptr),
- _enableHandleCtrlC(false),
- _usesMouse(false),
- _bracketedPasteMode(false),
- _fromUtf8(QStringEncoder::Utf16)
-{
- // create screens with a default size
- _screen[0] = new Screen(40,80);
- _screen[1] = new Screen(40,80);
- _currentScreen = _screen[0];
+Emulation::Emulation()
+ : _currentScreen(nullptr)
+ , _keyTranslator(nullptr)
+ , _enableHandleCtrlC(false)
+ , _usesMouse(false)
+ , _bracketedPasteMode(false)
+ , _fromUtf8(QStringEncoder::Utf16) {
+ // create screens with a default size
+ _screen[0] = new Screen(40, 80);
+ _screen[1] = new Screen(40, 80);
+ _currentScreen = _screen[0];
- QObject::connect(&_bulkTimer1, &QTimer::timeout, this, &Emulation::showBulk);
- QObject::connect(&_bulkTimer2, &QTimer::timeout, this, &Emulation::showBulk);
+ connect(&_bulkTimer1, &QTimer::timeout, this, &Emulation::showBulk);
+ connect(&_bulkTimer2, &QTimer::timeout, this, &Emulation::showBulk);
- // listen for mouse status changes
- connect(this, &Emulation::programUsesMouseChanged,
- this, &Emulation::usesMouseChanged);
- connect(this, &Emulation::programBracketedPasteModeChanged,
- this, &Emulation::bracketedPasteModeChanged);
+ // listen for mouse status changes
+ connect(this, &Emulation::programUsesMouseChanged, this,
+ &Emulation::usesMouseChanged);
+ connect(this, &Emulation::programBracketedPasteModeChanged, this,
+ &Emulation::bracketedPasteModeChanged);
- connect(this, &Emulation::cursorChanged, this, [this] (KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) {
- emit profileChangeCommandReceived(QString(QLatin1String("CursorShape=%1;BlinkingCursorEnabled=%2"))
- .arg(static_cast(cursorShape)).arg(blinkingCursorEnabled) );
- });
+ connect(this, &Emulation::cursorChanged, this,
+ [this](KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) {
+ emit profileChangeCommandReceived(
+ QString(QLatin1String("CursorShape=%1;BlinkingCursorEnabled=%2"))
+ .arg(static_cast(cursorShape))
+ .arg(blinkingCursorEnabled));
+ });
}
-bool Emulation::programUsesMouse() const
-{
- return _usesMouse;
+bool Emulation::programUsesMouse() const {
+ return _usesMouse;
}
-void Emulation::usesMouseChanged(bool usesMouse)
-{
- _usesMouse = usesMouse;
+void Emulation::usesMouseChanged(bool usesMouse) {
+ _usesMouse = usesMouse;
}
-bool Emulation::programBracketedPasteMode() const
-{
+bool Emulation::programBracketedPasteMode() const {
return _bracketedPasteMode;
}
-void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode)
-{
+void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode) {
_bracketedPasteMode = bracketedPasteMode;
}
-ScreenWindow* Emulation::createWindow()
-{
- ScreenWindow* window = new ScreenWindow();
+ScreenWindow *Emulation::createWindow() {
+ ScreenWindow *window = new ScreenWindow();
window->setScreen(_currentScreen);
_windows << window;
- connect(window, &ScreenWindow::selectionChanged,
- this, &Emulation::bufferedUpdate);
-
- connect(this, &Emulation::outputChanged,
- window, &ScreenWindow::notifyOutputChanged);
-
- connect(this, &Emulation::handleCommandFromKeyboard,
- window, &ScreenWindow::handleCommandFromKeyboard);
- connect(this, &Emulation::handleCtrlC,
- window, &ScreenWindow::handleCtrlC);
- connect(this, &Emulation::outputFromKeypressEvent,
- window, &ScreenWindow::scrollToEnd);
+ connect(window, &ScreenWindow::selectionChanged, this, &Emulation::bufferedUpdate);
+ connect(this, &Emulation::outputChanged, window, &ScreenWindow::notifyOutputChanged);
+ connect(this, &Emulation::handleCommandFromKeyboard, window, &ScreenWindow::handleCommandFromKeyboard);
+ connect(this, &Emulation::handleCtrlC, window, &ScreenWindow::handleCtrlC);
+ connect(this, &Emulation::outputFromKeypressEvent, window, &ScreenWindow::scrollToEnd);
return window;
}
-void Emulation::checkScreenInUse()
-{
+void Emulation::checkScreenInUse() {
emit primaryScreenInUse(_currentScreen == _screen[0]);
}
-Emulation::~Emulation()
-{
- QListIterator windowIter(_windows);
+Emulation::~Emulation() {
+ QListIterator windowIter(_windows);
- while (windowIter.hasNext())
- {
- delete windowIter.next();
- }
+ while (windowIter.hasNext()) {
+ delete windowIter.next();
+ }
- delete _screen[0];
- delete _screen[1];
+ delete _screen[0];
+ delete _screen[1];
}
-void Emulation::setScreen(int n)
-{
- Screen *old = _currentScreen;
- _currentScreen = _screen[n & 1];
- if (_currentScreen != old)
- {
- // tell all windows onto this emulation to switch to the newly active screen
- for(ScreenWindow* window : std::as_const(_windows))
- window->setScreen(_currentScreen);
- checkScreenInUse();
- }
+void Emulation::setScreen(int n) {
+ Screen *old = _currentScreen;
+ _currentScreen = _screen[n & 1];
+ if (_currentScreen != old) {
+ // tell all windows onto this emulation to switch to the newly active screen
+ for (ScreenWindow *window : std::as_const(_windows))
+ window->setScreen(_currentScreen);
+ checkScreenInUse();
+ }
}
-void Emulation::clearHistory()
-{
- _screen[0]->setScroll( _screen[0]->getScroll() , false );
+void Emulation::clearHistory() {
+ _screen[0]->setScroll(_screen[0]->getScroll(), false);
}
-void Emulation::setHistory(const HistoryType& t)
-{
- _screen[0]->setScroll(t);
- showBulk();
+void Emulation::setHistory(const HistoryType &t) {
+ _screen[0]->setScroll(t);
+
+ showBulk();
}
-const HistoryType& Emulation::history() const
-{
- return _screen[0]->getScroll();
+const HistoryType &Emulation::history() const {
+ return _screen[0]->getScroll();
}
-void Emulation::setCodec(QStringEncoder qtc)
-{
- if (qtc.isValid())
- _fromUtf16 = std::move(qtc);
- else
- setCodec(LocaleCodec);
+void Emulation::setCodec(QStringEncoder qtc) {
+ if (qtc.isValid())
+ _fromUtf16 = std::move(qtc);
+ else
+ setCodec(LocaleCodec);
- _toUtf16 = QStringDecoder{utf8() ? QStringConverter::Encoding::Utf8 : QStringConverter::Encoding::System};
- emit useUtf8Request(utf8());
+ _toUtf16 = QStringDecoder{utf8() ? QStringConverter::Encoding::Utf8
+ : QStringConverter::Encoding::System};
+ emit useUtf8Request(utf8());
}
-bool Emulation::utf8() const
-{
- const auto enc = QStringConverter::encodingForName(_fromUtf16.name());
- return enc && enc.value() == QStringConverter::Encoding::Utf8;
+bool Emulation::utf8() const {
+ const auto enc = QStringConverter::encodingForName(_fromUtf16.name());
+ return enc && enc.value() == QStringConverter::Encoding::Utf8;
}
-void Emulation::setCodec(EmulationCodec codec)
-{
- setCodec( QStringEncoder{codec == Utf8Codec ?
- QStringConverter::Encoding::Utf8 :
- QStringConverter::Encoding::System} );
+void Emulation::setCodec(EmulationCodec codec) {
+ setCodec(QStringEncoder{codec == Utf8Codec
+ ? QStringConverter::Encoding::Utf8
+ : QStringConverter::Encoding::System});
}
-void Emulation::setKeyBindings(const QString& name)
-{
- _keyTranslator = KeyboardTranslatorManager::instance()->findTranslator(name);
- if (!_keyTranslator)
- {
- _keyTranslator = KeyboardTranslatorManager::instance()->defaultTranslator();
- }
+void Emulation::setKeyBindings(const QString &name) {
+ _keyTranslator = KeyboardTranslatorManager::instance()->findTranslator(name);
+ if (!_keyTranslator) {
+ _keyTranslator = KeyboardTranslatorManager::instance()->defaultTranslator();
+ }
}
-QString Emulation::keyBindings() const
-{
- return _keyTranslator->name();
+QString Emulation::keyBindings() const {
+ return _keyTranslator->name();
}
-void Emulation::receiveChar(wchar_t c)
// process application unicode input to terminal
// this is a trivial scanner
-{
- c &= 0xff;
- switch (c)
- {
- case '\b' : _currentScreen->backspace(); break;
- case '\t' : _currentScreen->tab(); break;
- case '\n' : _currentScreen->newLine(); break;
- case '\r' : _currentScreen->toStartOfLine(); break;
- case 0x07 : emit stateSet(NOTIFYBELL);
- break;
- default : _currentScreen->displayCharacter(c); break;
- };
-}
-
-void Emulation::sendKeyEvent(QKeyEvent* ev, bool)
-{
- emit stateSet(NOTIFYNORMAL);
-
- if (!ev->text().isEmpty())
- { // A block of text
- // Note that the text is proper unicode.
- // We should do a conversion here
- emit sendData(ev->text().toUtf8().constData(),ev->text().length());
- }
-}
-
-void Emulation::sendString(const char*,int)
-{
+void Emulation::receiveChar(wchar_t c) {
+ c &= 0xff;
+ switch (c) {
+ case '\b':
+ _currentScreen->backspace();
+ break;
+ case '\t':
+ _currentScreen->tab();
+ break;
+ case '\n':
+ _currentScreen->newLine();
+ break;
+ case '\r':
+ _currentScreen->toStartOfLine();
+ break;
+ case 0x07:
+ emit stateSet(NOTIFYBELL);
+ break;
+ default:
+ _currentScreen->displayCharacter(c);
+ break;
+ };
+}
+
+void Emulation::sendKeyEvent(QKeyEvent *ev, bool) {
+ emit stateSet(NOTIFYNORMAL);
+
+ if (!ev->text().isEmpty()) { // A block of text
+ // Note that the text is proper unicode.
+ // We should do a conversion here
+ emit sendData(ev->text().toUtf8().constData(), ev->text().length());
+ }
+}
+
+void Emulation::sendString(const char *, int) {
// default implementation does nothing
}
-void Emulation::sendMouseEvent(int /*buttons*/, int /*column*/, int /*row*/, int /*eventType*/)
-{
+void Emulation::sendMouseEvent(int /*buttons*/, int /*column*/, int /*row*/,
+ int /*eventType*/) {
// default implementation does nothing
}
@@ -236,132 +219,73 @@ void Emulation::sendMouseEvent(int /*buttons*/, int /*column*/, int /*row*/, int
We are doing code conversion from locale to unicode first.
TODO: Character composition from the old code. See #96536
*/
-
-void Emulation::receiveData(const char* text, int length)
-{
+void Emulation::receiveData(const char *text, int length) {
emit stateSet(NOTIFYACTIVITY);
bufferedUpdate();
/* XXX: the following code involves encoding & decoding of "UTF-16
- * surrogate pairs", which does not work with characters higher than
- * U+10FFFF
- * https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates
- */
+ * surrogate pairs", which does not work with characters higher than
+ * U+10FFFF
+ * https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates
+ */
QString utf16Text = _toUtf16(QByteArray::fromRawData(text, length));
std::wstring unicodeText = utf16Text.toStdWString();
- //send characters to terminal emulator
+ // send characters to terminal emulator
for (wchar_t i : unicodeText)
receiveChar(i);
- //look for z-modem indicator
+ // look for z-modem indicator
//-- someone who understands more about z-modems that I do may be able to move
- //this check into the above for loop?
- for (int i=0;i 3) && (strncmp(text+i+1, "B00", 3) == 0)) {
+ if ((length - i - 1 > 3) && (strncmp(text + i + 1, "B00", 3) == 0)) {
emit zmodemSendDetected();
}
// ZRINIT 1 Receive init
- if ((length-i-1 > 5) && (strncmp(text+i+1, "B0100", 5) == 0)) {
+ if ((length - i - 1 > 5) && (strncmp(text + i + 1, "B0100", 5) == 0)) {
emit zmodemRecvDetected();
}
}
}
}
-
-void Emulation::dupDisplayCharacter(wchar_t cc)
-{
- if(cc == L'\n') {
+
+void Emulation::dupDisplayCharacter(wchar_t cc) {
+ if (cc == L'\n') {
dupCache.append(L'\n');
PlainTextDecoder decoder;
QString lineText;
QTextStream stream(&lineText);
decoder.begin(&stream);
Character *data = new Character[dupCache.size()];
- for(int j=0;jtoUnicode(&s[i],1);
- int reslen = result.length();
-
- // If we get a control code halfway a multi-byte sequence
- // we flush the _decoder and continue with the control code.
- if ((s[i] < 32) && (s[i] > 0))
- {
- // Flush _decoder
- while(!result.length())
- result = _decoder->toUnicode(&s[i],1);
- reslen = 1;
- result.resize(reslen);
- result[0] = QChar(s[i]);
- }
-
- for (int j = 0; j < reslen; j++)
- {
- if (result[j].characterategory() == QChar::Mark_NonSpacing)
- _currentScreen->compose(result.mid(j,1));
- else
- onRcvChar(result[j].unicode());
- }
- if (s[i] == '\030')
- {
- if ((len-i-1 > 3) && (strncmp(s+i+1, "B00", 3) == 0))
- emit zmodemSendDetected();
- if ((length-i-1 > 5) && (strncmp(text+i+1, "B0100", 5) == 0))
- emit zmodemRecvDetected();
- }
- }
-}*/
-
-void Emulation::writeToStream( TerminalCharacterDecoder* _decoder ,
- int startLine ,
- int endLine)
-{
- _currentScreen->writeLinesToStream(_decoder,startLine,endLine);
+void Emulation::writeToStream(TerminalCharacterDecoder *_decoder, int startLine,
+ int endLine) {
+ _currentScreen->writeLinesToStream(_decoder, startLine, endLine);
}
-int Emulation::lineCount() const
-{
+int Emulation::lineCount() const {
// sum number of lines currently on _screen plus number of lines in history
return _currentScreen->getLines() + _currentScreen->getHistLines();
}
-void Emulation::showBulk()
-{
+void Emulation::showBulk() {
_bulkTimer1.stop();
_bulkTimer2.stop();
@@ -371,140 +295,123 @@ void Emulation::showBulk()
_currentScreen->resetDroppedLines();
}
-void Emulation::bufferedUpdate()
-{
+void Emulation::bufferedUpdate() {
static const int BULK_TIMEOUT1 = 10;
static const int BULK_TIMEOUT2 = 40;
_bulkTimer1.setSingleShot(true);
_bulkTimer1.start(BULK_TIMEOUT1);
- if (!_bulkTimer2.isActive())
- {
+ if (!_bulkTimer2.isActive()) {
_bulkTimer2.setSingleShot(true);
_bulkTimer2.start(BULK_TIMEOUT2);
}
}
-char Emulation::eraseChar() const
-{
- return '\b';
+char Emulation::eraseChar() const {
+ return '\b';
}
-void Emulation::setImageSize(int lines, int columns)
-{
- if ((lines < 1) || (columns < 1))
- return;
+void Emulation::setImageSize(int lines, int columns) {
+ if ((lines < 1) || (columns < 1))
+ return;
- QSize screenSize[2] = { QSize(_screen[0]->getColumns(),
- _screen[0]->getLines()),
- QSize(_screen[1]->getColumns(),
- _screen[1]->getLines()) };
- QSize newSize(columns,lines);
+ QSize screenSize[2] = {
+ QSize(_screen[0]->getColumns(), _screen[0]->getLines()),
+ QSize(_screen[1]->getColumns(), _screen[1]->getLines())};
+ QSize newSize(columns, lines);
- if (newSize == screenSize[0] && newSize == screenSize[1])
- return;
+ if (newSize == screenSize[0] && newSize == screenSize[1])
+ return;
- _screen[0]->resizeImage(lines,columns);
- _screen[1]->resizeImage(lines,columns);
+ _screen[0]->resizeImage(lines, columns);
+ _screen[1]->resizeImage(lines, columns);
- emit imageSizeChanged(lines,columns);
+ emit imageSizeChanged(lines, columns);
- bufferedUpdate();
+ bufferedUpdate();
}
-QSize Emulation::imageSize() const
-{
- return {_currentScreen->getColumns(), _currentScreen->getLines()};
+QSize Emulation::imageSize() const {
+ return {_currentScreen->getColumns(), _currentScreen->getLines()};
}
-ushort ExtendedCharTable::extendedCharHash(ushort* unicodePoints , ushort length) const
-{
+ushort ExtendedCharTable::extendedCharHash(ushort *unicodePoints,
+ ushort length) const {
ushort hash = 0;
- for ( ushort i = 0 ; i < length ; i++ )
- {
- hash = 31*hash + unicodePoints[i];
+ for (ushort i = 0; i < length; i++) {
+ hash = 31 * hash + unicodePoints[i];
}
return hash;
}
-bool ExtendedCharTable::extendedCharMatch(ushort hash , ushort* unicodePoints , ushort length) const
-{
- ushort* entry = extendedCharTable[hash];
-
- // compare given length with stored sequence length ( given as the first ushort in the
- // stored buffer )
- if ( entry == nullptr || entry[0] != length )
- return false;
- // if the lengths match, each character must be checked. the stored buffer starts at
- // entry[1]
- for ( int i = 0 ; i < length ; i++ )
- {
- if ( entry[i+1] != unicodePoints[i] )
- return false;
+
+bool ExtendedCharTable::extendedCharMatch(ushort hash, ushort *unicodePoints,
+ ushort length) const {
+ ushort *entry = extendedCharTable[hash];
+
+ // compare given length with stored sequence length ( given as the first
+ // ushort in the stored buffer )
+ if (entry == nullptr || entry[0] != length)
+ return false;
+ // if the lengths match, each character must be checked. the stored buffer
+ // starts at entry[1]
+ for (int i = 0; i < length; i++) {
+ if (entry[i + 1] != unicodePoints[i])
+ return false;
}
return true;
}
-ushort ExtendedCharTable::createExtendedChar(ushort* unicodePoints , ushort length)
-{
+
+ushort ExtendedCharTable::createExtendedChar(ushort *unicodePoints,
+ ushort length) {
// look for this sequence of points in the table
- ushort hash = extendedCharHash(unicodePoints,length);
+ ushort hash = extendedCharHash(unicodePoints, length);
// check existing entry for match
- while ( extendedCharTable.contains(hash) )
- {
- if ( extendedCharMatch(hash,unicodePoints,length) )
- {
+ while (extendedCharTable.contains(hash)) {
+ if (extendedCharMatch(hash, unicodePoints, length)) {
// this sequence already has an entry in the table,
// return its hash
return hash;
- }
- else
- {
- // if hash is already used by another, different sequence of unicode character
- // points then try next hash
+ } else {
+ // if hash is already used by another, different sequence of unicode
+ // character points then try next hash
hash++;
}
}
-
- // add the new sequence to the table and
- // return that index
- ushort* buffer = new ushort[length+1];
+ // add the new sequence to the table and
+ // return that index
+ ushort *buffer = new ushort[length + 1];
buffer[0] = length;
- for ( int i = 0 ; i < length ; i++ )
- buffer[i+1] = unicodePoints[i];
+ for (int i = 0; i < length; i++)
+ buffer[i + 1] = unicodePoints[i];
- extendedCharTable.insert(hash,buffer);
+ extendedCharTable.insert(hash, buffer);
return hash;
}
-ushort* ExtendedCharTable::lookupExtendedChar(ushort hash , ushort& length) const
-{
+ushort *ExtendedCharTable::lookupExtendedChar(ushort hash,
+ ushort &length) const {
// lookup index in table and if found, set the length
// argument and return a pointer to the character sequence
-
- ushort* buffer = extendedCharTable[hash];
- if ( buffer )
- {
+ ushort *buffer = extendedCharTable[hash];
+ if (buffer) {
length = buffer[0];
- return buffer+1;
- }
- else
- {
+ return buffer + 1;
+ } else {
length = 0;
return nullptr;
}
}
-ExtendedCharTable::ExtendedCharTable()
-{
+ExtendedCharTable::ExtendedCharTable() {
}
-ExtendedCharTable::~ExtendedCharTable()
-{
+
+ExtendedCharTable::~ExtendedCharTable() {
// free all allocated character buffers
- QHashIterator iter(extendedCharTable);
- while ( iter.hasNext() )
- {
+ QHashIterator iter(extendedCharTable);
+ while (iter.hasNext()) {
iter.next();
delete[] iter.value();
}
@@ -512,5 +419,3 @@ ExtendedCharTable::~ExtendedCharTable()
// global instance
ExtendedCharTable ExtendedCharTable::instance;
-
-
diff --git a/lib/qtermwidget/Emulation.h b/lib/qtermwidget/Emulation.h
index 0caea434..9cb3e6bb 100644
--- a/lib/qtermwidget/Emulation.h
+++ b/lib/qtermwidget/Emulation.h
@@ -1,23 +1,23 @@
/*
- This file is part of Konsole, an X terminal.
-
- Copyright 2007-2008 by Robert Knight
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+
+ Copyright 2007-2008 by Robert Knight
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef EMULATION_H
#define EMULATION_H
@@ -116,413 +116,411 @@ class Emulation : public QObject
Q_OBJECT
public:
- /**
- * This enum describes the available shapes for the keyboard cursor.
- * See setKeyboardCursorShape()
- */
- enum class KeyboardCursorShape {
- /** A rectangular block which covers the entire area of the cursor character. */
- BlockCursor = 0,
- /**
- * A single flat line which occupies the space at the bottom of the cursor
- * character's area.
- */
- UnderlineCursor = 1,
- /**
- * An cursor shaped like the capital letter 'I', similar to the IBeam
- * cursor used in Qt/KDE text editors.
- */
- IBeamCursor = 2
- };
-
-
- /** Constructs a new terminal emulation */
- Emulation();
- ~Emulation() override;
-
- /**
- * 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
- * TerminalDisplay::setScreenWindow() method.
- */
- ScreenWindow* createWindow();
-
- /** Returns the size of the screen image which the emulation produces */
- QSize imageSize() const;
-
- /**
- * Returns the total number of lines, including those stored in the history.
- */
- int lineCount() const;
-
- /**
- * Sets the history store used by this emulation. When new lines
- * are added to the output, older lines at the top of the screen are transferred to a history
- * store.
- *
- * The number of lines which are kept and the storage location depend on the
- * type of store.
- */
- void setHistory(const HistoryType&);
- /** Returns the history store used by this emulation. See setHistory() */
- const HistoryType& history() const;
- /** Clears the history scroll. */
- void clearHistory();
-
- /**
- * Copies the output history from @p startLine to @p endLine
- * into @p stream, using @p decoder to convert the terminal
- * characters into text.
- *
- * @param decoder A decoder which converts lines of terminal characters with
- * appearance attributes into output text. PlainTextDecoder is the most commonly
- * used decoder.
- * @param startLine Index of first line to copy
- * @param endLine Index of last line to copy
- */
- virtual void writeToStream(TerminalCharacterDecoder* decoder,int startLine,int endLine);
-
- /** Returns the codec used to decode incoming characters. See setCodec() */
- const QStringEncoder &codec() const { return _fromUtf16; }
- /** Sets the codec used to decode incoming characters. */
- void setCodec(QStringEncoder);
-
- /**
- * Convenience method.
- * Returns true if the current codec used to decode incoming
- * characters is UTF-8
- */
- bool utf8() const;
-
- /** TODO Document me */
- virtual char eraseChar() const;
-
- /**
- * Sets the key bindings used to key events
- * ( received through sendKeyEvent() ) into character
- * streams to send to the terminal.
- */
- void setKeyBindings(const QString& name);
- /**
- * Returns the name of the emulation's current key bindings.
- * See setKeyBindings()
- */
- QString keyBindings() const;
-
- /**
- * Copies the current image into the history and clears the screen.
- */
- virtual void clearEntireScreen() =0;
-
- /** Resets the state of the terminal. */
- virtual void reset() =0;
-
- /**
- * Returns true if the active terminal program wants
- * mouse input events.
- *
- * The programUsesMouseChanged() signal is emitted when this
- * changes.
- */
- bool programUsesMouse() const;
-
- bool programBracketedPasteMode() const;
-
- void setEnableHandleCtrlC(bool enable) { _enableHandleCtrlC = enable; }
+ /**
+ * This enum describes the available shapes for the keyboard cursor.
+ * See setKeyboardCursorShape()
+ */
+ enum class KeyboardCursorShape {
+ /** A rectangular block which covers the entire area of the cursor character. */
+ BlockCursor = 0,
+ /**
+ * A single flat line which occupies the space at the bottom of the cursor
+ * character's area.
+ */
+ UnderlineCursor = 1,
+ /**
+ * An cursor shaped like the capital letter 'I', similar to the IBeam
+ * cursor used in Qt/KDE text editors.
+ */
+ IBeamCursor = 2
+ };
+
+
+ /** Constructs a new terminal emulation */
+ Emulation();
+ ~Emulation() override;
+
+ /**
+ * 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
+ * TerminalDisplay::setScreenWindow() method.
+ */
+ ScreenWindow* createWindow();
+
+ /** Returns the size of the screen image which the emulation produces */
+ QSize imageSize() const;
+
+ /**
+ * Returns the total number of lines, including those stored in the history.
+ */
+ int lineCount() const;
+
+ /**
+ * Sets the history store used by this emulation. When new lines
+ * are added to the output, older lines at the top of the screen are transferred to a history
+ * store.
+ *
+ * The number of lines which are kept and the storage location depend on the
+ * type of store.
+ */
+ void setHistory(const HistoryType&);
+ /** Returns the history store used by this emulation. See setHistory() */
+ const HistoryType& history() const;
+ /** Clears the history scroll. */
+ void clearHistory();
+
+ /**
+ * Copies the output history from @p startLine to @p endLine
+ * into @p stream, using @p decoder to convert the terminal
+ * characters into text.
+ *
+ * @param decoder A decoder which converts lines of terminal characters with
+ * appearance attributes into output text. PlainTextDecoder is the most commonly
+ * used decoder.
+ * @param startLine Index of first line to copy
+ * @param endLine Index of last line to copy
+ */
+ virtual void writeToStream(TerminalCharacterDecoder* decoder,int startLine,int endLine);
+
+ /** Returns the codec used to decode incoming characters. See setCodec() */
+ const QStringEncoder &codec() const { return _fromUtf16; }
+ /** Sets the codec used to decode incoming characters. */
+ void setCodec(QStringEncoder);
+
+ /**
+ * Convenience method.
+ * Returns true if the current codec used to decode incoming
+ * characters is UTF-8
+ */
+ bool utf8() const;
+
+ /** TODO Document me */
+ virtual char eraseChar() const;
+
+ /**
+ * Sets the key bindings used to key events
+ * ( received through sendKeyEvent() ) into character
+ * streams to send to the terminal.
+ */
+ void setKeyBindings(const QString& name);
+ /**
+ * Returns the name of the emulation's current key bindings.
+ * See setKeyBindings()
+ */
+ QString keyBindings() const;
+
+ /**
+ * Copies the current image into the history and clears the screen.
+ */
+ virtual void clearEntireScreen() =0;
+
+ /** Resets the state of the terminal. */
+ virtual void reset() =0;
+
+ /**
+ * Returns true if the active terminal program wants
+ * mouse input events.
+ *
+ * The programUsesMouseChanged() signal is emitted when this
+ * changes.
+ */
+ bool programUsesMouse() const;
+
+ bool programBracketedPasteMode() const;
+
+ void setEnableHandleCtrlC(bool enable) { _enableHandleCtrlC = enable; }
public slots:
- /** Change the size of the emulation's image */
- virtual void setImageSize(int lines, int columns);
-
- /**
- * Interprets a sequence of characters and sends the result to the terminal.
- * This is equivalent to calling sendKeyEvent() for each character in @p text in succession.
- */
- virtual void sendText(const QString& text) = 0;
-
- /**
- * Interprets a key press event and emits the sendData() signal with
- * the resulting character stream.
- */
- virtual void sendKeyEvent(QKeyEvent*, bool fromPaste);
-
- /**
- * Converts information about a mouse event into an xterm-compatible escape
- * sequence and emits the character sequence via sendData()
- */
- virtual void sendMouseEvent(int buttons, int column, int line, int eventType);
-
- /**
- * Sends a string of characters to the foreground terminal process.
- *
- * @param string The characters to send.
- * @param length Length of @p string or if set to a negative value, @p string will
- * be treated as a null-terminated string and its length will be determined automatically.
- */
- virtual void sendString(const char* string, int length = -1) = 0;
-
- /**
- * Processes an incoming stream of characters. receiveData() decodes the incoming
- * character buffer using the current codec(), and then calls receiveChar() for
- * each unicode character in the resulting buffer.
- *
- * receiveData() also starts a timer which causes the outputChanged() signal
- * to be emitted when it expires. The timer allows multiple updates in quick
- * succession to be buffered into a single outputChanged() signal emission.
- *
- * @param buffer A string of characters received from the terminal program.
- * @param len The length of @p buffer
- */
- void receiveData(const char* buffer,int len);
-
- void dupDisplayCharacter(wchar_t cc);
+ /** Change the size of the emulation's image */
+ virtual void setImageSize(int lines, int columns);
+
+ /**
+ * Interprets a sequence of characters and sends the result to the terminal.
+ * This is equivalent to calling sendKeyEvent() for each character in @p text in succession.
+ */
+ virtual void sendText(const QString& text) = 0;
+
+ /**
+ * Interprets a key press event and emits the sendData() signal with
+ * the resulting character stream.
+ */
+ virtual void sendKeyEvent(QKeyEvent*, bool fromPaste);
+
+ /**
+ * Converts information about a mouse event into an xterm-compatible escape
+ * sequence and emits the character sequence via sendData()
+ */
+ virtual void sendMouseEvent(int buttons, int column, int line, int eventType);
+
+ /**
+ * Sends a string of characters to the foreground terminal process.
+ *
+ * @param string The characters to send.
+ * @param length Length of @p string or if set to a negative value, @p string will
+ * be treated as a null-terminated string and its length will be determined automatically.
+ */
+ virtual void sendString(const char* string, int length = -1) = 0;
+
+ /**
+ * Processes an incoming stream of characters. receiveData() decodes the incoming
+ * character buffer using the current codec(), and then calls receiveChar() for
+ * each unicode character in the resulting buffer.
+ *
+ * receiveData() also starts a timer which causes the outputChanged() signal
+ * to be emitted when it expires. The timer allows multiple updates in quick
+ * succession to be buffered into a single outputChanged() signal emission.
+ *
+ * @param buffer A string of characters received from the terminal program.
+ * @param len The length of @p buffer
+ */
+ void receiveData(const char* buffer,int len);
+
+ void dupDisplayCharacter(wchar_t cc);
signals:
- /**
- * Emitted when a buffer of data is ready to send to the
- * standard input of the terminal.
- *
- * @param data The buffer of data ready to be sent
- * @param len The length of @p data in bytes
- */
- void sendData(const char* data,int len);
-
- void dupDisplayOutput(const char* data,int len);
-
- /**
- * Requests that sending of input to the emulation
- * from the terminal process be suspended or resumed.
- *
- * @param suspend If true, requests that sending of
- * input from the terminal process' stdout be
- * suspended. Otherwise requests that sending of
- * input be resumed.
- */
- void lockPtyRequest(bool suspend);
-
- /**
- * Requests that the pty used by the terminal process
- * be set to UTF 8 mode.
- *
- * TODO: More documentation
- */
- void useUtf8Request(bool);
-
- /**
- * Emitted when the activity state of the emulation is set.
- *
- * @param state The new activity state, one of NOTIFYNORMAL, NOTIFYACTIVITY
- * or NOTIFYBELL
- */
- void stateSet(int state);
-
- /** ZModem file transfer detected */
- void zmodemSendDetected();
- void zmodemRecvDetected();
-
-
- /**
- * Requests that the color of the text used
- * to represent the tabs associated with this
- * emulation be changed. This is a Konsole-specific
- * extension from pre-KDE 4 times.
- *
- * TODO: Document how the parameter works.
- */
- void changeTabTextColorRequest(int color);
-
- /**
- * This is emitted when the program running in the shell indicates whether or
- * not it is interested in mouse events.
- *
- * @param usesMouse This will be true if the program wants to be informed about
- * mouse events or false otherwise.
- */
- void programUsesMouseChanged(bool usesMouse);
-
- void programBracketedPasteModeChanged(bool bracketedPasteMode);
-
- /**
- * Emitted when the contents of the screen image change.
- * The emulation buffers the updates from successive image changes,
- * and only emits outputChanged() at sensible intervals when
- * there is a lot of terminal activity.
- *
- * Normally there is no need for objects other than the screen windows
- * created with createWindow() to listen for this signal.
- *
- * ScreenWindow objects created using createWindow() will emit their
- * own outputChanged() signal in response to this signal.
- */
- void outputChanged();
-
- /**
- * Emitted when the program running in the terminal wishes to update the
- * session's title. This also allows terminal programs to customize other
- * aspects of the terminal emulation display.
- *
- * This signal is emitted when the escape sequence "\033]ARG;VALUE\007"
- * is received in the input string, where ARG is a number specifying what
- * should change and VALUE is a string specifying the new value.
- *
- * TODO: The name of this method is not very accurate since this method
- * is used to perform a whole range of tasks besides just setting
- * the user-title of the session.
- *
- * @param title Specifies what to change.
- *
- *
0 - Set window icon text and session title to @p newTitle
- *
1 - Set window icon text to @p newTitle
- *
2 - Set session title to @p newTitle
- *
11 - Set the session's default background color to @p newTitle,
- * where @p newTitle can be an HTML-style string ("#RRGGBB") or a named
- * color (eg 'red', 'blue').
- * See http://doc.trolltech.com/4.2/qcolor.html#setNamedColor for more
- * details.
- *
- *
31 - Supposedly treats @p newTitle as a URL and opens it (NOT IMPLEMENTED)
- *
32 - Sets the icon associated with the session. @p newTitle is the name
- * of the icon to use, which can be the name of any icon in the current KDE icon
- * theme (eg: 'konsole', 'kate', 'folder_home')
- *
- * @param newTitle Specifies the new title
- */
-
- void titleChanged(int title,const QString& newTitle);
-
- /**
- * Emitted when the program running in the terminal changes the
- * screen size.
- */
- void imageSizeChanged(int lineCount , int columnCount);
-
- /**
- * Emitted when the setImageSize() is called on this emulation for
- * the first time.
- */
- void imageSizeInitialized();
-
- /**
- * Emitted after receiving the escape sequence which asks to change
- * the terminal emulator's size
- */
- void imageResizeRequest(const QSize& size);
-
- /**
- * Emitted when the terminal program requests to change various properties
- * of the terminal display.
- *
- * A profile change command occurs when a special escape sequence, followed
- * by a string containing a series of name and value pairs is received.
- * This string can be parsed using a ProfileCommandParser instance.
- *
- * @param text A string expected to contain a series of key and value pairs in
- * the form: name=value;name2=value2 ...
- */
- void profileChangeCommandReceived(const QString& text);
-
- /**
- * Emitted when a flow control key combination ( Ctrl+S or Ctrl+Q ) is pressed.
- * @param suspendKeyPressed True if Ctrl+S was pressed to suspend output or Ctrl+Q to
- * resume output.
- */
- void flowControlKeyPressed(bool suspendKeyPressed);
-
- /**
- * Emitted when the active screen is switched, to indicate whether the primary
- * screen is in use.
- */
- void primaryScreenInUse(bool use);
-
- /**
- * Emitted when the cursor shape or its blinking state is changed via
- * DECSCUSR sequences.
- *
- * @param cursorShape One of 3 possible values in KeyboardCursorShape enum
- * @param blinkingCursorEnabled Whether to enable blinking or not
- */
- void cursorChanged(KeyboardCursorShape cursorShape, bool blinkingCursorEnabled);
-
- void handleCommandFromKeyboard(KeyboardTranslator::Command command);
- void handleCtrlC(void);
- void outputFromKeypressEvent(void);
+ /**
+ * Emitted when a buffer of data is ready to send to the
+ * standard input of the terminal.
+ *
+ * @param data The buffer of data ready to be sent
+ * @param len The length of @p data in bytes
+ */
+ void sendData(const char* data,int len);
+
+ void dupDisplayOutput(const char* data,int len);
+
+ /**
+ * Requests that sending of input to the emulation
+ * from the terminal process be suspended or resumed.
+ *
+ * @param suspend If true, requests that sending of
+ * input from the terminal process' stdout be
+ * suspended. Otherwise requests that sending of
+ * input be resumed.
+ */
+ void lockPtyRequest(bool suspend);
+
+ /**
+ * Requests that the pty used by the terminal process
+ * be set to UTF 8 mode.
+ *
+ * TODO: More documentation
+ */
+ void useUtf8Request(bool);
+
+ /**
+ * Emitted when the activity state of the emulation is set.
+ *
+ * @param state The new activity state, one of NOTIFYNORMAL, NOTIFYACTIVITY
+ * or NOTIFYBELL
+ */
+ void stateSet(int state);
+
+ /** ZModem file transfer detected */
+ void zmodemSendDetected();
+ void zmodemRecvDetected();
+
+
+ /**
+ * Requests that the color of the text used
+ * to represent the tabs associated with this
+ * emulation be changed. This is a Konsole-specific
+ * extension from pre-KDE 4 times.
+ *
+ * TODO: Document how the parameter works.
+ */
+ void changeTabTextColorRequest(int color);
+
+ /**
+ * This is emitted when the program running in the shell indicates whether or
+ * not it is interested in mouse events.
+ *
+ * @param usesMouse This will be true if the program wants to be informed about
+ * mouse events or false otherwise.
+ */
+ void programUsesMouseChanged(bool usesMouse);
+
+ void programBracketedPasteModeChanged(bool bracketedPasteMode);
+
+ /**
+ * Emitted when the contents of the screen image change.
+ * The emulation buffers the updates from successive image changes,
+ * and only emits outputChanged() at sensible intervals when
+ * there is a lot of terminal activity.
+ *
+ * Normally there is no need for objects other than the screen windows
+ * created with createWindow() to listen for this signal.
+ *
+ * ScreenWindow objects created using createWindow() will emit their
+ * own outputChanged() signal in response to this signal.
+ */
+ void outputChanged();
+
+ /**
+ * Emitted when the program running in the terminal wishes to update the
+ * session's title. This also allows terminal programs to customize other
+ * aspects of the terminal emulation display.
+ *
+ * This signal is emitted when the escape sequence "\033]ARG;VALUE\007"
+ * is received in the input string, where ARG is a number specifying what
+ * should change and VALUE is a string specifying the new value.
+ *
+ * TODO: The name of this method is not very accurate since this method
+ * is used to perform a whole range of tasks besides just setting
+ * the user-title of the session.
+ *
+ * @param title Specifies what to change.
+ *
+ *
0 - Set window icon text and session title to @p newTitle
+ *
1 - Set window icon text to @p newTitle
+ *
2 - Set session title to @p newTitle
+ *
11 - Set the session's default background color to @p newTitle,
+ * where @p newTitle can be an HTML-style string ("#RRGGBB") or a named
+ * color (eg 'red', 'blue').
+ * See http://doc.trolltech.com/4.2/qcolor.html#setNamedColor for more
+ * details.
+ *
+ *
31 - Supposedly treats @p newTitle as a URL and opens it (NOT IMPLEMENTED)
+ *
32 - Sets the icon associated with the session. @p newTitle is the name
+ * of the icon to use, which can be the name of any icon in the current KDE icon
+ * theme (eg: 'konsole', 'kate', 'folder_home')
+ *
+ * @param newTitle Specifies the new title
+ */
+
+ void titleChanged(int title,const QString& newTitle);
+
+ /**
+ * Emitted when the program running in the terminal changes the
+ * screen size.
+ */
+ void imageSizeChanged(int lineCount , int columnCount);
+
+ /**
+ * Emitted when the setImageSize() is called on this emulation for
+ * the first time.
+ */
+ void imageSizeInitialized();
+
+ /**
+ * Emitted after receiving the escape sequence which asks to change
+ * the terminal emulator's size
+ */
+ void imageResizeRequest(const QSize& size);
+
+ /**
+ * Emitted when the terminal program requests to change various properties
+ * of the terminal display.
+ *
+ * A profile change command occurs when a special escape sequence, followed
+ * by a string containing a series of name and value pairs is received.
+ * This string can be parsed using a ProfileCommandParser instance.
+ *
+ * @param text A string expected to contain a series of key and value pairs in
+ * the form: name=value;name2=value2 ...
+ */
+ void profileChangeCommandReceived(const QString& text);
+
+ /**
+ * Emitted when a flow control key combination ( Ctrl+S or Ctrl+Q ) is pressed.
+ * @param suspendKeyPressed True if Ctrl+S was pressed to suspend output or Ctrl+Q to
+ * resume output.
+ */
+ void flowControlKeyPressed(bool suspendKeyPressed);
+
+ /**
+ * Emitted when the active screen is switched, to indicate whether the primary
+ * screen is in use.
+ */
+ void primaryScreenInUse(bool use);
+
+ /**
+ * Emitted when the cursor shape or its blinking state is changed via
+ * DECSCUSR sequences.
+ *
+ * @param cursorShape One of 3 possible values in KeyboardCursorShape enum
+ * @param blinkingCursorEnabled Whether to enable blinking or not
+ */
+ void cursorChanged(KeyboardCursorShape cursorShape, bool blinkingCursorEnabled);
+
+ void handleCommandFromKeyboard(KeyboardTranslator::Command command);
+ void handleCtrlC(void);
+ void outputFromKeypressEvent(void);
protected:
- virtual void setMode(int mode) = 0;
- virtual void resetMode(int mode) = 0;
-
- /**
- * Processes an incoming character. See receiveData()
- * @p ch A unicode character code.
- */
- virtual void receiveChar(wchar_t ch);
-
- /**
- * Sets the active screen. The terminal has two screens, primary and alternate.
- * The primary screen is used by default. When certain interactive programs such
- * as Vim are run, they trigger a switch to the alternate screen.
- *
- * @param index 0 to switch to the primary screen, or 1 to switch to the alternate screen
- */
- void setScreen(int index);
-
- enum EmulationCodec
- {
- LocaleCodec = 0,
- Utf8Codec = 1
- };
- void setCodec(EmulationCodec codec); // codec number, 0 = locale, 1=utf8
-
-
- QList _windows;
-
- Screen* _currentScreen; // pointer to the screen which is currently active,
- // this is one of the elements in the screen[] array
-
- Screen* _screen[2]; // 0 = primary screen ( used by most programs, including the shell
- // scrollbars are enabled in this mode )
- // 1 = alternate ( used by vi , emacs etc.
- // scrollbars are not enabled in this mode )
-
- //decodes an incoming C-style character stream into a unicode QString using
- //the current text codec. (this allows for rendering of non-ASCII characters in text files etc.)
- QStringEncoder _fromUtf16;
- QStringDecoder _toUtf16;
-
- const KeyboardTranslator* _keyTranslator; // the keyboard layout
-
- bool _enableHandleCtrlC;
+ virtual void setMode(int mode) = 0;
+ virtual void resetMode(int mode) = 0;
+
+ /**
+ * Processes an incoming character. See receiveData()
+ * @p ch A unicode character code.
+ */
+ virtual void receiveChar(wchar_t ch);
+
+ /**
+ * Sets the active screen. The terminal has two screens, primary and alternate.
+ * The primary screen is used by default. When certain interactive programs such
+ * as Vim are run, they trigger a switch to the alternate screen.
+ *
+ * @param index 0 to switch to the primary screen, or 1 to switch to the alternate screen
+ */
+ void setScreen(int index);
+
+ enum EmulationCodec {
+ LocaleCodec = 0,
+ Utf8Codec = 1
+ };
+ void setCodec(EmulationCodec codec); // codec number, 0 = locale, 1=utf8
+
+ QList _windows;
+
+ Screen* _currentScreen; // pointer to the screen which is currently active,
+ // this is one of the elements in the screen[] array
+
+ Screen* _screen[2]; // 0 = primary screen ( used by most programs, including the shell
+ // scrollbars are enabled in this mode )
+ // 1 = alternate ( used by vi , emacs etc.
+ // scrollbars are not enabled in this mode )
+
+ //decodes an incoming C-style character stream into a unicode QString using
+ //the current text codec. (this allows for rendering of non-ASCII characters in text files etc.)
+ QStringEncoder _fromUtf16;
+ QStringDecoder _toUtf16;
+
+ const KeyboardTranslator* _keyTranslator; // the keyboard layout
+
+ bool _enableHandleCtrlC;
protected slots:
- /**
- * Schedules an update of attached views.
- * Repeated calls to bufferedUpdate() in close succession will result in only a single update,
- * much like the Qt buffered update of widgets.
- */
- void bufferedUpdate();
-
- // used to emit the primaryScreenInUse(bool) signal
- void checkScreenInUse();
+ /**
+ * Schedules an update of attached views.
+ * Repeated calls to bufferedUpdate() in close succession will result in only a single update,
+ * much like the Qt buffered update of widgets.
+ */
+ void bufferedUpdate();
+
+ // used to emit the primaryScreenInUse(bool) signal
+ void checkScreenInUse();
private slots:
- // triggered by timer, causes the emulation to send an updated screen image to each
- // view
- void showBulk();
+ // triggered by timer, causes the emulation to send an updated screen image to each
+ // view
+ void showBulk();
- void usesMouseChanged(bool usesMouse);
+ void usesMouseChanged(bool usesMouse);
- void bracketedPasteModeChanged(bool bracketedPasteMode);
+ void bracketedPasteModeChanged(bool bracketedPasteMode);
private:
- bool _usesMouse;
- bool _bracketedPasteMode;
- QTimer _bulkTimer1{this};
- QTimer _bulkTimer2{this};
- QStringEncoder _fromUtf8;
- QByteArray dupCache;
+ bool _usesMouse;
+ bool _bracketedPasteMode;
+ QTimer _bulkTimer1{this};
+ QTimer _bulkTimer2{this};
+ QStringEncoder _fromUtf8;
+ QByteArray dupCache;
};
-#endif // ifndef EMULATION_H
+#endif // EMULATION_H
diff --git a/lib/qtermwidget/ExtendedDefaultTranslator.h b/lib/qtermwidget/ExtendedDefaultTranslator.h
deleted file mode 100644
index 6403c729..00000000
--- a/lib/qtermwidget/ExtendedDefaultTranslator.h
+++ /dev/null
@@ -1,74 +0,0 @@
-"keyboard \"Default (XFree 4)\""
-"key Escape : \"\\E\""
-"key Tab -Shift : \"\\t\"\n"
-"key Tab +Shift+Ansi : \"\\E[Z\"\n"
-"key Tab +Shift-Ansi : \"\\t\"\n"
-"key Backtab +Ansi : \"\\E[Z\"\n"
-"key Backtab -Ansi : \"\\t\"\n"
-"key Return-Shift-NewLine : \"\\r\"\n"
-"key Return-Shift+NewLine : \"\\r\\n\"\n"
-"key Return+Shift : \"\\EOM\"\n"
-"key Backspace : \"\\x7f\"\n"
-"key Up -Shift-Ansi : \"\\EA\"\n"
-"key Down -Shift-Ansi : \"\\EB\"\n"
-"key Right-Shift-Ansi : \"\\EC\"\n"
-"key Left -Shift-Ansi : \"\\ED\"\n"
-"key Up -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOA\"\n"
-"key Down -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOB\"\n"
-"key Right -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOC\"\n"
-"key Left -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOD\"\n"
-"key Up -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[A\"\n"
-"key Down -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[B\"\n"
-"key Right -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[C\"\n"
-"key Left -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[D\"\n"
-"key Up -Shift+AnyMod+Ansi : \"\\E[1;*A\"\n"
-"key Down -Shift+AnyMod+Ansi : \"\\E[1;*B\"\n"
-"key Right -Shift+AnyMod+Ansi : \"\\E[1;*C\"\n"
-"key Left -Shift+AnyMod+Ansi : \"\\E[1;*D\"\n"
-"key Enter+NewLine : \"\\r\\n\"\n"
-"key Enter-NewLine : \"\\r\"\n"
-"key Home -AnyMod -AppCuKeys : \"\\E[H\" \n"
-"key End -AnyMod -AppCuKeys : \"\\E[F\" \n"
-"key Home -AnyMod +AppCuKeys : \"\\EOH\" \n"
-"key End -AnyMod +AppCuKeys : \"\\EOF\" \n"
-"key Home +AnyMod : \"\\E[1;*H\"\n"
-"key End +AnyMod : \"\\E[1;*F\"\n"
-"key Insert -AnyMod : \"\\E[2~\"\n"
-"key Delete -AnyMod : \"\\E[3~\"\n"
-"key Insert +AnyMod : \"\\E[2;*~\"\n"
-"key Delete +AnyMod : \"\\E[3;*~\"\n"
-"key Prior -Shift-AnyMod : \"\\E[5~\"\n"
-"key Next -Shift-AnyMod : \"\\E[6~\"\n"
-"key Prior -Shift+AnyMod : \"\\E[5;*~\"\n"
-"key Next -Shift+AnyMod : \"\\E[6;*~\"\n"
-"key F1 -AnyMod : \"\\EOP\"\n"
-"key F2 -AnyMod : \"\\EOQ\"\n"
-"key F3 -AnyMod : \"\\EOR\"\n"
-"key F4 -AnyMod : \"\\EOS\"\n"
-"key F5 -AnyMod : \"\\E[15~\"\n"
-"key F6 -AnyMod : \"\\E[17~\"\n"
-"key F7 -AnyMod : \"\\E[18~\"\n"
-"key F8 -AnyMod : \"\\E[19~\"\n"
-"key F9 -AnyMod : \"\\E[20~\"\n"
-"key F10 -AnyMod : \"\\E[21~\"\n"
-"key F11 -AnyMod : \"\\E[23~\"\n"
-"key F12 -AnyMod : \"\\E[24~\"\n"
-"key F1 +AnyMod : \"\\EO*P\"\n"
-"key F2 +AnyMod : \"\\EO*Q\"\n"
-"key F3 +AnyMod : \"\\EO*R\"\n"
-"key F4 +AnyMod : \"\\EO*S\"\n"
-"key F5 +AnyMod : \"\\E[15;*~\"\n"
-"key F6 +AnyMod : \"\\E[17;*~\"\n"
-"key F7 +AnyMod : \"\\E[18;*~\"\n"
-"key F8 +AnyMod : \"\\E[19;*~\"\n"
-"key F9 +AnyMod : \"\\E[20;*~\"\n"
-"key F10 +AnyMod : \"\\E[21;*~\"\n"
-"key F11 +AnyMod : \"\\E[23;*~\"\n"
-"key F12 +AnyMod : \"\\E[24;*~\"\n"
-"key Space +Control : \"\\x00\"\n"
-"key Up +Shift-AppScreen : scrollLineUp\n"
-"key Prior +Shift-AppScreen : scrollPageUp\n"
-"key Down +Shift-AppScreen : scrollLineDown\n"
-"key Next +Shift-AppScreen : scrollPageDown\n"
-"key ScrollLock : scrollLock\n"
-"\0"
diff --git a/lib/qtermwidget/Filter.cpp b/lib/qtermwidget/Filter.cpp
index d750d856..087945e1 100644
--- a/lib/qtermwidget/Filter.cpp
+++ b/lib/qtermwidget/Filter.cpp
@@ -1,125 +1,117 @@
/*
- Copyright 2007-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2007-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
-
#include "Filter.h"
#include
#include
#include
-#include
#include
+#include
+#include
+#include
+#include
#include
#include
-#include
-#include
-#include
#include
-#include
+#include
-#include "TerminalCharacterDecoder.h"
#include "CharWidth.h"
+#include "TerminalCharacterDecoder.h"
#include "qtermwidget.h"
-FilterChain::~FilterChain()
-{
-
+FilterChain::~FilterChain() {
}
-void FilterChain::addFilter(Filter* filter)
-{
- if(!containsFilter(filter))
+void FilterChain::addFilter(Filter *filter) {
+ if (!containsFilter(filter))
append(filter);
}
-void FilterChain::removeFilter(Filter* filter)
-{
- removeAll(filter);
+
+void FilterChain::removeFilter(Filter *filter) {
+ removeAll(filter);
}
-bool FilterChain::containsFilter(Filter* filter)
-{
- return contains(filter);
+
+bool FilterChain::containsFilter(Filter *filter) {
+ return contains(filter);
}
-void FilterChain::reset()
-{
- QListIterator iter(*this);
+
+void FilterChain::reset() {
+ QListIterator iter(*this);
while (iter.hasNext())
iter.next()->reset();
}
-void FilterChain::setBuffer(const QString* buffer , const QList* linePositions)
-{
- QListIterator iter(*this);
+
+void FilterChain::setBuffer(const QString *buffer,
+ const QList *linePositions) {
+ QListIterator iter(*this);
while (iter.hasNext())
- iter.next()->setBuffer(buffer,linePositions);
+ iter.next()->setBuffer(buffer, linePositions);
}
-void FilterChain::process()
-{
- QListIterator iter(*this);
+
+void FilterChain::process() {
+ QListIterator iter(*this);
while (iter.hasNext())
iter.next()->process();
}
-void FilterChain::clear()
-{
- QList::clear();
+
+void FilterChain::clear() {
+ QList::clear();
}
-Filter::HotSpot* FilterChain::hotSpotAt(int line , int column) const
-{
- QListIterator iter(*this);
- while (iter.hasNext())
- {
- Filter* filter = iter.next();
- Filter::HotSpot* spot = filter->hotSpotAt(line,column);
- if ( spot != nullptr )
- {
- return spot;
+
+Filter::HotSpot *FilterChain::hotSpotAt(int line, int column) const {
+ QListIterator iter(*this);
+ while (iter.hasNext()) {
+ Filter *filter = iter.next();
+ Filter::HotSpot *spot = filter->hotSpotAt(line, column);
+ if (spot != nullptr) {
+ return spot;
}
}
return nullptr;
}
-QList FilterChain::hotSpots() const
-{
- QList list;
- QListIterator iter(*this);
- while (iter.hasNext())
- {
- Filter* filter = iter.next();
+QList FilterChain::hotSpots() const {
+ QList list;
+ QListIterator iter(*this);
+ while (iter.hasNext()) {
+ Filter *filter = iter.next();
list << filter->hotSpots();
}
return list;
}
+
//QList FilterChain::hotSpotsAtLine(int line) const;
TerminalImageFilterChain::TerminalImageFilterChain()
-: _buffer(nullptr)
-, _linePositions(nullptr)
-{
+ : _buffer(nullptr), _linePositions(nullptr) {
}
-TerminalImageFilterChain::~TerminalImageFilterChain()
-{
+TerminalImageFilterChain::~TerminalImageFilterChain() {
delete _buffer;
delete _linePositions;
}
-void TerminalImageFilterChain::setImage(const Character* const image , int lines , int columns, const QVector& lineProperties)
-{
+void TerminalImageFilterChain::setImage(
+ const Character *const image, int lines, int columns,
+ const QVector &lineProperties) {
if (empty())
return;
@@ -130,9 +122,9 @@ void TerminalImageFilterChain::setImage(const Character* const image , int lines
decoder.setTrailingWhitespace(false);
// setup new shared buffers for the filters to process on
- QString* newBuffer = new QString();
- QList* newLinePositions = new QList();
- setBuffer( newBuffer , newLinePositions );
+ QString *newBuffer = new QString();
+ QList *newLinePositions = new QList();
+ setBuffer(newBuffer, newLinePositions);
// free the old buffers
delete _buffer;
@@ -144,117 +136,98 @@ void TerminalImageFilterChain::setImage(const Character* const image , int lines
QTextStream lineStream(_buffer);
decoder.begin(&lineStream);
- for (int i=0 ; i < lines ; i++)
- {
+ for (int i = 0; i < lines; i++) {
_linePositions->append(_buffer->length());
- decoder.decodeLine(image + i*columns,columns,LINE_DEFAULT);
+ decoder.decodeLine(image + i * columns, columns, LINE_DEFAULT);
// pretend that each line ends with a newline character.
// this prevents a link that occurs at the end of one line
// being treated as part of a link that occurs at the start of the next line
//
- // the downside is that links which are spread over more than one line are not
- // highlighted.
+ // the downside is that links which are spread over more than one line are
+ // not highlighted.
//
// TODO - Use the "line wrapped" attribute associated with lines in a
// terminal image to avoid adding this imaginary character for wrapped
// lines
- if ( !(lineProperties.value(i,LINE_DEFAULT) & LINE_WRAPPED) )
- lineStream << QLatin1Char('\n');
+ if (!(lineProperties.value(i, LINE_DEFAULT) & LINE_WRAPPED))
+ lineStream << QLatin1Char('\n');
}
decoder.end();
}
-Filter::Filter() : QObject(nullptr)
-{
+Filter::Filter() : QObject(nullptr) {
}
-Filter::~Filter()
-{
+Filter::~Filter() {
qDeleteAll(_hotspotList);
_hotspotList.clear();
}
-void Filter::reset()
-{
+void Filter::reset() {
qDeleteAll(_hotspotList);
_hotspots.clear();
_hotspotList.clear();
}
-void Filter::setBuffer(const QString* buffer , const QList* linePositions)
-{
+void Filter::setBuffer(const QString *buffer, const QList *linePositions) {
_buffer = buffer;
_linePositions = linePositions;
}
-void Filter::getLineColumn(int position , int& startLine , int& startColumn)
-{
- Q_ASSERT( _linePositions );
- Q_ASSERT( _buffer );
+void Filter::getLineColumn(int position, int &startLine, int &startColumn) {
+ Q_ASSERT(_linePositions);
+ Q_ASSERT(_buffer);
-
- for (int i = 0 ; i < _linePositions->count() ; i++)
- {
+ for (int i = 0; i < _linePositions->count(); i++) {
int nextLine = 0;
- if ( i == _linePositions->count()-1 )
- nextLine = _buffer->length() + 1;
+ if (i == _linePositions->count() - 1)
+ nextLine = _buffer->length() + 1;
else
- nextLine = _linePositions->value(i+1);
+ nextLine = _linePositions->value(i + 1);
- if ( _linePositions->value(i) <= position && position < nextLine )
- {
+ if (_linePositions->value(i) <= position && position < nextLine) {
startLine = i;
- startColumn = CharWidth::string_unicode_width(buffer()->mid(_linePositions->value(i),position - _linePositions->value(i)));
+ startColumn = CharWidth::string_unicode_width(buffer()->mid(
+ _linePositions->value(i), position - _linePositions->value(i)));
return;
}
}
}
-
-/*void Filter::addLine(const QString& text)
-{
- _linePositions << _buffer.length();
- _buffer.append(text);
-}*/
-
-const QString* Filter::buffer()
-{
- return _buffer;
+const QString *Filter::buffer() {
+ return _buffer;
}
-Filter::HotSpot::~HotSpot()
-{
+
+Filter::HotSpot::~HotSpot() {
}
-void Filter::addHotSpot(HotSpot* spot)
-{
+
+void Filter::addHotSpot(HotSpot *spot) {
_hotspotList << spot;
- for (int line = spot->startLine() ; line <= spot->endLine() ; line++)
- {
- _hotspots.insert(line,spot);
+ for (int line = spot->startLine(); line <= spot->endLine(); line++) {
+ _hotspots.insert(line, spot);
}
}
-QList Filter::hotSpots() const
-{
- return _hotspotList;
+
+QList Filter::hotSpots() const {
+ return _hotspotList;
}
-QList Filter::hotSpotsAtLine(int line) const
-{
+
+QList Filter::hotSpotsAtLine(int line) const {
return _hotspots.values(line);
}
-Filter::HotSpot* Filter::hotSpotAt(int line , int column) const
-{
- QListIterator spotIter(_hotspots.values(line));
+Filter::HotSpot *Filter::hotSpotAt(int line, int column) const {
+ QListIterator spotIter(_hotspots.values(line));
- while (spotIter.hasNext())
- {
- HotSpot* spot = spotIter.next();
+ while (spotIter.hasNext()) {
+ HotSpot *spot = spotIter.next();
- if ( spot->startLine() == line && spot->startColumn() > column )
+ if (spot->startLine() == line && spot->startColumn() > column)
continue;
- if ( spot->endLine() == line && spot->endColumn() < column )
+ if (spot->endLine() == line && spot->endColumn() < column)
continue;
return spot;
@@ -263,108 +236,53 @@ Filter::HotSpot* Filter::hotSpotAt(int line , int column) const
return nullptr;
}
-Filter::HotSpot::HotSpot(int startLine , int startColumn , int endLine , int endColumn)
- : _startLine(startLine)
- , _startColumn(startColumn)
- , _endLine(endLine)
- , _endColumn(endColumn)
- , _type(NotSpecified)
- , _color(Qt::red)
-{
-}
-QList Filter::HotSpot::actions()
-{
- return QList();
-}
-int Filter::HotSpot::startLine() const
-{
- return _startLine;
-}
-int Filter::HotSpot::endLine() const
-{
- return _endLine;
-}
-int Filter::HotSpot::startColumn() const
-{
- return _startColumn;
-}
-int Filter::HotSpot::endColumn() const
-{
- return _endColumn;
-}
-Filter::HotSpot::Type Filter::HotSpot::type() const
-{
- return _type;
-}
-QColor Filter::HotSpot::color() const
-{
- return _color;
-}
-void Filter::HotSpot::setType(Type type)
-{
- _type = type;
-}
-void Filter::HotSpot::setColor(const QColor& color)
-{
- _color = color;
-}
+Filter::HotSpot::HotSpot(int startLine, int startColumn, int endLine, int endColumn)
+ : _startLine(startLine), _startColumn(startColumn), _endLine(endLine),
+ _endColumn(endColumn), _type(NotSpecified), _color(Qt::red) {}
+QList Filter::HotSpot::actions() { return QList(); }
+int Filter::HotSpot::startLine() const { return _startLine; }
+int Filter::HotSpot::endLine() const { return _endLine; }
+int Filter::HotSpot::startColumn() const { return _startColumn; }
+int Filter::HotSpot::endColumn() const { return _endColumn; }
+Filter::HotSpot::Type Filter::HotSpot::type() const { return _type; }
+QColor Filter::HotSpot::color() const { return _color; }
+void Filter::HotSpot::setType(Type type) { _type = type; }
+void Filter::HotSpot::setColor(const QColor &color) { _color = color; }
-RegExpFilter::RegExpFilter() : Filter()
-{
+RegExpFilter::RegExpFilter() : Filter() {
}
-RegExpFilter::HotSpot::HotSpot(int startLine,int startColumn,int endLine,int endColumn)
- : Filter::HotSpot(startLine,startColumn,endLine,endColumn)
-{
+RegExpFilter::HotSpot::HotSpot(int startLine, int startColumn, int endLine,
+ int endColumn)
+ : Filter::HotSpot(startLine, startColumn, endLine, endColumn) {
setType(Marker);
}
-void RegExpFilter::HotSpot::clickAction(void)
-{
+void RegExpFilter::HotSpot::clickAction(void) {}
+QString RegExpFilter::HotSpot::clickActionToolTip(void) { return QString(); }
+bool RegExpFilter::HotSpot::hasClickAction(void) { return false; }
+void RegExpFilter::HotSpot::setCapturedTexts(const QStringList &texts) {
+ _capturedTexts = texts;
}
-
-QString RegExpFilter::HotSpot::clickActionToolTip(void)
-{
- return QString();
+QStringList RegExpFilter::HotSpot::capturedTexts() const {
+ return _capturedTexts;
}
-
-bool RegExpFilter::HotSpot::hasClickAction(void)
-{
- return false;
+void RegExpFilter::setRegExp(const QRegularExpression ®Exp) {
+ _searchText = regExp;
}
+QRegularExpression RegExpFilter::regExp() const { return _searchText; }
-void RegExpFilter::HotSpot::setCapturedTexts(const QStringList& texts)
-{
- _capturedTexts = texts;
-}
-QStringList RegExpFilter::HotSpot::capturedTexts() const
-{
- return _capturedTexts;
-}
+void RegExpFilter::process() {
+ const QString *text = buffer();
-void RegExpFilter::setRegExp(const QRegularExpression& regExp)
-{
- _searchText = regExp;
-}
-QRegularExpression RegExpFilter::regExp() const
-{
- return _searchText;
-}
-/*void RegExpFilter::reset(int)
-{
- _buffer = QString();
-}*/
-void RegExpFilter::process()
-{
- const QString* text = buffer();
-
- Q_ASSERT( text );
+ Q_ASSERT(text);
// ignore any regular expressions which match an empty string.
// otherwise the while loop below will run indefinitely
static const QString emptyString;
- auto match = _searchText.match(emptyString, 0,
- QRegularExpression::NormalMatch, QRegularExpression::AnchorAtOffsetMatchOption);
+ auto match =
+ _searchText.match(emptyString, 0, QRegularExpression::NormalMatch,
+ QRegularExpression::AnchorAtOffsetMatchOption);
if (match.hasMatch())
return;
@@ -381,11 +299,12 @@ void RegExpFilter::process()
QString text = match.captured(i);
captureList.append(text);
}
-
+
getLineColumn(match.capturedStart(), startLine, startColumn);
getLineColumn(match.capturedEnd(), endLine, endColumn);
- RegExpFilter::HotSpot* spot = newHotSpot(startLine, startColumn, endLine, endColumn);
+ RegExpFilter::HotSpot *spot =
+ newHotSpot(startLine, startColumn, endLine, endColumn);
spot->setCapturedTexts(captureList);
addHotSpot(spot);
@@ -396,88 +315,84 @@ void RegExpFilter::process()
}
match = _searchText.match(*text, match.capturedEnd());
- }
+ }
}
-RegExpFilter::HotSpot* RegExpFilter::newHotSpot(int startLine,int startColumn,
- int endLine,int endColumn)
-{
- HotSpot *spot = new RegExpFilter::HotSpot(startLine,startColumn,
- endLine,endColumn);
- spot->setColor(color());
+RegExpFilter::HotSpot *RegExpFilter::newHotSpot(int startLine, int startColumn,
+ int endLine, int endColumn) {
+ HotSpot *spot =
+ new RegExpFilter::HotSpot(startLine, startColumn, endLine, endColumn);
+ spot->setColor(color());
return spot;
}
-RegExpFilter::HotSpot* UrlFilter::newHotSpot(int startLine,int startColumn,int endLine,
- int endColumn)
-{
- HotSpot *spot = new UrlFilter::HotSpot(startLine,startColumn,
- endLine,endColumn);
- connect(spot->getUrlObject(), &FilterObject::activated, this, &UrlFilter::activated);
+
+RegExpFilter::HotSpot *UrlFilter::newHotSpot(int startLine, int startColumn,
+ int endLine, int endColumn) {
+ HotSpot *spot =
+ new UrlFilter::HotSpot(startLine, startColumn, endLine, endColumn);
+ connect(spot->getUrlObject(), &FilterObject::activated, this,
+ &UrlFilter::activated);
return spot;
}
-UrlFilter::HotSpot::HotSpot(int startLine,int startColumn,int endLine,int endColumn)
-: RegExpFilter::HotSpot(startLine,startColumn,endLine,endColumn)
-, _urlObject(new FilterObject(this))
-{
+UrlFilter::HotSpot::HotSpot(int startLine, int startColumn, int endLine,
+ int endColumn)
+ : RegExpFilter::HotSpot(startLine, startColumn, endLine, endColumn),
+ _urlObject(new FilterObject(this)) {
setType(Link);
}
-UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const
-{
+UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const {
QString url = capturedTexts().constFirst();
- if ( FullUrlRegExp.match(url).hasMatch() )
+ if (FullUrlRegExp.match(url).hasMatch())
return StandardUrl;
- else if ( EmailAddressRegExp.match(url).hasMatch() )
+ else if (EmailAddressRegExp.match(url).hasMatch())
return Email;
- else if ( FilePathRegExp.match(url).hasMatch() )
+ else if (FilePathRegExp.match(url).hasMatch())
return FilePath;
else
return Unknown;
}
-bool UrlFilter::HotSpot::hasClickAction(void)
-{
+bool UrlFilter::HotSpot::hasClickAction(void) {
const UrlType kind = urlType();
- if ( kind == StandardUrl ) {
+ if (kind == StandardUrl) {
return true;
- } else if ( kind == FilePath ) {
+ } else if (kind == FilePath) {
return true;
}
return false;
}
-QString UrlFilter::HotSpot::clickActionToolTip(void)
-{
+QString UrlFilter::HotSpot::clickActionToolTip(void) {
const UrlType kind = urlType();
- if ( kind == StandardUrl ) {
+ if (kind == StandardUrl) {
return tr("Follow link (ctrl + click)");
- } else if ( kind == FilePath ) {
+ } else if (kind == FilePath) {
return tr("Follow path (ctrl + click)");
}
return QString();
}
-void UrlFilter::HotSpot::clickAction(void)
-{
+void UrlFilter::HotSpot::clickAction(void) {
QString url = capturedTexts().constFirst();
const UrlType kind = urlType();
- if ( kind == StandardUrl ) {
+ if (kind == StandardUrl) {
// if the URL path does not include the protocol ( eg. "www.kde.org" ) then
// prepend http:// ( eg. "www.kde.org" --> "http://www.kde.org" )
if (!url.contains(QLatin1String("://"))) {
url.prepend(QLatin1String("http://"));
}
- } else if ( kind == FilePath ) {
- url.replace(QLatin1Char('\\'),QLatin1Char('/'));
- url.replace(QLatin1Char('~'),QDir::homePath());
- if(url.startsWith(QLatin1String("/"))) {
+ } else if (kind == FilePath) {
+ url.replace(QLatin1Char('\\'), QLatin1Char('/'));
+ url.replace(QLatin1Char('~'), QDir::homePath());
+ if (url.startsWith(QLatin1String("/"))) {
url.prepend(QLatin1String("file://"));
- } else if(url.startsWith(QLatin1String("."))) {
+ } else if (url.startsWith(QLatin1String("."))) {
url.prepend(QLatin1String("relative:"));
- } else if(url.startsWith(QLatin1String(".."))) {
+ } else if (url.startsWith(QLatin1String(".."))) {
url.prepend(QLatin1String("relative:"));
} else {
url.prepend(QLatin1String("file:///"));
@@ -486,139 +401,144 @@ void UrlFilter::HotSpot::clickAction(void)
return;
}
- _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), QTermWidget::OpenFromClick);
+ _urlObject->emitActivated(QUrl(url, QUrl::StrictMode),
+ QTermWidget::OpenFromClick);
}
-// Note: Altering these regular expressions can have a major effect on the performance of the filters
-// used for finding URLs in the text, especially if they are very general and could match very long
-// pieces of text.
-// Please be careful when altering them.
+// Note: Altering these regular expressions can have a major effect on the
+// performance of the filters used for finding URLs in the text, especially if
+// they are very general and could match very long pieces of text. Please be
+// careful when altering them.
-//regexp matches:
-// full url:
-// protocolname:// or www. followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
-const QRegularExpression UrlFilter::FullUrlRegExp(QLatin1String("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]"));
+// regexp matches:
+// full url:
+// protocolname:// or www. followed by anything other than whitespaces, <, >, '
+// or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
+const QRegularExpression UrlFilter::FullUrlRegExp(QLatin1String(
+ "(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]"));
// email address:
// [word chars, dots or dashes]@[word chars, dots or dashes].[word chars]
-const QRegularExpression UrlFilter::EmailAddressRegExp(QLatin1String("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b"));
+const QRegularExpression UrlFilter::EmailAddressRegExp(
+ QLatin1String("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b"));
// file path:
-// '[drive letter]:\' '\\' '.\' or '..\' followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
-const QRegularExpression UrlFilter::WindowsFilePathRegExp(QLatin1String("([a-zA-Z]:\\\\|\\\\\\\\|\\.\\\\|\\.\\.\\\\)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]"));
-// '/' '~/' './' or '../' followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
-const QRegularExpression UrlFilter::UnixFilePathRegExp(QLatin1String("((\\./|~/|\\.\\./)[^\\s<>'\"]+|/[^\\s<>'\"]+)[^!,\\.\\s<>'\"\\]]"));
-const QRegularExpression UrlFilter::FilePathRegExp(QLatin1String("(")+
- WindowsFilePathRegExp.pattern()+QLatin1Char('|')+
- UnixFilePathRegExp.pattern()+
- QLatin1Char(')'));
+// '[drive letter]:\' '\\' '.\' or '..\' followed by anything other than
+// whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !,
+// comma and dot
+const QRegularExpression UrlFilter::WindowsFilePathRegExp(
+ QLatin1String("([a-zA-Z]:\\\\|\\\\\\\\|\\.\\\\|\\.\\.\\\\)[^\\s<>'\"]+[^!,"
+ "\\.\\s<>'\"\\]]"));
+// '/' '~/' './' or '../' followed by anything other than whitespaces, <, >, '
+// or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
+const QRegularExpression UrlFilter::UnixFilePathRegExp(QLatin1String(
+ "((\\./|~/|\\.\\./)[^\\s<>'\"]+|/[^\\s<>'\"]+)[^!,\\.\\s<>'\"\\]]"));
+const QRegularExpression UrlFilter::FilePathRegExp(
+ QLatin1String("(") + WindowsFilePathRegExp.pattern() + QLatin1Char('|') +
+ UnixFilePathRegExp.pattern() + QLatin1Char(')'));
// matches full url or email address
-const QRegularExpression UrlFilter::CompleteUrlRegExp(QLatin1Char('(')+
- FullUrlRegExp.pattern()+QLatin1Char('|')+
- EmailAddressRegExp.pattern()+QLatin1Char('|')+
- FilePathRegExp.pattern()+
- QLatin1Char(')'));
+const QRegularExpression UrlFilter::CompleteUrlRegExp(
+ QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') +
+ EmailAddressRegExp.pattern() + QLatin1Char('|') + FilePathRegExp.pattern() +
+ QLatin1Char(')'));
-UrlFilter::UrlFilter() : RegExpFilter()
-{
- setRegExp( CompleteUrlRegExp );
+UrlFilter::UrlFilter() : RegExpFilter() {
+ setRegExp(CompleteUrlRegExp);
}
-UrlFilter::HotSpot::~HotSpot()
-{
- delete _urlObject;
+UrlFilter::HotSpot::~HotSpot() {
+ delete _urlObject;
}
-void FilterObject::emitActivated(const QUrl& url, uint32_t opcode)
-{
+void FilterObject::emitActivated(const QUrl &url, uint32_t opcode) {
emit activated(url, opcode);
}
-FilterObject* UrlFilter::HotSpot::getUrlObject() const
-{
- return _urlObject;
-}
+FilterObject *UrlFilter::HotSpot::getUrlObject() const { return _urlObject; }
-QList UrlFilter::HotSpot::actions()
-{
- QList list;
+QList UrlFilter::HotSpot::actions() {
+ QList list;
const UrlType kind = urlType();
- Q_ASSERT( kind == StandardUrl || kind == Email || kind == FilePath );
+ Q_ASSERT(kind == StandardUrl || kind == Email || kind == FilePath);
- if ( kind == StandardUrl ) {
- QAction* openLinkAction = new QAction(_urlObject);
- QAction* copyLinkAction = new QAction(_urlObject);
+ if (kind == StandardUrl) {
+ QAction *openLinkAction = new QAction(_urlObject);
+ QAction *copyLinkAction = new QAction(_urlObject);
openLinkAction->setText(QObject::tr("Open Link"));
copyLinkAction->setText(QObject::tr("Copy Link Address"));
- QObject::connect( openLinkAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(openLinkAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
- // if the URL path does not include the protocol ( eg. "www.kde.org" ) then
- // prepend http:// ( eg. "www.kde.org" --> "http://www.kde.org" )
+ // if the URL path does not include the protocol ( eg. "www.kde.org" )
+ // then prepend http:// ( eg. "www.kde.org" --> "http://www.kde.org" )
if (!url.contains(QLatin1String("://"))) {
url.prepend(QLatin1String("http://"));
}
- _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), QTermWidget::OpenFromContextMenu);
+ _urlObject->emitActivated(QUrl(url, QUrl::StrictMode),
+ QTermWidget::OpenFromContextMenu);
});
- QObject::connect( copyLinkAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(copyLinkAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
QApplication::clipboard()->setText(url);
});
list << openLinkAction;
list << copyLinkAction;
- } else if ( kind == Email ) {
- QAction* sendEmailAction = new QAction(_urlObject);
- QAction* copyEmailAction = new QAction(_urlObject);
+ } else if (kind == Email) {
+ QAction *sendEmailAction = new QAction(_urlObject);
+ QAction *copyEmailAction = new QAction(_urlObject);
sendEmailAction->setText(QObject::tr("Send Email To..."));
copyEmailAction->setText(QObject::tr("Copy Email Address"));
- QObject::connect( sendEmailAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(sendEmailAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
url.prepend(QLatin1String("mailto:"));
- _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), QTermWidget::OpenFromContextMenu);
+ _urlObject->emitActivated(QUrl(url, QUrl::StrictMode),
+ QTermWidget::OpenFromContextMenu);
});
- QObject::connect( copyEmailAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(copyEmailAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
QApplication::clipboard()->setText(url);
});
list << sendEmailAction;
list << copyEmailAction;
- } else if ( kind == FilePath ) {
- QAction* openPathAction = new QAction(_urlObject);
- QAction* openContainingPathAction = new QAction(_urlObject);
- QAction* copyPathAction = new QAction(_urlObject);
+ } else if (kind == FilePath) {
+ QAction *openPathAction = new QAction(_urlObject);
+ QAction *openContainingPathAction = new QAction(_urlObject);
+ QAction *copyPathAction = new QAction(_urlObject);
openPathAction->setText(QObject::tr("Open Path"));
openContainingPathAction->setText(QObject::tr("Open Containing Folder"));
copyPathAction->setText(QObject::tr("Copy Path"));
- QObject::connect( openPathAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(openPathAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
- url.replace(QLatin1Char('\\'),QLatin1Char('/'));
- url.replace(QLatin1Char('~'),QDir::homePath());
- if(url.startsWith(QLatin1String("/"))) {
+ url.replace(QLatin1Char('\\'), QLatin1Char('/'));
+ url.replace(QLatin1Char('~'), QDir::homePath());
+ if (url.startsWith(QLatin1String("/"))) {
url.prepend(QLatin1String("file://"));
- } else if(url.startsWith(QLatin1String("."))) {
+ } else if (url.startsWith(QLatin1String("."))) {
url.prepend(QLatin1String("relative:"));
- } else if(url.startsWith(QLatin1String(".."))) {
+ } else if (url.startsWith(QLatin1String(".."))) {
url.prepend(QLatin1String("relative:"));
} else {
url.prepend(QLatin1String("file:///"));
}
- _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), QTermWidget::OpenFromContextMenu);
+ _urlObject->emitActivated(QUrl(url, QUrl::StrictMode),
+ QTermWidget::OpenFromContextMenu);
});
- QObject::connect( openContainingPathAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(openContainingPathAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
- url.replace(QLatin1Char('\\'),QLatin1Char('/'));
- url.replace(QLatin1Char('~'),QDir::homePath());
- if(url.startsWith(QLatin1String("/"))) {
+ url.replace(QLatin1Char('\\'), QLatin1Char('/'));
+ url.replace(QLatin1Char('~'), QDir::homePath());
+ if (url.startsWith(QLatin1String("/"))) {
url.prepend(QLatin1String("file://"));
- } else if(url.startsWith(QLatin1String("."))) {
+ } else if (url.startsWith(QLatin1String("."))) {
url.prepend(QLatin1String("relative:"));
- } else if(url.startsWith(QLatin1String(".."))) {
+ } else if (url.startsWith(QLatin1String(".."))) {
url.prepend(QLatin1String("relative:"));
} else {
url.prepend(QLatin1String("file:///"));
}
- _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), QTermWidget::OpenContainingFromContextMenu);
+ _urlObject->emitActivated(QUrl(url, QUrl::StrictMode),
+ QTermWidget::OpenContainingFromContextMenu);
});
- QObject::connect( copyPathAction , &QAction::triggered , _urlObject , [&](void) {
+ QObject::connect(copyPathAction, &QAction::triggered, _urlObject, [&](void) {
QString url = capturedTexts().constFirst();
QApplication::clipboard()->setText(url);
});
diff --git a/lib/qtermwidget/Filter.h b/lib/qtermwidget/Filter.h
index 2ad71f5d..f05a5961 100644
--- a/lib/qtermwidget/Filter.h
+++ b/lib/qtermwidget/Filter.h
@@ -1,20 +1,20 @@
/*
- Copyright 2007-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2007-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef FILTER_H
@@ -64,70 +64,68 @@ class Filter : public QObject
* Hotspots may have more than one action, in which case the list of actions can be obtained using the
* actions() method. These actions may then be displayed in a popup menu or toolbar for example.
*/
- class HotSpot
- {
+ class HotSpot {
public:
- /**
- * Constructs a new hotspot which covers the area from (@p startLine,@p startColumn) to (@p endLine,@p endColumn)
- * in a block of text.
- */
- HotSpot(int startLine , int startColumn , int endLine , int endColumn);
- virtual ~HotSpot();
-
- enum Type
- {
+ /**
+ * Constructs a new hotspot which covers the area from (@p startLine,@p startColumn) to (@p endLine,@p endColumn)
+ * in a block of text.
+ */
+ HotSpot(int startLine , int startColumn , int endLine , int endColumn);
+ virtual ~HotSpot();
+
+ enum Type {
// the type of the hotspot is not specified
NotSpecified,
// this hotspot represents a clickable link
Link,
// this hotspot represents a marker
Marker
- };
-
- /** Returns the line when the hotspot area starts */
- int startLine() const;
- /** Returns the line where the hotspot area ends */
- int endLine() const;
- /** Returns the column on startLine() where the hotspot area starts */
- int startColumn() const;
- /** Returns the column on endLine() where the hotspot area ends */
- int endColumn() const;
-
- /**
- * Returns the type of the hotspot. This is usually used as a hint for views on how to represent
- * the hotspot graphically. eg. Link hotspots are typically underlined when the user mouses over them
- */
- Type type() const;
- QColor color() const;
- void setColor(const QColor& color);
- /**
- * Causes the an action associated with a hotspot to be triggered.
- *
- * @param action The action to trigger. This is
- * typically empty ( in which case the default action should be performed ) or
- * one of the object names from the actions() list. In which case the associated
- * action should be performed.
- */
- virtual void clickAction(void) = 0;
- virtual QString clickActionToolTip(void) = 0;
- virtual bool hasClickAction(void) = 0;
- /**
- * Returns a list of actions associated with the hotspot which can be used in a
- * menu or toolbar
- */
- virtual QList actions();
+ };
+
+ /** Returns the line when the hotspot area starts */
+ int startLine() const;
+ /** Returns the line where the hotspot area ends */
+ int endLine() const;
+ /** Returns the column on startLine() where the hotspot area starts */
+ int startColumn() const;
+ /** Returns the column on endLine() where the hotspot area ends */
+ int endColumn() const;
+
+ /**
+ * Returns the type of the hotspot. This is usually used as a hint for views on how to represent
+ * the hotspot graphically. eg. Link hotspots are typically underlined when the user mouses over them
+ */
+ Type type() const;
+ QColor color() const;
+ void setColor(const QColor& color);
+ /**
+ * Causes the an action associated with a hotspot to be triggered.
+ *
+ * @param action The action to trigger. This is
+ * typically empty ( in which case the default action should be performed ) or
+ * one of the object names from the actions() list. In which case the associated
+ * action should be performed.
+ */
+ virtual void clickAction(void) = 0;
+ virtual QString clickActionToolTip(void) = 0;
+ virtual bool hasClickAction(void) = 0;
+ /**
+ * Returns a list of actions associated with the hotspot which can be used in a
+ * menu or toolbar
+ */
+ virtual QList actions();
protected:
- /** Sets the type of a hotspot. This should only be set once */
- void setType(Type type);
+ /** Sets the type of a hotspot. This should only be set once */
+ void setType(Type type);
private:
- int _startLine;
- int _startColumn;
- int _endLine;
- int _endColumn;
- Type _type;
- QColor _color;
+ int _startLine;
+ int _startColumn;
+ int _endLine;
+ int _endColumn;
+ Type _type;
+ QColor _color;
};
/** Constructs a new filter. */
@@ -191,8 +189,7 @@ class RegExpFilter : public Filter
* Type of hotspot created by RegExpFilter. The capturedTexts() method can be used to find the text
* matched by the filter's regular expression.
*/
- class HotSpot : public Filter::HotSpot
- {
+ class HotSpot : public Filter::HotSpot {
public:
HotSpot(int startLine, int startColumn, int endLine , int endColumn);
void clickAction(void) override;
@@ -257,8 +254,7 @@ class UrlFilter : public RegExpFilter
* Hotspot type created by UrlFilter instances. The activate() method opens a web browser
* at the given URL when called.
*/
- class HotSpot : public RegExpFilter::HotSpot
- {
+ class HotSpot : public RegExpFilter::HotSpot {
public:
HotSpot(int startLine,int startColumn,int endLine,int endColumn);
~HotSpot() override;
@@ -276,8 +272,7 @@ class UrlFilter : public RegExpFilter
bool hasClickAction(void) override;
private:
- enum UrlType
- {
+ enum UrlType {
StandardUrl,
Email,
FilePath,
diff --git a/lib/qtermwidget/History.cpp b/lib/qtermwidget/History.cpp
index 3e15f4be..1a14f6b7 100644
--- a/lib/qtermwidget/History.cpp
+++ b/lib/qtermwidget/History.cpp
@@ -1,29 +1,29 @@
/*
- This file is part of Konsole, an X terminal.
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include "History.h"
#include
-#include
-#include
#include
+#include
+#include
#if defined(Q_OS_WIN)
#include
#else
@@ -36,946 +36,733 @@
#include
// Reasonable line size
-#define LINE_SIZE 1024
+#define LINE_SIZE 1024
/*
- An arbitrary long scroll.
+ An arbitrary long scroll.
- One can modify the scroll only by adding either cells
- or newlines, but access it randomly.
+ One can modify the scroll only by adding either cells
+ or newlines, but access it randomly.
- The model is that of an arbitrary wide typewriter scroll
- in that the scroll is a serie of lines and each line is
- a serie of cells with no overwriting permitted.
+ The model is that of an arbitrary wide typewriter scroll
+ in that the scroll is a serie of lines and each line is
+ a serie of cells with no overwriting permitted.
- The implementation provides arbitrary length and numbers
- of cells and line/column indexed read access to the scroll
- at constant costs.
+ The implementation provides arbitrary length and numbers
+ of cells and line/column indexed read access to the scroll
+ at constant costs.
-KDE4: Can we use QTemporaryFile here, instead of KTempFile?
+ KDE4: Can we use QTemporaryFile here, instead of KTempFile?
-FIXME: some complain about the history buffer consuming the
- memory of their machines. This problem is critical
- since the history does not behave gracefully in cases
- where the memory is used up completely.
+ FIXME: some complain about the history buffer consuming the
+ memory of their machines. This problem is critical
+ since the history does not behave gracefully in cases
+ where the memory is used up completely.
- I put in a workaround that should handle it problem
- now gracefully. I'm not satisfied with the solution.
+ I put in a workaround that should handle it problem
+ now gracefully. I'm not satisfied with the solution.
-FIXME: Terminating the history is not properly indicated
- in the menu. We should throw a signal.
+ FIXME: Terminating the history is not properly indicated
+ in the menu. We should throw a signal.
-FIXME: There is noticeable decrease in speed, also. Perhaps,
- there whole feature needs to be revisited therefore.
- Disadvantage of a more elaborated, say block-oriented
- scheme with wrap around would be it's complexity.
+ FIXME: There is noticeable decrease in speed, also. Perhaps,
+ there whole feature needs to be revisited therefore.
+ Disadvantage of a more elaborated, say block-oriented
+ scheme with wrap around would be it's complexity.
*/
-//FIXME: temporary replacement for tmpfile
-// this is here one for debugging purpose.
-
-//#define tmpfile xTmpFile
-
-// History File ///////////////////////////////////////////
-
/*
A Row(X) data type which allows adding elements to the end.
*/
HistoryFile::HistoryFile()
- : ion(-1),
- length(0),
- fileMap(nullptr),
- readWriteBalance(0)
-{
- if (tmpFile.open())
- {
- tmpFile.setAutoRemove(true);
- ion = tmpFile.handle();
- }
-}
-
-HistoryFile::~HistoryFile()
-{
+ : ion(-1)
+ , length(0)
+ , fileMap(nullptr)
+ , readWriteBalance(0) {
+ if (tmpFile.open()) {
+ tmpFile.setAutoRemove(true);
+ ion = tmpFile.handle();
+ }
+}
+
+HistoryFile::~HistoryFile() {
if (fileMap)
unmap();
}
-//TODO: Mapping the entire file in will cause problems if the history file becomes exceedingly large,
-//(ie. larger than available memory). HistoryFile::map() should only map in sections of the file at a time,
-//to avoid this.
-void HistoryFile::map()
-{
- Q_ASSERT( fileMap == nullptr );
+// TODO: Mapping the entire file in will cause problems if the history file
+// becomes exceedingly large, (ie. larger than available memory).
+//HistoryFile::map() should only map in sections of the file at a time, to avoid
+// this.
+void HistoryFile::map() {
+ Q_ASSERT(fileMap == nullptr);
#if defined(Q_OS_WIN)
readWriteBalance = 0;
fileMap = nullptr;
#else
- fileMap = (char*)mmap( nullptr , length , PROT_READ , MAP_PRIVATE , ion , 0 );
+ fileMap = (char *)mmap(nullptr, length, PROT_READ, MAP_PRIVATE, ion, 0);
- //if mmap'ing fails, fall back to the read-lseek combination
- if ( fileMap == MAP_FAILED )
- {
- readWriteBalance = 0;
- fileMap = nullptr;
+ // if mmap'ing fails, fall back to the read-lseek combination
+ if (fileMap == MAP_FAILED) {
+ readWriteBalance = 0;
+ fileMap = nullptr;
}
#endif
}
-void HistoryFile::unmap()
-{
+void HistoryFile::unmap() {
#if defined(Q_OS_WIN)
fileMap = nullptr;
#else
- int result = munmap( fileMap , length );
- Q_ASSERT( result == 0 ); Q_UNUSED( result );
+ int result = munmap(fileMap, length);
+ Q_ASSERT(result == 0);
+ Q_UNUSED(result);
#endif
-
fileMap = nullptr;
}
-bool HistoryFile::isMapped() const
-{
- return (fileMap != nullptr);
+bool HistoryFile::isMapped() const {
+ return (fileMap != nullptr);
}
-void HistoryFile::add(const unsigned char* bytes, int len)
-{
- if ( fileMap )
- unmap();
+void HistoryFile::add(const unsigned char *bytes, int len) {
+ if (fileMap)
+ unmap();
- readWriteBalance++;
+ readWriteBalance++;
- int rc = 0;
+ int rc = 0;
#if defined(Q_OS_WIN)
- tmpFile.seek(length);
- rc = tmpFile.write((const char*)bytes,len);
+ tmpFile.seek(length);
+ rc = tmpFile.write((const char *)bytes, len);
#else
- rc = lseek(ion,length,SEEK_SET); if (rc < 0) { perror("HistoryFile::add.seek"); return; }
- rc = write(ion,bytes,len); if (rc < 0) { perror("HistoryFile::add.write"); return; }
+ rc = lseek(ion, length, SEEK_SET);
+ if (rc < 0) {
+ perror("HistoryFile::add.seek");
+ return;
+ }
+ rc = write(ion, bytes, len);
+ if (rc < 0) {
+ perror("HistoryFile::add.write");
+ return;
+ }
#endif
- length += rc;
-}
-
-void HistoryFile::get(unsigned char* bytes, int len, int loc)
-{
- //count number of get() calls vs. number of add() calls.
- //If there are many more get() calls compared with add()
- //calls (decided by using MAP_THRESHOLD) then mmap the log
- //file to improve performance.
- readWriteBalance--;
- if ( !fileMap && readWriteBalance < MAP_THRESHOLD )
- map();
-
- if ( fileMap )
- {
- for (int i=0;i length)
- fprintf(stderr,"getHist(...,%d,%d): invalid args.\n",len,loc);
-#if defined(Q_OS_WIN)
- tmpFile.seek(loc);
- rc = tmpFile.read((char*)bytes,len);
-#else
- rc = lseek(ion,loc,SEEK_SET); if (rc < 0) { perror("HistoryFile::get.seek"); return; }
- rc = read(ion,bytes,len); if (rc < 0) { perror("HistoryFile::get.read"); return; }
+ length += rc;
+}
+
+void HistoryFile::get(unsigned char *bytes, int len, int loc) {
+ // count number of get() calls vs. number of add() calls.
+ // If there are many more get() calls compared with add()
+ // calls (decided by using MAP_THRESHOLD) then mmap the log
+ // file to improve performance.
+ readWriteBalance--;
+ if (!fileMap && readWriteBalance < MAP_THRESHOLD)
+ map();
+
+ if (fileMap) {
+ for (int i = 0; i < len; i++)
+ bytes[i] = fileMap[loc + i];
+ } else {
+ int rc = 0;
+
+ if (loc < 0 || len < 0 || loc + len > length)
+ fprintf(stderr, "getHist(...,%d,%d): invalid args.\n", len, loc);
+ #if defined(Q_OS_WIN)
+ tmpFile.seek(loc);
+ rc = tmpFile.read((char *)bytes, len);
+ #else
+ rc = lseek(ion, loc, SEEK_SET);
+ if (rc < 0) {
+ perror("HistoryFile::get.seek");
+ return;
+ }
+ rc = read(ion, bytes, len);
+ if (rc < 0) {
+ perror("HistoryFile::get.read");
+ return;
+ }
#endif
- }
+ }
}
-int HistoryFile::len()
-{
- return length;
+int HistoryFile::len() {
+ return length;
}
-
-// History Scroll abstract base class //////////////////////////////////////
-
-
-HistoryScroll::HistoryScroll(HistoryType* t)
- : m_histType(t)
-{
+HistoryScroll::HistoryScroll(HistoryType *t) : m_histType(t) {
}
-HistoryScroll::~HistoryScroll()
-{
- delete m_histType;
+HistoryScroll::~HistoryScroll() {
+ delete m_histType;
}
-bool HistoryScroll::hasScroll()
-{
- return true;
+bool HistoryScroll::hasScroll() {
+ return true;
}
-// History Scroll File //////////////////////////////////////
-
/*
- The history scroll makes a Row(Row(Cell)) from
- two history buffers. The index buffer contains
- start of line positions which refers to the cells
- buffer.
-
- Note that index[0] addresses the second line
- (line #1), while the first line (line #0) starts
- at 0 in cells.
+ The history scroll makes a Row(Row(Cell)) from
+ two history buffers. The index buffer contains
+ start of line positions which refers to the cells
+ buffer.
+
+ Note that index[0] addresses the second line
+ (line #1), while the first line (line #0) starts
+ at 0 in cells.
*/
-
HistoryScrollFile::HistoryScrollFile(const QString &logFileName)
- : HistoryScroll(new HistoryTypeFile(logFileName)),
- m_logFileName(logFileName)
-{
+ : HistoryScroll(new HistoryTypeFile(logFileName))
+ , m_logFileName(logFileName) {
}
-HistoryScrollFile::~HistoryScrollFile()
-{
+HistoryScrollFile::~HistoryScrollFile() {
}
-int HistoryScrollFile::getLines()
-{
- return index.len() / sizeof(int);
+int HistoryScrollFile::getLines() {
+ return index.len() / sizeof(int);
}
-int HistoryScrollFile::getLineLen(int lineno)
-{
- return (startOfLine(lineno+1) - startOfLine(lineno)) / sizeof(Character);
+int HistoryScrollFile::getLineLen(int lineno) {
+ return (startOfLine(lineno + 1) - startOfLine(lineno)) / sizeof(Character);
}
-bool HistoryScrollFile::isWrappedLine(int lineno)
-{
- if (lineno>=0 && lineno <= getLines()) {
- unsigned char flag;
- lineflags.get((unsigned char*)&flag,sizeof(unsigned char),(lineno)*sizeof(unsigned char));
- return flag;
- }
- return false;
+bool HistoryScrollFile::isWrappedLine(int lineno) {
+ if (lineno >= 0 && lineno <= getLines()) {
+ unsigned char flag;
+ lineflags.get((unsigned char *)&flag, sizeof(unsigned char),
+ (lineno) * sizeof(unsigned char));
+ return flag;
+ }
+ return false;
}
-int HistoryScrollFile::startOfLine(int lineno)
-{
- if (lineno <= 0) return 0;
- if (lineno <= getLines())
- {
- if (!index.isMapped())
- index.map();
+int HistoryScrollFile::startOfLine(int lineno) {
+ if (lineno <= 0)
+ return 0;
+ if (lineno <= getLines()) {
+ if (!index.isMapped())
+ index.map();
- int res = 0;
- index.get((unsigned char*)&res,sizeof(int),(lineno-1)*sizeof(int));
- return res;
+ int res = 0;
+ index.get((unsigned char *)&res, sizeof(int), (lineno - 1) * sizeof(int));
+ return res;
}
- return cells.len();
+ return cells.len();
}
-void HistoryScrollFile::getCells(int lineno, int colno, int count, Character res[])
-{
- cells.get((unsigned char*)res,count*sizeof(Character),startOfLine(lineno)+colno*sizeof(Character));
+void HistoryScrollFile::getCells(int lineno, int colno, int count,
+ Character res[]) {
+ cells.get((unsigned char *)res, count * sizeof(Character),
+ startOfLine(lineno) + colno * sizeof(Character));
}
-void HistoryScrollFile::addCells(const Character text[], int count)
-{
- cells.add((unsigned char*)text,count*sizeof(Character));
+void HistoryScrollFile::addCells(const Character text[], int count) {
+ cells.add((unsigned char *)text, count * sizeof(Character));
}
-void HistoryScrollFile::addLine(bool previousWrapped)
-{
- if (index.isMapped())
- index.unmap();
+void HistoryScrollFile::addLine(bool previousWrapped) {
+ if (index.isMapped())
+ index.unmap();
- int locn = cells.len();
- index.add((unsigned char*)&locn,sizeof(int));
- unsigned char flags = previousWrapped ? 0x01 : 0x00;
- lineflags.add((unsigned char*)&flags,sizeof(unsigned char));
+ int locn = cells.len();
+ index.add((unsigned char *)&locn, sizeof(int));
+ unsigned char flags = previousWrapped ? 0x01 : 0x00;
+ lineflags.add((unsigned char *)&flags, sizeof(unsigned char));
}
-
-// History Scroll Buffer //////////////////////////////////////
HistoryScrollBuffer::HistoryScrollBuffer(unsigned int maxLineCount)
- : HistoryScroll(new HistoryTypeBuffer(maxLineCount))
- ,_historyBuffer()
- ,_maxLineCount(0)
- ,_usedLines(0)
- ,_head(0)
-{
- setMaxNbLines(maxLineCount);
+ : HistoryScroll(new HistoryTypeBuffer(maxLineCount)), _historyBuffer(),
+ _maxLineCount(0), _usedLines(0), _head(0) {
+ setMaxNbLines(maxLineCount);
}
-HistoryScrollBuffer::~HistoryScrollBuffer()
-{
- delete[] _historyBuffer;
+HistoryScrollBuffer::~HistoryScrollBuffer() {
+ delete[] _historyBuffer;
}
-void HistoryScrollBuffer::addCellsVector(const QVector& cells)
-{
+void HistoryScrollBuffer::addCellsVector(const QVector &cells) {
_head++;
- if ( _usedLines < _maxLineCount )
+ if (_usedLines < _maxLineCount)
_usedLines++;
- if ( _head >= _maxLineCount )
- {
+ if (_head >= _maxLineCount) {
_head = 0;
}
- _historyBuffer[bufferIndex(_usedLines-1)] = cells;
- _wrappedLine[bufferIndex(_usedLines-1)] = false;
+ _historyBuffer[bufferIndex(_usedLines - 1)] = cells;
+ _wrappedLine[bufferIndex(_usedLines - 1)] = false;
}
-void HistoryScrollBuffer::addCells(const Character a[], int count)
-{
- HistoryLine newLine(count);
- std::copy(a,a+count,newLine.begin());
- addCellsVector(newLine);
+void HistoryScrollBuffer::addCells(const Character a[], int count) {
+ HistoryLine newLine(count);
+ std::copy(a, a + count, newLine.begin());
+
+ addCellsVector(newLine);
}
-void HistoryScrollBuffer::addLine(bool previousWrapped)
-{
- _wrappedLine[bufferIndex(_usedLines-1)] = previousWrapped;
+void HistoryScrollBuffer::addLine(bool previousWrapped) {
+ _wrappedLine[bufferIndex(_usedLines - 1)] = previousWrapped;
}
-int HistoryScrollBuffer::getLines()
-{
- return _usedLines;
+int HistoryScrollBuffer::getLines() {
+ return _usedLines;
}
-int HistoryScrollBuffer::getLineLen(int lineNumber)
-{
- Q_ASSERT( lineNumber >= 0 && lineNumber < _maxLineCount );
+int HistoryScrollBuffer::getLineLen(int lineNumber) {
+ Q_ASSERT(lineNumber >= 0 && lineNumber < _maxLineCount);
- if ( lineNumber < _usedLines )
- {
- return _historyBuffer[bufferIndex(lineNumber)].size();
- }
- else
- {
- return 0;
- }
+ if (lineNumber < _usedLines) {
+ return _historyBuffer[bufferIndex(lineNumber)].size();
+ } else {
+ return 0;
+ }
}
-bool HistoryScrollBuffer::isWrappedLine(int lineNumber)
-{
- Q_ASSERT( lineNumber >= 0 && lineNumber < _maxLineCount );
+bool HistoryScrollBuffer::isWrappedLine(int lineNumber) {
+ Q_ASSERT(lineNumber >= 0 && lineNumber < _maxLineCount);
- if (lineNumber < _usedLines)
- {
- return _wrappedLine[bufferIndex(lineNumber)];
- }
- else
- return false;
+ if (lineNumber < _usedLines) {
+ return _wrappedLine[bufferIndex(lineNumber)];
+ } else
+ return false;
}
-void HistoryScrollBuffer::getCells(int lineNumber, int startColumn, int count, Character buffer[])
-{
- if ( count == 0 ) return;
+void HistoryScrollBuffer::getCells(int lineNumber, int startColumn, int count,
+ Character buffer[]) {
+ if (count == 0)
+ return;
- Q_ASSERT( lineNumber < _maxLineCount );
+ Q_ASSERT(lineNumber < _maxLineCount);
- if (lineNumber >= _usedLines)
- {
- memset(static_cast(buffer), 0, count * sizeof(Character));
- return;
- }
+ if (lineNumber >= _usedLines) {
+ memset(static_cast(buffer), 0, count * sizeof(Character));
+ return;
+ }
- const HistoryLine& line = _historyBuffer[bufferIndex(lineNumber)];
+ const HistoryLine &line = _historyBuffer[bufferIndex(lineNumber)];
- Q_ASSERT( startColumn <= line.size() - count );
+ Q_ASSERT(startColumn <= line.size() - count);
- memcpy(buffer, line.constData() + startColumn , count * sizeof(Character));
+ memcpy(buffer, line.constData() + startColumn, count * sizeof(Character));
}
-void HistoryScrollBuffer::setMaxNbLines(unsigned int lineCount)
-{
- HistoryLine* oldBuffer = _historyBuffer;
- HistoryLine* newBuffer = new HistoryLine[lineCount];
+void HistoryScrollBuffer::setMaxNbLines(unsigned int lineCount) {
+ HistoryLine *oldBuffer = _historyBuffer;
+ HistoryLine *newBuffer = new HistoryLine[lineCount];
- for ( int i = 0 ; i < qMin(_usedLines,(int)lineCount) ; i++ )
- {
+ for (int i = 0; i < qMin(_usedLines, (int)lineCount); i++) {
newBuffer[i] = oldBuffer[bufferIndex(i)];
}
- _usedLines = qMin(_usedLines,(int)lineCount);
+ _usedLines = qMin(_usedLines, (int)lineCount);
_maxLineCount = lineCount;
- _head = ( _usedLines == _maxLineCount ) ? 0 : _usedLines-1;
+ _head = (_usedLines == _maxLineCount) ? 0 : _usedLines - 1;
_historyBuffer = newBuffer;
delete[] oldBuffer;
_wrappedLine.resize(lineCount);
- dynamic_cast(m_histType)->m_nbLines = lineCount;
+ dynamic_cast(m_histType)->m_nbLines = lineCount;
}
-int HistoryScrollBuffer::bufferIndex(int lineNumber) const
-{
- Q_ASSERT( lineNumber >= 0 );
- Q_ASSERT( lineNumber < _maxLineCount );
- Q_ASSERT( (_usedLines == _maxLineCount) || lineNumber <= _head );
+int HistoryScrollBuffer::bufferIndex(int lineNumber) const {
+ Q_ASSERT(lineNumber >= 0);
+ Q_ASSERT(lineNumber < _maxLineCount);
+ Q_ASSERT((_usedLines == _maxLineCount) || lineNumber <= _head);
- if ( _usedLines == _maxLineCount )
- {
- return (_head+lineNumber+1) % _maxLineCount;
- }
- else
- {
+ if (_usedLines == _maxLineCount) {
+ return (_head + lineNumber + 1) % _maxLineCount;
+ } else {
return lineNumber;
}
}
-
-// History Scroll None //////////////////////////////////////
-
-HistoryScrollNone::HistoryScrollNone()
- : HistoryScroll(new HistoryTypeNone())
-{
-}
-
-HistoryScrollNone::~HistoryScrollNone()
-{
-}
-
-bool HistoryScrollNone::hasScroll()
-{
- return false;
-}
-
-int HistoryScrollNone::getLines()
-{
- return 0;
-}
-
-int HistoryScrollNone::getLineLen(int)
-{
- return 0;
-}
-
-bool HistoryScrollNone::isWrappedLine(int /*lineno*/)
-{
- return false;
-}
-
-void HistoryScrollNone::getCells(int, int, int, Character [])
-{
-}
-
-void HistoryScrollNone::addCells(const Character [], int)
-{
-}
-
-void HistoryScrollNone::addLine(bool)
-{
-}
-
-// History Scroll BlockArray //////////////////////////////////////
+HistoryScrollNone::HistoryScrollNone() : HistoryScroll(new HistoryTypeNone()) {}
+HistoryScrollNone::~HistoryScrollNone() {}
+bool HistoryScrollNone::hasScroll() { return false; }
+int HistoryScrollNone::getLines() { return 0; }
+int HistoryScrollNone::getLineLen(int) { return 0; }
+bool HistoryScrollNone::isWrappedLine(int /*lineno*/) { return false; }
+void HistoryScrollNone::getCells(int, int, int, Character[]) {}
+void HistoryScrollNone::addCells(const Character[], int) {}
+void HistoryScrollNone::addLine(bool) {}
HistoryScrollBlockArray::HistoryScrollBlockArray(size_t size)
- : HistoryScroll(new HistoryTypeBlockArray(size))
-{
- m_blockArray.setHistorySize(size); // nb. of lines.
+ : HistoryScroll(new HistoryTypeBlockArray(size)) {
+ m_blockArray.setHistorySize(size); // nb. of lines.
}
-HistoryScrollBlockArray::~HistoryScrollBlockArray()
-{
+HistoryScrollBlockArray::~HistoryScrollBlockArray() {
}
-int HistoryScrollBlockArray::getLines()
-{
- return m_lineLengths.count();
+int HistoryScrollBlockArray::getLines() {
+ return m_lineLengths.count();
}
-int HistoryScrollBlockArray::getLineLen(int lineno)
-{
- if ( m_lineLengths.contains(lineno) )
+int HistoryScrollBlockArray::getLineLen(int lineno) {
+ if (m_lineLengths.contains(lineno))
return m_lineLengths[lineno];
else
return 0;
}
-bool HistoryScrollBlockArray::isWrappedLine(int /*lineno*/)
-{
- return false;
+bool HistoryScrollBlockArray::isWrappedLine(int /*lineno*/) {
+ return false;
}
-void HistoryScrollBlockArray::getCells(int lineno, int colno,
- int count, Character res[])
-{
- if (!count) return;
+void HistoryScrollBlockArray::getCells(int lineno, int colno, int count,
+ Character res[]) {
+ if (!count)
+ return;
- const Block *b = m_blockArray.at(lineno);
+ const Block *b = m_blockArray.at(lineno);
- if (!b) {
- memset(static_cast(res), 0, count * sizeof(Character)); // still better than random data
- return;
- }
+ if (!b) {
+ memset(static_cast(res), 0,
+ count * sizeof(Character)); // still better than random data
+ return;
+ }
- Q_ASSERT(((colno + count) * sizeof(Character)) < ENTRIES);
- memcpy(res, b->data + (colno * sizeof(Character)), count * sizeof(Character));
+ Q_ASSERT(((colno + count) * sizeof(Character)) < ENTRIES);
+ memcpy(res, b->data + (colno * sizeof(Character)), count * sizeof(Character));
}
-void HistoryScrollBlockArray::addCells(const Character a[], int count)
-{
- Block *b = m_blockArray.lastBlock();
-
- if (!b) return;
+void HistoryScrollBlockArray::addCells(const Character a[], int count) {
+ Block *b = m_blockArray.lastBlock();
- // put cells in block's data
- Q_ASSERT((count * sizeof(Character)) < ENTRIES);
+ if (!b)
+ return;
- memset(b->data, 0, sizeof(b->data));
+ // put cells in block's data
+ Q_ASSERT((count * sizeof(Character)) < ENTRIES);
- memcpy(b->data, a, count * sizeof(Character));
- b->size = count * sizeof(Character);
+ memset(b->data, 0, sizeof(b->data));
- size_t res = m_blockArray.newBlock();
- Q_ASSERT(res > 0);
- Q_UNUSED( res );
+ memcpy(b->data, a, count * sizeof(Character));
+ b->size = count * sizeof(Character);
- m_lineLengths.insert(m_blockArray.getCurrent(), count);
-}
+ size_t res = m_blockArray.newBlock();
+ Q_ASSERT(res > 0);
+ Q_UNUSED(res);
-void HistoryScrollBlockArray::addLine(bool)
-{
+ m_lineLengths.insert(m_blockArray.getCurrent(), count);
}
-////////////////////////////////////////////////////////////////
-// Compact History Scroll //////////////////////////////////////
-////////////////////////////////////////////////////////////////
-void* CompactHistoryBlock::allocate ( size_t length )
-{
- Q_ASSERT ( length > 0 );
- if ( tail-blockStart+length > blockLength )
- return nullptr;
-
- void* block = tail;
- tail += length;
- allocCount++;
- return block;
+void HistoryScrollBlockArray::addLine(bool) {
}
-void CompactHistoryBlock::deallocate ( )
-{
- allocCount--;
- Q_ASSERT ( allocCount >= 0 );
-}
+void *CompactHistoryBlock::allocate(size_t length) {
+ Q_ASSERT(length > 0);
+ if (tail - blockStart + length > blockLength)
+ return nullptr;
-void* CompactHistoryBlockList::allocate(size_t size)
-{
- CompactHistoryBlock* block;
- if ( list.isEmpty() || list.last()->remaining() < size)
- {
- block = new CompactHistoryBlock();
- list.append ( block );
- }
- else
- {
- block = list.last();
- }
- return block->allocate(size);
+ void *block = tail;
+ tail += length;
+ allocCount++;
+ return block;
}
-void CompactHistoryBlockList::deallocate(void* ptr)
-{
- Q_ASSERT( !list.isEmpty());
-
- int i=0;
- CompactHistoryBlock *block = list.at(i);
- while ( icontains(ptr) )
- {
- i++;
- block=list.at(i);
- }
-
- Q_ASSERT( ideallocate();
-
- if (!block->isInUse())
- {
- list.removeAt(i);
- delete block;
- }
+void CompactHistoryBlock::deallocate() {
+ allocCount--;
+ Q_ASSERT(allocCount >= 0);
}
-CompactHistoryBlockList::~CompactHistoryBlockList()
-{
- qDeleteAll ( list.begin(), list.end() );
- list.clear();
-}
-
-void* CompactHistoryLine::operator new (size_t size, CompactHistoryBlockList& blockList)
-{
- return blockList.allocate(size);
-}
-
-CompactHistoryLine::CompactHistoryLine ( const TextLine& line, CompactHistoryBlockList& bList )
- : blockList(bList),
- formatLength(0)
-{
- length=line.size();
-
- if (!line.empty()) {
- formatLength=1;
- int k=1;
-
- // count number of different formats in this text line
- Character c = line[0];
- while ( kremaining() < size) {
+ block = new CompactHistoryBlock();
+ list.append(block);
+ } else {
+ block = list.last();
}
- }
+ return block->allocate(size);
}
-CompactHistoryLine::~CompactHistoryLine()
-{
- if (length>0) {
- blockList.deallocate(text);
- blockList.deallocate(formatArray);
- }
- blockList.deallocate(this);
-}
+void CompactHistoryBlockList::deallocate(void *ptr) {
+ Q_ASSERT(!list.isEmpty());
-void CompactHistoryLine::getCharacter ( int index, Character &r )
-{
- Q_ASSERT ( index < length );
- int formatPos=0;
- while ( ( formatPos+1 ) < formatLength && index >= formatArray[formatPos+1].startPos )
- formatPos++;
+ int i = 0;
+ CompactHistoryBlock *block = list.at(i);
+ while (i < list.size() && !block->contains(ptr)) {
+ i++;
+ block = list.at(i);
+ }
- r.character=text[index];
- r.rendition = formatArray[formatPos].rendition;
- r.foregroundColor = formatArray[formatPos].fgColor;
- r.backgroundColor = formatArray[formatPos].bgColor;
-}
+ Q_ASSERT(i < list.size());
-void CompactHistoryLine::getCharacters ( Character* array, int length, int startColumn )
-{
- Q_ASSERT ( startColumn >= 0 && length >= 0 );
- Q_ASSERT ( startColumn+length <= ( int ) getLength() );
+ block->deallocate();
- for ( int i=startColumn; iisInUse()) {
+ list.removeAt(i);
+ delete block;
+ }
}
-CompactHistoryScroll::CompactHistoryScroll ( unsigned int maxLineCount )
- : HistoryScroll ( new CompactHistoryType ( maxLineCount ) )
- ,lines()
- ,blockList()
-{
- setMaxNbLines ( maxLineCount );
+CompactHistoryBlockList::~CompactHistoryBlockList() {
+ qDeleteAll(list.begin(), list.end());
+ list.clear();
+}
+
+void *CompactHistoryLine::operator new(size_t size, CompactHistoryBlockList &blockList) {
+ return blockList.allocate(size);
+}
+
+CompactHistoryLine::CompactHistoryLine(const TextLine &line,
+ CompactHistoryBlockList &bList)
+ : blockList(bList), formatLength(0) {
+ length = line.size();
+
+ if (!line.empty()) {
+ formatLength = 1;
+ int k = 1;
+
+ // count number of different formats in this text line
+ Character c = line[0];
+ while (k < length) {
+ if (!(line[k].equalsFormat(c))) {
+ formatLength++; // format change detected
+ c = line[k];
+ }
+ k++;
+ }
+
+ formatArray = (CharacterFormat *)blockList.allocate(
+ sizeof(CharacterFormat) * formatLength);
+ Q_ASSERT(formatArray != nullptr);
+ text = (quint16 *)blockList.allocate(sizeof(quint16) * line.size());
+ Q_ASSERT(text != nullptr);
+
+ length = line.size();
+ wrapped = false;
+
+ // record formats and their positions in the format array
+ c = line[0];
+ formatArray[0].setFormat(c);
+ formatArray[0].startPos = 0; // there's always at least 1 format (for the
+ // entire line, unless a change happens)
+
+ k = 1; // look for possible format changes
+ int j = 1;
+ while (k < length && j < formatLength) {
+ if (!(line[k].equalsFormat(c))) {
+ c = line[k];
+ formatArray[j].setFormat(c);
+ formatArray[j].startPos = k;
+ j++;
+ }
+ k++;
+ }
+
+ // copy character values
+ for (int i = 0; i < line.size(); i++) {
+ text[i] = line[i].character;
+ }
+ }
}
-CompactHistoryScroll::~CompactHistoryScroll()
-{
- qDeleteAll ( lines.begin(), lines.end() );
- lines.clear();
+CompactHistoryLine::~CompactHistoryLine() {
+ if (length > 0) {
+ blockList.deallocate(text);
+ blockList.deallocate(formatArray);
+ }
+ blockList.deallocate(this);
}
-void CompactHistoryScroll::addCellsVector ( const TextLine& cells )
-{
- CompactHistoryLine *line;
- line = new(blockList) CompactHistoryLine ( cells, blockList );
-
- if ( lines.size() > ( int ) _maxLineCount )
- {
- delete lines.takeAt ( 0 );
- }
- lines.append ( line );
-}
+void CompactHistoryLine::getCharacter(int index, Character &r) {
+ Q_ASSERT(index < length);
+ int formatPos = 0;
+ while ((formatPos + 1) < formatLength &&
+ index >= formatArray[formatPos + 1].startPos)
+ formatPos++;
-void CompactHistoryScroll::addCells ( const Character a[], int count )
-{
- TextLine newLine ( count );
- std::copy ( a,a+count,newLine.begin() );
- addCellsVector ( newLine );
+ r.character = text[index];
+ r.rendition = formatArray[formatPos].rendition;
+ r.foregroundColor = formatArray[formatPos].fgColor;
+ r.backgroundColor = formatArray[formatPos].bgColor;
}
-void CompactHistoryScroll::addLine ( bool previousWrapped )
-{
- CompactHistoryLine *line = lines.last();
- line->setWrapped(previousWrapped);
-}
+void CompactHistoryLine::getCharacters(Character *array, int length,
+ int startColumn) {
+ Q_ASSERT(startColumn >= 0 && length >= 0);
+ Q_ASSERT(startColumn + length <= (int)getLength());
-int CompactHistoryScroll::getLines()
-{
- return lines.size();
+ for (int i = startColumn; i < length + startColumn; i++) {
+ getCharacter(i, array[i - startColumn]);
+ }
}
-int CompactHistoryScroll::getLineLen ( int lineNumber )
-{
- Q_ASSERT ( lineNumber >= 0 && lineNumber < lines.size() );
- CompactHistoryLine* line = lines[lineNumber];
- return line->getLength();
+CompactHistoryScroll::CompactHistoryScroll(unsigned int maxLineCount)
+ : HistoryScroll(new CompactHistoryType(maxLineCount)), lines(),
+ blockList() {
+ setMaxNbLines(maxLineCount);
}
-
-void CompactHistoryScroll::getCells ( int lineNumber, int startColumn, int count, Character buffer[] )
-{
- if ( count == 0 ) return;
- Q_ASSERT ( lineNumber < lines.size() );
- CompactHistoryLine* line = lines[lineNumber];
- Q_ASSERT ( startColumn >= 0 );
- Q_ASSERT ( (unsigned int)startColumn <= line->getLength() - count );
- line->getCharacters ( buffer, count, startColumn );
+CompactHistoryScroll::~CompactHistoryScroll() {
+ qDeleteAll(lines.begin(), lines.end());
+ lines.clear();
}
-void CompactHistoryScroll::setMaxNbLines ( unsigned int lineCount )
-{
- _maxLineCount = lineCount;
+void CompactHistoryScroll::addCellsVector(const TextLine &cells) {
+ CompactHistoryLine *line;
+ line = new (blockList) CompactHistoryLine(cells, blockList);
- while (lines.size() > (int) lineCount) {
- delete lines.takeAt(0);
- }
+ if (lines.size() > (int)_maxLineCount) {
+ delete lines.takeAt(0);
+ }
+ lines.append(line);
}
-bool CompactHistoryScroll::isWrappedLine ( int lineNumber )
-{
- Q_ASSERT ( lineNumber < lines.size() );
- return lines[lineNumber]->isWrapped();
+void CompactHistoryScroll::addCells(const Character a[], int count) {
+ TextLine newLine(count);
+ std::copy(a, a + count, newLine.begin());
+ addCellsVector(newLine);
}
-
-//////////////////////////////////////////////////////////////////////
-// History Types
-//////////////////////////////////////////////////////////////////////
-
-HistoryType::HistoryType()
-{
+void CompactHistoryScroll::addLine(bool previousWrapped) {
+ CompactHistoryLine *line = lines.last();
+ line->setWrapped(previousWrapped);
}
-HistoryType::~HistoryType()
-{
+int CompactHistoryScroll::getLines() {
+ return lines.size();
}
-//////////////////////////////
-
-HistoryTypeNone::HistoryTypeNone()
-{
+int CompactHistoryScroll::getLineLen(int lineNumber) {
+ Q_ASSERT(lineNumber >= 0 && lineNumber < lines.size());
+ CompactHistoryLine *line = lines[lineNumber];
+ return line->getLength();
}
-bool HistoryTypeNone::isEnabled() const
-{
- return false;
+void CompactHistoryScroll::getCells(int lineNumber, int startColumn, int count,
+ Character buffer[]) {
+ if (count == 0)
+ return;
+ Q_ASSERT(lineNumber < lines.size());
+ CompactHistoryLine *line = lines[lineNumber];
+ Q_ASSERT(startColumn >= 0);
+ Q_ASSERT((unsigned int)startColumn <= line->getLength() - count);
+ line->getCharacters(buffer, count, startColumn);
}
-HistoryScroll* HistoryTypeNone::scroll(HistoryScroll *old) const
-{
- delete old;
- return new HistoryScrollNone();
-}
+void CompactHistoryScroll::setMaxNbLines(unsigned int lineCount) {
+ _maxLineCount = lineCount;
-int HistoryTypeNone::maximumLineCount() const
-{
- return 0;
+ while (lines.size() > (int)lineCount) {
+ delete lines.takeAt(0);
+ }
}
-//////////////////////////////
-
-HistoryTypeBlockArray::HistoryTypeBlockArray(size_t size)
- : m_size(size)
-{
+bool CompactHistoryScroll::isWrappedLine(int lineNumber) {
+ Q_ASSERT(lineNumber < lines.size());
+ return lines[lineNumber]->isWrapped();
}
-bool HistoryTypeBlockArray::isEnabled() const
-{
- return true;
+HistoryType::HistoryType() {}
+HistoryType::~HistoryType() {}
+HistoryTypeNone::HistoryTypeNone() {}
+bool HistoryTypeNone::isEnabled() const { return false; }
+HistoryScroll *HistoryTypeNone::scroll(HistoryScroll *old) const {
+ delete old;
+ return new HistoryScrollNone();
}
+int HistoryTypeNone::maximumLineCount() const { return 0; }
-int HistoryTypeBlockArray::maximumLineCount() const
-{
- return m_size;
-}
-HistoryScroll* HistoryTypeBlockArray::scroll(HistoryScroll *old) const
-{
- delete old;
- return new HistoryScrollBlockArray(m_size);
+HistoryTypeBlockArray::HistoryTypeBlockArray(size_t size) : m_size(size) {}
+bool HistoryTypeBlockArray::isEnabled() const { return true; }
+int HistoryTypeBlockArray::maximumLineCount() const { return m_size; }
+HistoryScroll *HistoryTypeBlockArray::scroll(HistoryScroll *old) const {
+ delete old;
+ return new HistoryScrollBlockArray(m_size);
}
-
-//////////////////////////////
-
HistoryTypeBuffer::HistoryTypeBuffer(unsigned int nbLines)
- : m_nbLines(nbLines)
-{
-}
-
-bool HistoryTypeBuffer::isEnabled() const
-{
- return true;
-}
-
-int HistoryTypeBuffer::maximumLineCount() const
-{
- return m_nbLines;
+ : m_nbLines(nbLines) {}
+bool HistoryTypeBuffer::isEnabled() const { return true; }
+int HistoryTypeBuffer::maximumLineCount() const { return m_nbLines; }
+HistoryScroll *HistoryTypeBuffer::scroll(HistoryScroll *old) const {
+ if (old) {
+ HistoryScrollBuffer *oldBuffer = dynamic_cast(old);
+ if (oldBuffer) {
+ oldBuffer->setMaxNbLines(m_nbLines);
+ return oldBuffer;
+ }
+
+ HistoryScroll *newScroll = new HistoryScrollBuffer(m_nbLines);
+ int lines = old->getLines();
+ int startLine = 0;
+ if (lines > (int)m_nbLines)
+ startLine = lines - m_nbLines;
+
+ Character line[LINE_SIZE];
+ for (int i = startLine; i < lines; i++) {
+ int size = old->getLineLen(i);
+ if (size > LINE_SIZE) {
+ Character *tmp_line = new Character[size];
+ old->getCells(i, 0, size, tmp_line);
+ newScroll->addCells(tmp_line, size);
+ newScroll->addLine(old->isWrappedLine(i));
+ delete[] tmp_line;
+ } else {
+ old->getCells(i, 0, size, line);
+ newScroll->addCells(line, size);
+ newScroll->addLine(old->isWrappedLine(i));
+ }
+ }
+ delete old;
+ return newScroll;
+ }
+ return new HistoryScrollBuffer(m_nbLines);
}
-HistoryScroll* HistoryTypeBuffer::scroll(HistoryScroll *old) const
-{
- if (old)
- {
- HistoryScrollBuffer *oldBuffer = dynamic_cast(old);
- if (oldBuffer)
- {
- oldBuffer->setMaxNbLines(m_nbLines);
- return oldBuffer;
- }
+HistoryTypeFile::HistoryTypeFile(const QString &fileName)
+ : m_fileName(fileName) {}
+bool HistoryTypeFile::isEnabled() const { return true; }
+const QString &HistoryTypeFile::getFileName() const { return m_fileName; }
+HistoryScroll *HistoryTypeFile::scroll(HistoryScroll *old) const {
+ if (dynamic_cast(old))
+ return old; // Unchanged.
- HistoryScroll *newScroll = new HistoryScrollBuffer(m_nbLines);
- int lines = old->getLines();
- int startLine = 0;
- if (lines > (int) m_nbLines)
- startLine = lines - m_nbLines;
+ HistoryScroll *newScroll = new HistoryScrollFile(m_fileName);
Character line[LINE_SIZE];
- for(int i = startLine; i < lines; i++)
- {
- int size = old->getLineLen(i);
- if (size > LINE_SIZE)
- {
- Character *tmp_line = new Character[size];
- old->getCells(i, 0, size, tmp_line);
- newScroll->addCells(tmp_line, size);
- newScroll->addLine(old->isWrappedLine(i));
- delete [] tmp_line;
- }
- else
- {
- old->getCells(i, 0, size, line);
- newScroll->addCells(line, size);
- newScroll->addLine(old->isWrappedLine(i));
- }
+ int lines = (old != nullptr) ? old->getLines() : 0;
+ for (int i = 0; i < lines; i++) {
+ int size = old->getLineLen(i);
+ if (size > LINE_SIZE) {
+ Character *tmp_line = new Character[size];
+ old->getCells(i, 0, size, tmp_line);
+ newScroll->addCells(tmp_line, size);
+ newScroll->addLine(old->isWrappedLine(i));
+ delete[] tmp_line;
+ } else {
+ old->getCells(i, 0, size, line);
+ newScroll->addCells(line, size);
+ newScroll->addLine(old->isWrappedLine(i));
+ }
}
+
delete old;
return newScroll;
- }
- return new HistoryScrollBuffer(m_nbLines);
}
-
-//////////////////////////////
-
-HistoryTypeFile::HistoryTypeFile(const QString& fileName)
- : m_fileName(fileName)
-{
-}
-
-bool HistoryTypeFile::isEnabled() const
-{
- return true;
-}
-
-const QString& HistoryTypeFile::getFileName() const
-{
- return m_fileName;
-}
-
-HistoryScroll* HistoryTypeFile::scroll(HistoryScroll *old) const
-{
- if (dynamic_cast(old))
- return old; // Unchanged.
-
- HistoryScroll *newScroll = new HistoryScrollFile(m_fileName);
-
- Character line[LINE_SIZE];
- int lines = (old != nullptr) ? old->getLines() : 0;
- for(int i = 0; i < lines; i++)
- {
- int size = old->getLineLen(i);
- if (size > LINE_SIZE)
- {
- Character *tmp_line = new Character[size];
- old->getCells(i, 0, size, tmp_line);
- newScroll->addCells(tmp_line, size);
- newScroll->addLine(old->isWrappedLine(i));
- delete [] tmp_line;
- }
- else
- {
- old->getCells(i, 0, size, line);
- newScroll->addCells(line, size);
- newScroll->addLine(old->isWrappedLine(i));
- }
- }
-
- delete old;
- return newScroll;
-}
-
-int HistoryTypeFile::maximumLineCount() const
-{
- return 0;
-}
-
-//////////////////////////////
-
-CompactHistoryType::CompactHistoryType ( unsigned int nbLines )
- : m_nbLines ( nbLines )
-{
-}
-
-bool CompactHistoryType::isEnabled() const
-{
- return true;
-}
-
-int CompactHistoryType::maximumLineCount() const
-{
- return m_nbLines;
-}
-
-HistoryScroll* CompactHistoryType::scroll ( HistoryScroll *old ) const
-{
- if ( old )
- {
- CompactHistoryScroll *oldBuffer = dynamic_cast ( old );
- if ( oldBuffer )
- {
- oldBuffer->setMaxNbLines ( m_nbLines );
- return oldBuffer;
+int HistoryTypeFile::maximumLineCount() const { return 0; }
+
+
+CompactHistoryType::CompactHistoryType(unsigned int nbLines)
+ : m_nbLines(nbLines) {}
+bool CompactHistoryType::isEnabled() const { return true; }
+int CompactHistoryType::maximumLineCount() const { return m_nbLines; }
+HistoryScroll *CompactHistoryType::scroll(HistoryScroll *old) const {
+ if (old) {
+ CompactHistoryScroll *oldBuffer = dynamic_cast(old);
+ if (oldBuffer) {
+ oldBuffer->setMaxNbLines(m_nbLines);
+ return oldBuffer;
+ }
+ delete old;
}
- delete old;
- }
- return new CompactHistoryScroll ( m_nbLines );
+ return new CompactHistoryScroll(m_nbLines);
}
diff --git a/lib/qtermwidget/History.h b/lib/qtermwidget/History.h
index 0a3cb7d2..63f8d0d3 100644
--- a/lib/qtermwidget/History.h
+++ b/lib/qtermwidget/History.h
@@ -1,25 +1,24 @@
/*
- This file is part of Konsole, an X terminal.
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
-
-#ifndef TEHISTORY_H
-#define TEHISTORY_H
+#ifndef HISTORY_H
+#define HISTORY_H
#include
#include
@@ -44,37 +43,36 @@
class HistoryFile
{
public:
- HistoryFile();
- virtual ~HistoryFile();
-
- virtual void add(const unsigned char* bytes, int len);
- virtual void get(unsigned char* bytes, int len, int loc);
- virtual int len();
+ HistoryFile();
+ virtual ~HistoryFile();
- //mmaps the file in read-only mode
- void map();
- //un-mmaps the file
- void unmap();
- //returns true if the file is mmap'ed
- bool isMapped() const;
+ virtual void add(const unsigned char* bytes, int len);
+ virtual void get(unsigned char* bytes, int len, int loc);
+ virtual int len();
+ //mmaps the file in read-only mode
+ void map();
+ //un-mmaps the file
+ void unmap();
+ //returns true if the file is mmap'ed
+ bool isMapped() const;
private:
- int ion;
- int length;
- QTemporaryFile tmpFile;
+ int ion;
+ int length;
+ QTemporaryFile tmpFile;
- //pointer to start of mmap'ed file data, or 0 if the file is not mmap'ed
- char* fileMap;
+ //pointer to start of mmap'ed file data, or 0 if the file is not mmap'ed
+ char* fileMap;
- //incremented whenever 'add' is called and decremented whenever
- //'get' is called.
- //this is used to detect when a large number of lines are being read and processed from the history
- //and automatically mmap the file for better performance (saves the overhead of many lseek-read calls).
- int readWriteBalance = 0;
+ //incremented whenever 'add' is called and decremented whenever
+ //'get' is called.
+ //this is used to detect when a large number of lines are being read and processed from the history
+ //and automatically mmap the file for better performance (saves the overhead of many lseek-read calls).
+ int readWriteBalance = 0;
- //when readWriteBalance goes below this threshold, the file will be mmap'ed automatically
- static const int MAP_THRESHOLD = -1000;
+ //when readWriteBalance goes below this threshold, the file will be mmap'ed automatically
+ static const int MAP_THRESHOLD = -1000;
};
#endif
@@ -84,378 +82,340 @@ class HistoryFile
// Abstract base class for file and buffer versions
//////////////////////////////////////////////////////////////////////
class HistoryType;
-
class HistoryScroll
{
public:
- HistoryScroll(HistoryType*);
- virtual ~HistoryScroll();
-
- virtual bool hasScroll();
-
- // access to history
- virtual int getLines() = 0;
- virtual int getLineLen(int lineno) = 0;
- virtual void getCells(int lineno, int colno, int count, Character res[]) = 0;
- virtual bool isWrappedLine(int lineno) = 0;
-
- // backward compatibility (obsolete)
- Character getCell(int lineno, int colno) { Character res; getCells(lineno,colno,1,&res); return res; }
-
- // adding lines.
- virtual void addCells(const Character a[], int count) = 0;
- // convenience method - this is virtual so that subclasses can take advantage
- // of QVector's implicit copying
- virtual void addCellsVector(const QVector& cells)
- {
- addCells(cells.data(),cells.size());
- }
-
- virtual void addLine(bool previousWrapped=false) = 0;
-
- //
- // FIXME: Passing around constant references to HistoryType instances
- // is very unsafe, because those references will no longer
- // be valid if the history scroll is deleted.
- //
- const HistoryType& getType() const { return *m_histType; }
+ HistoryScroll(HistoryType*);
+ virtual ~HistoryScroll();
+
+ virtual bool hasScroll();
+
+ // access to history
+ virtual int getLines() = 0;
+ virtual int getLineLen(int lineno) = 0;
+ virtual void getCells(int lineno, int colno, int count, Character res[]) = 0;
+ virtual bool isWrappedLine(int lineno) = 0;
+
+ // backward compatibility (obsolete)
+ Character getCell(int lineno, int colno) { Character res; getCells(lineno,colno,1,&res); return res; }
+
+ // adding lines.
+ virtual void addCells(const Character a[], int count) = 0;
+ // convenience method - this is virtual so that subclasses can take advantage
+ // of QVector's implicit copying
+ virtual void addCellsVector(const QVector& cells) {
+ addCells(cells.data(),cells.size());
+ }
+
+ virtual void addLine(bool previousWrapped=false) = 0;
+
+ //
+ // FIXME: Passing around constant references to HistoryType instances
+ // is very unsafe, because those references will no longer
+ // be valid if the history scroll is deleted.
+ //
+ const HistoryType& getType() const { return *m_histType; }
protected:
- HistoryType* m_histType;
+ HistoryType* m_histType;
};
#if 1
-//////////////////////////////////////////////////////////////////////
-// File-based history (e.g. file log, no limitation in length)
-//////////////////////////////////////////////////////////////////////
-
class HistoryScrollFile : public HistoryScroll
{
public:
- HistoryScrollFile(const QString &logFileName);
- ~HistoryScrollFile() override;
+ HistoryScrollFile(const QString &logFileName);
+ ~HistoryScrollFile() override;
- int getLines() override;
- int getLineLen(int lineno) override;
- void getCells(int lineno, int colno, int count, Character res[]) override;
- bool isWrappedLine(int lineno) override;
+ int getLines() override;
+ int getLineLen(int lineno) override;
+ void getCells(int lineno, int colno, int count, Character res[]) override;
+ bool isWrappedLine(int lineno) override;
- void addCells(const Character a[], int count) override;
- void addLine(bool previousWrapped=false) override;
+ void addCells(const Character a[], int count) override;
+ void addLine(bool previousWrapped=false) override;
private:
- int startOfLine(int lineno);
+ int startOfLine(int lineno);
- QString m_logFileName;
- HistoryFile index; // lines Row(int)
- HistoryFile cells; // text Row(Character)
- HistoryFile lineflags; // flags Row(unsigned char)
+ QString m_logFileName;
+ HistoryFile index; // lines Row(int)
+ HistoryFile cells; // text Row(Character)
+ HistoryFile lineflags; // flags Row(unsigned char)
};
-//////////////////////////////////////////////////////////////////////
-// Buffer-based history (limited to a fixed nb of lines)
-//////////////////////////////////////////////////////////////////////
class HistoryScrollBuffer : public HistoryScroll
{
public:
- typedef QVector HistoryLine;
-
- HistoryScrollBuffer(unsigned int maxNbLines = 1000);
- ~HistoryScrollBuffer() override;
+ typedef QVector HistoryLine;
- int getLines() override;
- int getLineLen(int lineno) override;
- void getCells(int lineno, int colno, int count, Character res[]) override;
- bool isWrappedLine(int lineno) override;
+ HistoryScrollBuffer(unsigned int maxNbLines = 1000);
+ ~HistoryScrollBuffer() override;
- void addCells(const Character a[], int count) override;
- void addCellsVector(const QVector& cells) override;
- void addLine(bool previousWrapped=false) override;
+ int getLines() override;
+ int getLineLen(int lineno) override;
+ void getCells(int lineno, int colno, int count, Character res[]) override;
+ bool isWrappedLine(int lineno) override;
- void setMaxNbLines(unsigned int nbLines);
- unsigned int maxNbLines() const { return _maxLineCount; }
+ void addCells(const Character a[], int count) override;
+ void addCellsVector(const QVector& cells) override;
+ void addLine(bool previousWrapped=false) override;
+ void setMaxNbLines(unsigned int nbLines);
+ unsigned int maxNbLines() const { return _maxLineCount; }
private:
- int bufferIndex(int lineNumber) const;
-
- HistoryLine* _historyBuffer;
- QBitArray _wrappedLine;
- int _maxLineCount;
- int _usedLines;
- int _head;
-
- //QVector m_histBuffer;
- //QBitArray m_wrappedLine;
- //unsigned int m_maxNbLines;
- //unsigned int m_nbLines;
- //unsigned int m_arrayIndex;
- //bool m_buffFilled;
+ int bufferIndex(int lineNumber) const;
+
+ HistoryLine* _historyBuffer;
+ QBitArray _wrappedLine;
+ int _maxLineCount;
+ int _usedLines;
+ int _head;
+
+ //QVector m_histBuffer;
+ //QBitArray m_wrappedLine;
+ //unsigned int m_maxNbLines;
+ //unsigned int m_nbLines;
+ //unsigned int m_arrayIndex;
+ //bool m_buffFilled;
};
-/*class HistoryScrollBufferV2 : public HistoryScroll
-{
-public:
- virtual int getLines();
- virtual int getLineLen(int lineno);
- virtual void getCells(int lineno, int colno, int count, Character res[]);
- virtual bool isWrappedLine(int lineno);
-
- virtual void addCells(const Character a[], int count);
- virtual void addCells(const QVector& cells);
- virtual void addLine(bool previousWrapped=false);
-
-};*/
-
#endif
-//////////////////////////////////////////////////////////////////////
-// Nothing-based history (no history :-)
-//////////////////////////////////////////////////////////////////////
class HistoryScrollNone : public HistoryScroll
{
public:
- HistoryScrollNone();
- ~HistoryScrollNone() override;
+ HistoryScrollNone();
+ ~HistoryScrollNone() override;
- bool hasScroll() override;
+ bool hasScroll() override;
- int getLines() override;
- int getLineLen(int lineno) override;
- void getCells(int lineno, int colno, int count, Character res[]) override;
- bool isWrappedLine(int lineno) override;
+ int getLines() override;
+ int getLineLen(int lineno) override;
+ void getCells(int lineno, int colno, int count, Character res[]) override;
+ bool isWrappedLine(int lineno) override;
- void addCells(const Character a[], int count) override;
- void addLine(bool previousWrapped=false) override;
+ void addCells(const Character a[], int count) override;
+ void addLine(bool previousWrapped=false) override;
};
-//////////////////////////////////////////////////////////////////////
-// BlockArray-based history
-//////////////////////////////////////////////////////////////////////
class HistoryScrollBlockArray : public HistoryScroll
{
public:
- HistoryScrollBlockArray(size_t size);
- ~HistoryScrollBlockArray() override;
+ HistoryScrollBlockArray(size_t size);
+ ~HistoryScrollBlockArray() override;
- int getLines() override;
- int getLineLen(int lineno) override;
- void getCells(int lineno, int colno, int count, Character res[]) override;
- bool isWrappedLine(int lineno) override;
+ int getLines() override;
+ int getLineLen(int lineno) override;
+ void getCells(int lineno, int colno, int count, Character res[]) override;
+ bool isWrappedLine(int lineno) override;
- void addCells(const Character a[], int count) override;
- void addLine(bool previousWrapped=false) override;
+ void addCells(const Character a[], int count) override;
+ void addLine(bool previousWrapped=false) override;
protected:
- BlockArray m_blockArray;
- QHash m_lineLengths;
+ BlockArray m_blockArray;
+ QHash m_lineLengths;
};
-//////////////////////////////////////////////////////////////////////
-// History using compact storage
-// This implementation uses a list of fixed-sized blocks
-// where history lines are allocated in (avoids heap fragmentation)
-//////////////////////////////////////////////////////////////////////
typedef QVector TextLine;
class CharacterFormat
{
public:
- bool equalsFormat(const CharacterFormat &other) const {
- return other.rendition==rendition && other.fgColor==fgColor && other.bgColor==bgColor;
- }
-
- bool equalsFormat(const Character &c) const {
- return c.rendition==rendition && c.foregroundColor==fgColor && c.backgroundColor==bgColor;
- }
-
- void setFormat(const Character& c) {
- rendition=c.rendition;
- fgColor=c.foregroundColor;
- bgColor=c.backgroundColor;
- }
-
- CharacterColor fgColor, bgColor;
- quint16 startPos;
- quint8 rendition;
+ bool equalsFormat(const CharacterFormat &other) const {
+ return other.rendition==rendition && other.fgColor==fgColor && other.bgColor==bgColor;
+ }
+
+ bool equalsFormat(const Character &c) const {
+ return c.rendition==rendition && c.foregroundColor==fgColor && c.backgroundColor==bgColor;
+ }
+
+ void setFormat(const Character& c) {
+ rendition=c.rendition;
+ fgColor=c.foregroundColor;
+ bgColor=c.backgroundColor;
+ }
+
+ CharacterColor fgColor, bgColor;
+ quint16 startPos;
+ quint8 rendition;
};
class CompactHistoryBlock
{
public:
- CompactHistoryBlock(){
- blockLength = 4096*64; // 256kb
-
-#if defined(Q_OS_WIN)
- head = (quint8*) VirtualAlloc(NULL, blockLength, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
- Q_ASSERT(head != NULL);
-#else
- head = (quint8*) mmap(nullptr, blockLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
- Q_ASSERT(head != MAP_FAILED);
-#endif
- //head = (quint8*) malloc(blockLength);
- tail = blockStart = head;
- allocCount=0;
- }
-
- virtual ~CompactHistoryBlock(){
- //free(blockStart);
-#if defined(Q_OS_WIN)
- VirtualFree((VOID *) blockStart, 0, MEM_RELEASE );
-#else
- munmap(blockStart, blockLength);
-#endif
- }
-
- virtual unsigned int remaining(){ return (unsigned int)(blockStart+blockLength-tail);}
- virtual unsigned int length() { return (unsigned int)(blockLength); }
- virtual void* allocate(size_t length);
- virtual bool contains(void *addr) {return addr>=blockStart && addr<(blockStart+blockLength);}
- virtual void deallocate();
- virtual bool isInUse(){ return allocCount!=0; } ;
+ CompactHistoryBlock() {
+ blockLength = 4096*64; // 256kb
+
+ #if defined(Q_OS_WIN)
+ head = (quint8*) VirtualAlloc(NULL, blockLength, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
+ Q_ASSERT(head != NULL);
+ #else
+ head = (quint8*) mmap(nullptr, blockLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
+ Q_ASSERT(head != MAP_FAILED);
+ #endif
+ //head = (quint8*) malloc(blockLength);
+ tail = blockStart = head;
+ allocCount=0;
+ }
+
+ virtual ~CompactHistoryBlock(){
+ //free(blockStart);
+ #if defined(Q_OS_WIN)
+ VirtualFree((VOID *) blockStart, 0, MEM_RELEASE );
+ #else
+ munmap(blockStart, blockLength);
+ #endif
+ }
+
+ virtual unsigned int remaining(){ return (unsigned int)(blockStart+blockLength-tail);}
+ virtual unsigned int length() { return (unsigned int)(blockLength); }
+ virtual void* allocate(size_t length);
+ virtual bool contains(void *addr) {return addr>=blockStart && addr<(blockStart+blockLength);}
+ virtual void deallocate();
+ virtual bool isInUse(){ return allocCount!=0; } ;
private:
- size_t blockLength;
- quint8* head;
- quint8* tail;
- quint8* blockStart;
- int allocCount;
+ size_t blockLength;
+ quint8* head;
+ quint8* tail;
+ quint8* blockStart;
+ int allocCount;
};
class CompactHistoryBlockList {
public:
- CompactHistoryBlockList() {};
- ~CompactHistoryBlockList();
+ CompactHistoryBlockList() {};
+ ~CompactHistoryBlockList();
- void *allocate( size_t size );
- void deallocate(void *);
- int length() {return list.size();}
+ void *allocate( size_t size );
+ void deallocate(void *);
+ int length() {return list.size();}
private:
- QList list;
+ QList list;
};
class CompactHistoryLine
{
public:
- CompactHistoryLine(const TextLine&, CompactHistoryBlockList& blockList);
- virtual ~CompactHistoryLine();
+ CompactHistoryLine(const TextLine&, CompactHistoryBlockList& blockList);
+ virtual ~CompactHistoryLine();
- // custom new operator to allocate memory from custom pool instead of heap
- static void *operator new( size_t size, CompactHistoryBlockList& blockList);
- static void operator delete( void *) { /* do nothing, deallocation from pool is done in destructor*/ } ;
+ // custom new operator to allocate memory from custom pool instead of heap
+ static void *operator new( size_t size, CompactHistoryBlockList& blockList);
+ static void operator delete( void *) { /* do nothing, deallocation from pool is done in destructor*/ } ;
- virtual void getCharacters(Character* array, int length, int startColumn) ;
- virtual void getCharacter(int index, Character &r) ;
- virtual bool isWrapped() const {return wrapped;};
- virtual void setWrapped(bool isWrapped) { wrapped=isWrapped;};
- virtual unsigned int getLength() const {return length;};
+ virtual void getCharacters(Character* array, int length, int startColumn) ;
+ virtual void getCharacter(int index, Character &r) ;
+ virtual bool isWrapped() const {return wrapped;};
+ virtual void setWrapped(bool isWrapped) { wrapped=isWrapped;};
+ virtual unsigned int getLength() const {return length;};
protected:
- CompactHistoryBlockList& blockList;
- CharacterFormat* formatArray;
- quint16 length;
- quint16* text;
- quint16 formatLength;
- bool wrapped;
+ CompactHistoryBlockList& blockList;
+ CharacterFormat* formatArray;
+ quint16 length;
+ quint16* text;
+ quint16 formatLength;
+ bool wrapped;
};
class CompactHistoryScroll : public HistoryScroll
{
- typedef QList HistoryArray;
+ typedef QList HistoryArray;
public:
- CompactHistoryScroll(unsigned int maxNbLines = 1000);
- ~CompactHistoryScroll() override;
+ CompactHistoryScroll(unsigned int maxNbLines = 1000);
+ ~CompactHistoryScroll() override;
- int getLines() override;
- int getLineLen(int lineno) override;
- void getCells(int lineno, int colno, int count, Character res[]) override;
- bool isWrappedLine(int lineno) override;
+ int getLines() override;
+ int getLineLen(int lineno) override;
+ void getCells(int lineno, int colno, int count, Character res[]) override;
+ bool isWrappedLine(int lineno) override;
- void addCells(const Character a[], int count) override;
- void addCellsVector(const TextLine& cells) override;
- void addLine(bool previousWrapped=false) override;
+ void addCells(const Character a[], int count) override;
+ void addCellsVector(const TextLine& cells) override;
+ void addLine(bool previousWrapped=false) override;
- void setMaxNbLines(unsigned int nbLines);
- unsigned int maxNbLines() const { return _maxLineCount; }
+ void setMaxNbLines(unsigned int nbLines);
+ unsigned int maxNbLines() const { return _maxLineCount; }
private:
- bool hasDifferentColors(const TextLine& line) const;
- HistoryArray lines;
- CompactHistoryBlockList blockList;
+ bool hasDifferentColors(const TextLine& line) const;
+ HistoryArray lines;
+ CompactHistoryBlockList blockList;
- unsigned int _maxLineCount;
+ unsigned int _maxLineCount;
};
-//////////////////////////////////////////////////////////////////////
-// History type
-//////////////////////////////////////////////////////////////////////
class HistoryType
{
public:
- HistoryType();
- virtual ~HistoryType();
-
- /**
- * Returns true if the history is enabled ( can store lines of output )
- * or false otherwise.
- */
- virtual bool isEnabled() const = 0;
- /**
- * Returns true if the history size is unlimited.
- */
- bool isUnlimited() const { return maximumLineCount() == 0; }
- /**
- * Returns the maximum number of lines which this history type
- * can store or 0 if the history can store an unlimited number of lines.
- */
- virtual int maximumLineCount() const = 0;
-
- virtual HistoryScroll* scroll(HistoryScroll *) const = 0;
+ HistoryType();
+ virtual ~HistoryType();
+
+ /**
+ * Returns true if the history is enabled ( can store lines of output )
+ * or false otherwise.
+ */
+ virtual bool isEnabled() const = 0;
+ /**
+ * Returns true if the history size is unlimited.
+ */
+ bool isUnlimited() const { return maximumLineCount() == 0; }
+ /**
+ * Returns the maximum number of lines which this history type
+ * can store or 0 if the history can store an unlimited number of lines.
+ */
+ virtual int maximumLineCount() const = 0;
+
+ virtual HistoryScroll* scroll(HistoryScroll *) const = 0;
};
class HistoryTypeNone : public HistoryType
{
public:
- HistoryTypeNone();
+ HistoryTypeNone();
- bool isEnabled() const override;
- int maximumLineCount() const override;
+ bool isEnabled() const override;
+ int maximumLineCount() const override;
- HistoryScroll* scroll(HistoryScroll *) const override;
+ HistoryScroll* scroll(HistoryScroll *) const override;
};
class HistoryTypeBlockArray : public HistoryType
{
public:
- HistoryTypeBlockArray(size_t size);
+ HistoryTypeBlockArray(size_t size);
- bool isEnabled() const override;
- int maximumLineCount() const override;
+ bool isEnabled() const override;
+ int maximumLineCount() const override;
- HistoryScroll* scroll(HistoryScroll *) const override;
+ HistoryScroll* scroll(HistoryScroll *) const override;
protected:
- size_t m_size;
+ size_t m_size;
};
#if 1
class HistoryTypeFile : public HistoryType
{
public:
- HistoryTypeFile(const QString& fileName=QString());
+ HistoryTypeFile(const QString& fileName=QString());
- bool isEnabled() const override;
- virtual const QString& getFileName() const;
- int maximumLineCount() const override;
+ bool isEnabled() const override;
+ virtual const QString& getFileName() const;
+ int maximumLineCount() const override;
- HistoryScroll* scroll(HistoryScroll *) const override;
+ HistoryScroll* scroll(HistoryScroll *) const override;
protected:
- QString m_fileName;
+ QString m_fileName;
};
@@ -464,12 +424,12 @@ class HistoryTypeBuffer : public HistoryType
friend class HistoryScrollBuffer;
public:
- HistoryTypeBuffer(unsigned int nbLines);
+ HistoryTypeBuffer(unsigned int nbLines);
- bool isEnabled() const override;
- int maximumLineCount() const override;
+ bool isEnabled() const override;
+ int maximumLineCount() const override;
- HistoryScroll* scroll(HistoryScroll *) const override;
+ HistoryScroll* scroll(HistoryScroll *) const override;
protected:
unsigned int m_nbLines;
@@ -478,12 +438,12 @@ class HistoryTypeBuffer : public HistoryType
class CompactHistoryType : public HistoryType
{
public:
- CompactHistoryType(unsigned int size);
+ CompactHistoryType(unsigned int size);
- bool isEnabled() const override;
- int maximumLineCount() const override;
+ bool isEnabled() const override;
+ int maximumLineCount() const override;
- HistoryScroll* scroll(HistoryScroll *) const override;
+ HistoryScroll* scroll(HistoryScroll *) const override;
protected:
unsigned int m_nbLines;
@@ -492,4 +452,4 @@ class CompactHistoryType : public HistoryType
#endif
-#endif // TEHISTORY_H
+#endif // HISTORY_H
diff --git a/lib/qtermwidget/HistorySearch.cpp b/lib/qtermwidget/HistorySearch.cpp
index 1a528560..337ec8ec 100644
--- a/lib/qtermwidget/HistorySearch.cpp
+++ b/lib/qtermwidget/HistorySearch.cpp
@@ -1,39 +1,35 @@
/*
- Copyright 2013 Christian Surlykke
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2013 Christian Surlykke
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include
-#include
#include
#include
+#include
-#include "TerminalCharacterDecoder.h"
#include "Emulation.h"
#include "HistorySearch.h"
+#include "TerminalCharacterDecoder.h"
-HistorySearch::HistorySearch(EmulationPtr emulation, const QRegularExpression& regExp,
- bool forwards, int startColumn, int startLine,
- QObject* parent) :
-QObject(parent),
-m_emulation(emulation),
-m_regExp(regExp),
-m_forwards(forwards),
-m_startColumn(startColumn),
-m_startLine(startLine) {
+HistorySearch::HistorySearch(EmulationPtr emulation,
+ const QRegularExpression ®Exp, bool forwards,
+ int startColumn, int startLine, QObject *parent)
+ : QObject(parent), m_emulation(emulation), m_regExp(regExp),
+ m_forwards(forwards), m_startColumn(startColumn), m_startLine(startLine) {
}
HistorySearch::~HistorySearch() {
@@ -42,18 +38,20 @@ HistorySearch::~HistorySearch() {
void HistorySearch::search() {
bool found = false;
- if (! m_regExp.pattern().isEmpty())
- {
+ if (!m_regExp.pattern().isEmpty()) {
if (m_forwards) {
- found = search(m_startColumn, m_startLine, -1, m_emulation->lineCount()) || search(0, 0, m_startColumn, m_startLine);
+ found =
+ search(m_startColumn, m_startLine, -1, m_emulation->lineCount()) ||
+ search(0, 0, m_startColumn, m_startLine);
} else {
- found = search(0, 0, m_startColumn, m_startLine) || search(m_startColumn, m_startLine, -1, m_emulation->lineCount());
+ found = search(0, 0, m_startColumn, m_startLine) ||
+ search(m_startColumn, m_startLine, -1, m_emulation->lineCount());
}
if (found) {
- emit matchFound(m_foundStartColumn, m_foundStartLine, m_foundEndColumn, m_foundEndLine);
- }
- else {
+ emit matchFound(m_foundStartColumn, m_foundStartLine, m_foundEndColumn,
+ m_foundEndLine);
+ } else {
emit noMatchFound();
}
}
@@ -61,12 +59,14 @@ void HistorySearch::search() {
deleteLater();
}
-bool HistorySearch::search(int startColumn, int startLine, int endColumn, int endLine) {
+bool HistorySearch::search(int startColumn, int startLine, int endColumn,
+ int endLine) {
int linesRead = 0;
int linesToRead = endLine - startLine + 1;
- // We read process history from (and including) startLine to (and including) endLine in
- // blocks of at most 10K lines so that we do not use unhealthy amounts of memory
+ // We read process history from (and including) startLine to (and including)
+ // endLine in blocks of at most 10K lines so that we do not use unhealthy
+ // amounts of memory
int blockSize;
while ((blockSize = qMin(10000, linesToRead - linesRead)) > 0) {
QString string;
@@ -76,71 +76,72 @@ bool HistorySearch::search(int startColumn, int startLine, int endColumn, int en
decoder.setRecordLinePositions(true);
// Calculate lines to read and read them
- int blockStartLine = m_forwards ? startLine + linesRead : endLine - linesRead - blockSize + 1;
+ int blockStartLine = m_forwards ? startLine + linesRead
+ : endLine - linesRead - blockSize + 1;
int chunkEndLine = blockStartLine + blockSize - 1;
m_emulation->writeToStream(&decoder, blockStartLine, chunkEndLine);
- // We search between startColumn in the first line of the string and endColumn in the last
- // line of the string. First we calculate the position (in the string) of endColumn in the
- // last line of the string
+ // We search between startColumn in the first line of the string and
+ // endColumn in the last line of the string. First we calculate the position
+ // (in the string) of endColumn in the last line of the string
int endPosition;
- // The String that Emulator.writeToStream produces has a newline at the end, and so ends with an
- // empty line - we ignore that.
+ // The String that Emulator.writeToStream produces has a newline at the end,
+ // and so ends with an empty line - we ignore that.
int numberOfLinesInString = decoder.linePositions().size() - 1;
- if (numberOfLinesInString > 0 && endColumn > -1 )
- {
- endPosition = decoder.linePositions().at(numberOfLinesInString - 1) + endColumn;
- }
- else
- {
+ if (numberOfLinesInString > 0 && endColumn > -1) {
+ endPosition =
+ decoder.linePositions().at(numberOfLinesInString - 1) + endColumn;
+ } else {
endPosition = string.size();
}
- // So now we can log for m_regExp in the string between startColumn and endPosition
+ // So now we can log for m_regExp in the string between startColumn and
+ // endPosition
int matchStart;
QRegularExpressionMatch match;
- if (m_forwards)
- {
+ if (m_forwards) {
matchStart = string.indexOf(m_regExp, startColumn, &match);
- if (matchStart >= endPosition)
- matchStart = -1;
- }
- else
- {
+ if (matchStart >= endPosition)
+ matchStart = -1;
+ } else {
matchStart = string.lastIndexOf(m_regExp, endPosition - 1, &match);
if (matchStart < startColumn)
matchStart = -1;
}
- if (matchStart > -1)
- {
+ if (matchStart > -1) {
int matchEnd = matchStart + match.capturedLength() - 1;
- //qDebug() << "Found in string from" << matchStart << "to" << matchEnd;
-
- // Translate startPos and endPos to startColum, startLine, endColumn and endLine in history.
- int startLineNumberInString = findLineNumberInString(decoder.linePositions(), matchStart);
- m_foundStartColumn = matchStart - decoder.linePositions().at(startLineNumberInString);
+ // qDebug() << "Found in string from" << matchStart << "to" << matchEnd;
+
+ // Translate startPos and endPos to startColum, startLine, endColumn and
+ // endLine in history.
+ int startLineNumberInString =
+ findLineNumberInString(decoder.linePositions(), matchStart);
+ m_foundStartColumn =
+ matchStart - decoder.linePositions().at(startLineNumberInString);
m_foundStartLine = startLineNumberInString + startLine + linesRead;
- int endLineNumberInString = findLineNumberInString(decoder.linePositions(), matchEnd);
- m_foundEndColumn = matchEnd - decoder.linePositions().at(endLineNumberInString);
+ int endLineNumberInString =
+ findLineNumberInString(decoder.linePositions(), matchEnd);
+ m_foundEndColumn =
+ matchEnd - decoder.linePositions().at(endLineNumberInString);
m_foundEndLine = endLineNumberInString + startLine + linesRead;
return true;
}
-
linesRead += blockSize;
}
return false;
}
-
-int HistorySearch::findLineNumberInString(QList linePositions, int position) {
+int HistorySearch::findLineNumberInString(QList linePositions,
+ int position) {
int lineNum = 0;
- while (lineNum + 1 < linePositions.size() && linePositions[lineNum + 1] <= position)
+ while (lineNum + 1 < linePositions.size() &&
+ linePositions[lineNum + 1] <= position)
lineNum++;
return lineNum;
diff --git a/lib/qtermwidget/HistorySearch.h b/lib/qtermwidget/HistorySearch.h
index f373b6da..fa269006 100644
--- a/lib/qtermwidget/HistorySearch.h
+++ b/lib/qtermwidget/HistorySearch.h
@@ -1,23 +1,23 @@
/*
- Copyright 2013 Christian Surlykke
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2013 Christian Surlykke
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
-#ifndef TASK_H
-#define TASK_H
+#ifndef HISTOTYSEARCH_H
+#define HISTOTYSEARCH_H
#include
#include
@@ -38,9 +38,7 @@ class HistorySearch : public QObject
public:
explicit HistorySearch(EmulationPtr emulation, const QRegularExpression& regExp, bool forwards,
int startColumn, int startLine, QObject* parent);
-
~HistorySearch() override;
-
void search();
signals:
@@ -51,7 +49,6 @@ class HistorySearch : public QObject
bool search(int startColumn, int startLine, int endColumn, int endLine);
int findLineNumberInString(QList linePositions, int position);
-
EmulationPtr m_emulation;
QRegularExpression m_regExp;
bool m_forwards = false;
@@ -64,5 +61,4 @@ class HistorySearch : public QObject
int m_foundEndLine = 0;
};
-#endif /* TASK_H */
-
+#endif /* HISTOTYSEARCH_H */
diff --git a/lib/qtermwidget/KeyboardTranslator.cpp b/lib/qtermwidget/KeyboardTranslator.cpp
index ef76d4e5..a1a5d01a 100644
--- a/lib/qtermwidget/KeyboardTranslator.cpp
+++ b/lib/qtermwidget/KeyboardTranslator.cpp
@@ -1,22 +1,22 @@
/*
- This source file is part of Konsole, a terminal emulator.
+ This source file is part of Konsole, a terminal emulator.
- Copyright 2007-2008 by Robert Knight
+ Copyright 2007-2008 by Robert Knight
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include "KeyboardTranslator.h"
@@ -24,19 +24,19 @@
#include
#include
+#include
#include
#include
-#include
#include
-#include
-#include
#include
+#include
+#include
#include "tools.h"
const QByteArray KeyboardTranslatorManager::defaultTranslatorText(
-"keyboard \"Fallback Key Translator\"\n"
-"key Tab : \"\\t\""
+ "keyboard \"Fallback Key Translator\"\n"
+ "key Tab : \"\\t\""
);
#ifdef Q_OS_MAC
@@ -47,20 +47,18 @@ const Qt::KeyboardModifier KeyboardTranslator::CTRL_MOD = Qt::ControlModifier;
#endif
KeyboardTranslatorManager::KeyboardTranslatorManager()
- : _haveLoadedAll(false)
-{
+ : _haveLoadedAll(false) {
}
-KeyboardTranslatorManager::~KeyboardTranslatorManager()
-{
+
+KeyboardTranslatorManager::~KeyboardTranslatorManager() {
qDeleteAll(_translators);
}
-QString KeyboardTranslatorManager::findTranslatorPath(const QString& name)
-{
+
+QString KeyboardTranslatorManager::findTranslatorPath(const QString &name) {
return QString(get_kb_layout_dir() + name + QLatin1String(".keytab"));
}
-void KeyboardTranslatorManager::findTranslators()
-{
+void KeyboardTranslatorManager::findTranslators() {
QDir dir(get_kb_layout_dir());
QStringList filters;
filters << QLatin1String("*.keytab");
@@ -71,127 +69,119 @@ void KeyboardTranslatorManager::findTranslators()
// the name with a null pointer to indicate that the translator
// has not yet been loaded from disk
QStringListIterator listIter(list);
- while (listIter.hasNext())
- {
+ while (listIter.hasNext()) {
QString translatorPath = listIter.next();
QString name = QFileInfo(translatorPath).baseName();
- if ( !_translators.contains(name) )
- _translators.insert(name,0);
+ if (!_translators.contains(name))
+ _translators.insert(name, 0);
}
- _haveLoadedAll = true;
+ _haveLoadedAll = true;
}
-const KeyboardTranslator* KeyboardTranslatorManager::findTranslator(const QString& name)
-{
- if ( name.isEmpty() )
+const KeyboardTranslator * KeyboardTranslatorManager::findTranslator(const QString &name) {
+ if (name.isEmpty())
return defaultTranslator();
- if ( _translators.contains(name) && _translators[name] != 0 )
+ if (_translators.contains(name) && _translators[name] != 0)
return _translators[name];
- KeyboardTranslator* translator = loadTranslator(name);
+ KeyboardTranslator *translator = loadTranslator(name);
- if ( translator != nullptr )
+ if (translator != nullptr)
_translators[name] = translator;
- else if ( !name.isEmpty() )
+ else if (!name.isEmpty())
qDebug() << "Unable to load translator" << name;
return translator;
}
-bool KeyboardTranslatorManager::saveTranslator(const KeyboardTranslator* translator)
-{
+bool KeyboardTranslatorManager::saveTranslator(const KeyboardTranslator *translator) {
Q_UNUSED(translator);
return true;
}
-KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(const QString& name)
-{
- const QString& path = findTranslatorPath(name);
+KeyboardTranslator * KeyboardTranslatorManager::loadTranslator(const QString &name) {
+ const QString &path = findTranslatorPath(name);
QFile source(path);
if (name.isEmpty() || !source.open(QIODevice::ReadOnly | QIODevice::Text))
return nullptr;
- return loadTranslator(&source,name);
+ return loadTranslator(&source, name);
}
-const KeyboardTranslator* KeyboardTranslatorManager::defaultTranslator()
-{
+const KeyboardTranslator *KeyboardTranslatorManager::defaultTranslator() {
// Try to find the default.keytab file if it exists, otherwise
// fall back to the hard-coded one
#if defined(Q_OS_WIN)
#if defined(Q_CC_MSVC)
- const KeyboardTranslator* translator = findTranslator(QLatin1String("windows_conpty"));
+ const KeyboardTranslator *translator =
+ findTranslator(QLatin1String("windows_conpty"));
#else
- const KeyboardTranslator* translator = findTranslator(QLatin1String("windows_winpty"));
+ const KeyboardTranslator *translator =
+ findTranslator(QLatin1String("windows_winpty"));
#endif
#elif defined(Q_OS_MAC)
- const KeyboardTranslator* translator = findTranslator(QLatin1String("macos_default"));
+ const KeyboardTranslator *translator =
+ findTranslator(QLatin1String("macos_default"));
#else
- const KeyboardTranslator* translator = findTranslator(QLatin1String("linux_default"));
+ const KeyboardTranslator *translator =
+ findTranslator(QLatin1String("linux_default"));
#endif
- if (!translator)
- {
+ if (!translator) {
QBuffer textBuffer;
textBuffer.setData(defaultTranslatorText);
textBuffer.open(QIODevice::ReadOnly);
- translator = loadTranslator(&textBuffer,QLatin1String("fallback"));
+ translator = loadTranslator(&textBuffer, QLatin1String("fallback"));
}
return translator;
}
-KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(QIODevice* source,const QString& name)
-{
- KeyboardTranslator* translator = new KeyboardTranslator(name);
+KeyboardTranslator * KeyboardTranslatorManager::loadTranslator(QIODevice *source, const QString &name) {
+ KeyboardTranslator *translator = new KeyboardTranslator(name);
KeyboardTranslatorReader reader(source);
- translator->setDescription( reader.description() );
- while ( reader.hasNextEntry() )
+ translator->setDescription(reader.description());
+ while (reader.hasNextEntry())
translator->addEntry(reader.nextEntry());
source->close();
- if ( !reader.parseError() )
- {
+ if (!reader.parseError()) {
return translator;
- }
- else
- {
+ } else {
delete translator;
return nullptr;
}
}
-KeyboardTranslatorWriter::KeyboardTranslatorWriter(QIODevice* destination)
-: _destination(destination)
-{
- Q_ASSERT( destination && destination->isWritable() );
-
+KeyboardTranslatorWriter::KeyboardTranslatorWriter(QIODevice *destination)
+ : _destination(destination) {
+ Q_ASSERT(destination && destination->isWritable());
_writer = new QTextStream(_destination);
}
-KeyboardTranslatorWriter::~KeyboardTranslatorWriter()
-{
- delete _writer;
+
+KeyboardTranslatorWriter::~KeyboardTranslatorWriter() {
+ delete _writer;
}
-void KeyboardTranslatorWriter::writeHeader( const QString& description )
-{
+
+void KeyboardTranslatorWriter::writeHeader(const QString &description) {
*_writer << "keyboard \"" << description << '\"' << '\n';
}
-void KeyboardTranslatorWriter::writeEntry( const KeyboardTranslator::Entry& entry )
-{
+
+void KeyboardTranslatorWriter::writeEntry(const KeyboardTranslator::Entry &entry) {
QString result;
- if ( entry.command() != KeyboardTranslator::NoCommand )
+ if (entry.command() != KeyboardTranslator::NoCommand)
result = entry.resultToString();
else
result = QLatin1Char('\"') + entry.resultToString() + QLatin1Char('\"');
- *_writer << QLatin1String("key ") << entry.conditionToString() << QLatin1String(" : ") << result << QLatin1Char('\n');
+ *_writer << QLatin1String("key ") << entry.conditionToString()
+ << QLatin1String(" : ") << result << QLatin1Char('\n');
}
-
// each line of the keyboard translation file is one of:
//
// - keyboard "name"
@@ -199,40 +189,35 @@ void KeyboardTranslatorWriter::writeEntry( const KeyboardTranslator::Entry& entr
// - key KeySequence : CommandName
//
// KeySequence begins with the name of the key ( taken from the Qt::Key enum )
-// and is followed by the keyboard modifiers and state flags ( with + or - in front
-// of each modifier or flag to indicate whether it is required ). All keyboard modifiers
-// and flags are optional, if a particular modifier or state is not specified it is
-// assumed not to be a part of the sequence. The key sequence may contain whitespace
+// and is followed by the keyboard modifiers and state flags ( with + or - in
+// front of each modifier or flag to indicate whether it is required ). All
+// keyboard modifiers and flags are optional, if a particular modifier or state
+// is not specified it is assumed not to be a part of the sequence. The key
+// sequence may contain whitespace
//
// eg: "key Up+Shift : scrollLineUp"
// "key Next-Shift : "\E[6~"
//
-// (lines containing only whitespace are ignored, parseLine assumes that comments have
-// already been removed)
+// (lines containing only whitespace are ignored, parseLine assumes that
+// comments have already been removed)
//
+KeyboardTranslatorReader::KeyboardTranslatorReader(QIODevice *source)
+ : _source(source), _hasNext(false) {
+ // read input until we find the description
+ while (_description.isEmpty() && !source->atEnd()) {
+ QList tokens = tokenize(QString::fromUtf8(source->readLine()));
+ if (!tokens.isEmpty() && tokens.first().type == Token::TitleKeyword)
+ _description = tokens[1].text;
+ }
+ // read first entry (if any)
+ readNext();
+}
-KeyboardTranslatorReader::KeyboardTranslatorReader( QIODevice* source )
- : _source(source)
- , _hasNext(false)
-{
- // read input until we find the description
- while ( _description.isEmpty() && !source->atEnd() )
- {
- QList tokens = tokenize( QString::fromUtf8(source->readLine()) );
- if ( !tokens.isEmpty() && tokens.first().type == Token::TitleKeyword )
- _description = tokens[1].text;
- }
- // read first entry (if any)
- readNext();
-}
-void KeyboardTranslatorReader::readNext()
-{
+void KeyboardTranslatorReader::readNext() {
// find next entry
- while ( !_source->atEnd() )
- {
- const QList& tokens = tokenize( QString::fromUtf8(_source->readLine()) );
- if ( !tokens.isEmpty() && tokens.first().type == Token::KeyKeyword )
- {
+ while (!_source->atEnd()) {
+ const QList &tokens = tokenize(QString::fromUtf8(_source->readLine()));
+ if (!tokens.isEmpty() && tokens.first().type == Token::KeyKeyword) {
KeyboardTranslator::States flags = KeyboardTranslator::NoState;
KeyboardTranslator::States flagMask = KeyboardTranslator::NoState;
Qt::KeyboardModifiers modifiers = Qt::NoModifier;
@@ -240,36 +225,28 @@ void KeyboardTranslatorReader::readNext()
int keyCode = Qt::Key_unknown;
- decodeSequence(tokens[1].text.toLower(),
- keyCode,
- modifiers,
- modifierMask,
- flags,
- flagMask);
+ decodeSequence(tokens[1].text.toLower(), keyCode, modifiers, modifierMask, flags, flagMask);
KeyboardTranslator::Command command = KeyboardTranslator::NoCommand;
QByteArray text;
// get text or command
- if ( tokens[2].type == Token::OutputText )
- {
+ if (tokens[2].type == Token::OutputText) {
text = tokens[2].text.toLocal8Bit();
- }
- else if ( tokens[2].type == Token::Command )
- {
+ } else if (tokens[2].type == Token::Command) {
// identify command
- if (!parseAsCommand(tokens[2].text,command))
+ if (!parseAsCommand(tokens[2].text, command))
qDebug() << "Command" << tokens[2].text << "not understood.";
}
KeyboardTranslator::Entry newEntry;
- newEntry.setKeyCode( keyCode );
- newEntry.setState( flags );
- newEntry.setStateMask( flagMask );
- newEntry.setModifiers( modifiers );
- newEntry.setModifierMask( modifierMask );
- newEntry.setText( text );
- newEntry.setCommand( command );
+ newEntry.setKeyCode(keyCode);
+ newEntry.setState(flags);
+ newEntry.setStateMask(flagMask);
+ newEntry.setModifiers(modifiers);
+ newEntry.setModifierMask(modifierMask);
+ newEntry.setText(text);
+ newEntry.setCommand(command);
_nextEntry = newEntry;
@@ -282,37 +259,34 @@ void KeyboardTranslatorReader::readNext()
_hasNext = false;
}
-bool KeyboardTranslatorReader::parseAsCommand(const QString& text,KeyboardTranslator::Command& command)
-{
- if ( text.compare(QLatin1String("erase"),Qt::CaseInsensitive) == 0 )
+bool KeyboardTranslatorReader::parseAsCommand(
+ const QString &text, KeyboardTranslator::Command &command) {
+ if (text.compare(QLatin1String("erase"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::EraseCommand;
- else if ( text.compare(QLatin1String("scrollpageup"),Qt::CaseInsensitive) == 0 )
+ else if (text.compare(QLatin1String("scrollpageup"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollPageUpCommand;
- else if ( text.compare(QLatin1String("scrollpagedown"),Qt::CaseInsensitive) == 0 )
+ else if (text.compare(QLatin1String("scrollpagedown"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollPageDownCommand;
- else if ( text.compare(QLatin1String("scrolllineup"),Qt::CaseInsensitive) == 0 )
+ else if (text.compare(QLatin1String("scrolllineup"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollLineUpCommand;
- else if ( text.compare(QLatin1String("scrolllinedown"),Qt::CaseInsensitive) == 0 )
+ else if (text.compare(QLatin1String("scrolllinedown"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollLineDownCommand;
- else if ( text.compare(QLatin1String("scrolllock"),Qt::CaseInsensitive) == 0 )
+ else if (text.compare(QLatin1String("scrolllock"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollLockCommand;
- else if ( text.compare(QLatin1String("scrolluptotop"),Qt::CaseInsensitive) == 0)
+ else if (text.compare(QLatin1String("scrolluptotop"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollUpToTopCommand;
- else if ( text.compare(QLatin1String("scrolldowntobottom"),Qt::CaseInsensitive) == 0)
+ else if (text.compare(QLatin1String("scrolldowntobottom"), Qt::CaseInsensitive) == 0)
command = KeyboardTranslator::ScrollDownToBottomCommand;
else
return false;
- return true;
+ return true;
}
-bool KeyboardTranslatorReader::decodeSequence(const QString& text,
- int& keyCode,
- Qt::KeyboardModifiers& modifiers,
- Qt::KeyboardModifiers& modifierMask,
- KeyboardTranslator::States& flags,
- KeyboardTranslator::States& flagMask)
-{
+bool KeyboardTranslatorReader::decodeSequence(
+ const QString &text, int &keyCode, Qt::KeyboardModifiers &modifiers,
+ Qt::KeyboardModifiers &modifierMask, KeyboardTranslator::States &flags,
+ KeyboardTranslator::States &flagMask) {
bool isWanted = true;
bool endOfItem = false;
QString buffer;
@@ -322,42 +296,32 @@ bool KeyboardTranslatorReader::decodeSequence(const QString& text,
KeyboardTranslator::States tempFlags = flags;
KeyboardTranslator::States tempFlagMask = flagMask;
- for ( int i = 0 ; i < text.size() ; i++ )
- {
- const QChar& ch = text[i];
+ for (int i = 0; i < text.size(); i++) {
+ const QChar &ch = text[i];
bool isFirstLetter = i == 0;
- bool isLastLetter = ( i == text.size()-1 );
+ bool isLastLetter = (i == text.size() - 1);
endOfItem = true;
- if ( ch.isLetterOrNumber() )
- {
+ if (ch.isLetterOrNumber()) {
endOfItem = false;
buffer.append(ch);
- } else if ( isFirstLetter )
- {
+ } else if (isFirstLetter) {
buffer.append(ch);
}
- if ( (endOfItem || isLastLetter) && !buffer.isEmpty() )
- {
+ if ((endOfItem || isLastLetter) && !buffer.isEmpty()) {
Qt::KeyboardModifier itemModifier = Qt::NoModifier;
int itemKeyCode = 0;
KeyboardTranslator::State itemFlag = KeyboardTranslator::NoState;
- if ( parseAsModifier(buffer,itemModifier) )
- {
+ if (parseAsModifier(buffer, itemModifier)) {
tempModifierMask |= itemModifier;
-
- if ( isWanted )
+ if (isWanted)
tempModifiers |= itemModifier;
- }
- else if ( parseAsStateFlag(buffer,itemFlag) )
- {
+ } else if (parseAsStateFlag(buffer, itemFlag)) {
tempFlagMask |= itemFlag;
-
- if ( isWanted )
+ if (isWanted)
tempFlags |= itemFlag;
- }
- else if ( parseAsKeyCode(buffer,itemKeyCode) )
+ } else if (parseAsKeyCode(buffer, itemKeyCode))
keyCode = itemKeyCode;
else
qDebug() << "Unable to parse key binding item:" << buffer;
@@ -367,10 +331,10 @@ bool KeyboardTranslatorReader::decodeSequence(const QString& text,
// check if this is a wanted / not-wanted flag and update the
// state ready for the next item
- if ( ch == QLatin1Char('+') )
- isWanted = true;
- else if ( ch == QLatin1Char('-') )
- isWanted = false;
+ if (ch == QLatin1Char('+'))
+ isWanted = true;
+ else if (ch == QLatin1Char('-'))
+ isWanted = false;
}
modifiers = tempModifiers;
@@ -381,58 +345,56 @@ bool KeyboardTranslatorReader::decodeSequence(const QString& text,
return true;
}
-bool KeyboardTranslatorReader::parseAsModifier(const QString& item , Qt::KeyboardModifier& modifier)
-{
- if ( item == QLatin1String("shift") )
+bool KeyboardTranslatorReader::parseAsModifier(const QString &item,
+ Qt::KeyboardModifier &modifier) {
+ if (item == QLatin1String("shift"))
modifier = Qt::ShiftModifier;
- else if ( item == QLatin1String("ctrl") || item == QLatin1String("control") )
+ else if (item == QLatin1String("ctrl") || item == QLatin1String("control"))
modifier = Qt::ControlModifier;
- else if ( item == QLatin1String("alt") )
+ else if (item == QLatin1String("alt"))
modifier = Qt::AltModifier;
- else if ( item == QLatin1String("meta") )
+ else if (item == QLatin1String("meta"))
modifier = Qt::MetaModifier;
- else if ( item == QLatin1String("keypad") )
+ else if (item == QLatin1String("keypad"))
modifier = Qt::KeypadModifier;
else
return false;
return true;
}
-bool KeyboardTranslatorReader::parseAsStateFlag(const QString& item , KeyboardTranslator::State& flag)
-{
- if ( item == QLatin1String("appcukeys") || item == QLatin1String("appcursorkeys") )
+
+bool KeyboardTranslatorReader::parseAsStateFlag(const QString &item, KeyboardTranslator::State &flag) {
+ if (item == QLatin1String("appcukeys") || item == QLatin1String("appcursorkeys"))
flag = KeyboardTranslator::CursorKeysState;
- else if ( item == QLatin1String("ansi") )
+ else if (item == QLatin1String("ansi"))
flag = KeyboardTranslator::AnsiState;
- else if ( item == QLatin1String("newline") )
+ else if (item == QLatin1String("newline"))
flag = KeyboardTranslator::NewLineState;
- else if ( item == QLatin1String("appscreen") )
+ else if (item == QLatin1String("appscreen"))
flag = KeyboardTranslator::AlternateScreenState;
- else if ( item == QLatin1String("anymod") || item == QLatin1String("anymodifier") )
+ else if (item == QLatin1String("anymod") || item == QLatin1String("anymodifier"))
flag = KeyboardTranslator::AnyModifierState;
- else if ( item == QLatin1String("appkeypad") )
+ else if (item == QLatin1String("appkeypad"))
flag = KeyboardTranslator::ApplicationKeypadState;
else
return false;
return true;
}
-bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode)
-{
+
+bool KeyboardTranslatorReader::parseAsKeyCode(const QString &item, int &keyCode) {
QKeySequence sequence = QKeySequence::fromString(item);
- if ( !sequence.isEmpty() )
- {
+ if (!sequence.isEmpty()) {
keyCode = sequence[0].toCombined();
- if ( sequence.count() > 1 )
- {
+ if (sequence.count() > 1) {
qDebug() << "Unhandled key codes in sequence: " << item;
}
}
// additional cases implemented for backwards compatibility with KDE 3
- else if ( item == QLatin1String("prior") )
+ else if (item == QLatin1String("prior"))
keyCode = Qt::Key_PageUp;
- else if ( item == QLatin1String("next") )
+ else if (item == QLatin1String("next"))
keyCode = Qt::Key_PageDown;
else
return false;
@@ -440,26 +402,25 @@ bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode
return true;
}
-QString KeyboardTranslatorReader::description() const
-{
+QString KeyboardTranslatorReader::description() const {
return _description;
}
-bool KeyboardTranslatorReader::hasNextEntry() const
-{
- return _hasNext;
+
+bool KeyboardTranslatorReader::hasNextEntry() const {
+ return _hasNext;
}
-KeyboardTranslator::Entry KeyboardTranslatorReader::createEntry( const QString& condition ,
- const QString& result )
-{
+
+KeyboardTranslator::Entry KeyboardTranslatorReader::createEntry(const QString &condition,
+ const QString &result) {
QString entryString = QString::fromLatin1("keyboard \"temporary\"\nkey ");
entryString.append(condition);
entryString.append(QLatin1String(" : "));
- // if 'result' is the name of a command then the entry result will be that command,
- // otherwise the result will be treated as a string to echo when the key sequence
- // specified by 'condition' is pressed
+ // if 'result' is the name of a command then the entry result will be that
+ // command, otherwise the result will be treated as a string to echo when the
+ // key sequence specified by 'condition' is pressed
KeyboardTranslator::Command command;
- if (parseAsCommand(result,command))
+ if (parseAsCommand(result, command))
entryString.append(result);
else
entryString.append(QLatin1Char('\"') + result + QLatin1Char('\"'));
@@ -470,32 +431,30 @@ KeyboardTranslator::Entry KeyboardTranslatorReader::createEntry( const QString&
KeyboardTranslatorReader reader(&buffer);
KeyboardTranslator::Entry entry;
- if ( reader.hasNextEntry() )
+ if (reader.hasNextEntry())
entry = reader.nextEntry();
return entry;
}
-KeyboardTranslator::Entry KeyboardTranslatorReader::nextEntry()
-{
- Q_ASSERT( _hasNext );
+KeyboardTranslator::Entry KeyboardTranslatorReader::nextEntry() {
+ Q_ASSERT(_hasNext);
KeyboardTranslator::Entry entry = _nextEntry;
readNext();
return entry;
}
-bool KeyboardTranslatorReader::parseError()
-{
- return false;
+
+bool KeyboardTranslatorReader::parseError() {
+ return false;
}
-QList KeyboardTranslatorReader::tokenize(const QString& line)
-{
+
+QList KeyboardTranslatorReader::tokenize(const QString &line) {
QString text = line;
// remove comments
bool inQuotes = false;
int commentPos = -1;
- for (int i=text.length()-1;i>=0;i--)
- {
+ for (int i = text.length() - 1; i >= 0; i--) {
QChar ch = text[i];
if (ch == QLatin1Char('\"'))
inQuotes = !inQuotes;
@@ -503,7 +462,7 @@ QList KeyboardTranslatorReader::tokenize(const
commentPos = i;
}
if (commentPos != -1)
- text.remove(commentPos,text.length());
+ text.remove(commentPos, text.length());
text = text.simplified();
@@ -511,56 +470,48 @@ QList KeyboardTranslatorReader::tokenize(const
static QRegularExpression title(QLatin1String("keyboard\\s+\"(.*)\""));
// key line: key KeySequence : "output"
// key line: key KeySequence : command
- static QRegularExpression key(QLatin1String("key\\s+([\\w\\+\\s\\-\\*\\.]+)\\s*:\\s*(\"(.*)\"|\\w+)"));
+ static QRegularExpression key(
+ QLatin1String("key\\s+([\\w\\+\\s\\-\\*\\.]+)\\s*:\\s*(\"(.*)\"|\\w+)"));
QList list;
- if ( text.isEmpty() )
- {
+ if (text.isEmpty()) {
return list;
}
const auto titleMatch = title.match(text);
const auto keyMatch = key.match(text);
- if ( titleMatch.hasMatch() )
- {
- Token titleToken = { Token::TitleKeyword , QString() };
- Token textToken = { Token::TitleText , titleMatch.captured(1) };
+ if (titleMatch.hasMatch()) {
+ Token titleToken = {Token::TitleKeyword, QString()};
+ Token textToken = {Token::TitleText, titleMatch.captured(1)};
list << titleToken << textToken;
- }
- else if ( keyMatch.hasMatch() )
- {
- Token keyToken = { Token::KeyKeyword , QString() };
- Token sequenceToken = { Token::KeySequence , keyMatch.captured(1).remove(QLatin1Char(' ')) };
+ } else if (keyMatch.hasMatch()) {
+ Token keyToken = {Token::KeyKeyword, QString()};
+ Token sequenceToken = {Token::KeySequence,
+ keyMatch.captured(1).remove(QLatin1Char(' '))};
list << keyToken << sequenceToken;
- if ( keyMatch.captured(3).isEmpty() )
- {
+ if (keyMatch.captured(3).isEmpty()) {
// capturedTexts()[2] is a command
- Token commandToken = { Token::Command , keyMatch.captured(2) };
+ Token commandToken = {Token::Command, keyMatch.captured(2)};
list << commandToken;
- }
- else
- {
+ } else {
// capturedTexts()[3] is the output string
- Token outputToken = { Token::OutputText , keyMatch.captured(3) };
- list << outputToken;
+ Token outputToken = {Token::OutputText, keyMatch.captured(3)};
+ list << outputToken;
}
- }
- else
- {
- qDebug() << "Line in keyboard translator file could not be understood:" << text;
+ } else {
+ qDebug() << "Line in keyboard translator file could not be understood:"
+ << text;
}
return list;
}
-QList KeyboardTranslatorManager::allTranslators()
-{
- if ( !_haveLoadedAll )
- {
+QList KeyboardTranslatorManager::allTranslators() {
+ if (!_haveLoadedAll) {
findTranslators();
}
@@ -568,210 +519,220 @@ QList KeyboardTranslatorManager::allTranslators()
}
KeyboardTranslator::Entry::Entry()
-: _keyCode(0)
-, _modifiers(Qt::NoModifier)
-, _modifierMask(Qt::NoModifier)
-, _state(NoState)
-, _stateMask(NoState)
-, _command(NoCommand)
-{
-}
-
-bool KeyboardTranslator::Entry::operator==(const Entry& rhs) const
-{
- return _keyCode == rhs._keyCode &&
- _modifiers == rhs._modifiers &&
- _modifierMask == rhs._modifierMask &&
- _state == rhs._state &&
- _stateMask == rhs._stateMask &&
- _command == rhs._command &&
- _text == rhs._text;
-}
-
-bool KeyboardTranslator::Entry::matches(int keyCode ,
+ : _keyCode(0), _modifiers(Qt::NoModifier), _modifierMask(Qt::NoModifier),
+ _state(NoState), _stateMask(NoState), _command(NoCommand) {
+}
+
+bool KeyboardTranslator::Entry::operator==(const Entry &rhs) const {
+ return _keyCode == rhs._keyCode && _modifiers == rhs._modifiers &&
+ _modifierMask == rhs._modifierMask && _state == rhs._state &&
+ _stateMask == rhs._stateMask && _command == rhs._command &&
+ _text == rhs._text;
+}
+
+bool KeyboardTranslator::Entry::matches(int keyCode,
Qt::KeyboardModifiers modifiers,
- States testState) const
-{
+ States testState) const {
#ifdef Q_OS_MAC
// On Mac, arrow keys are considered part of keypad. Ignore that.
modifiers &= ~Qt::KeypadModifier;
#endif
- if ( _keyCode != keyCode )
+ if (_keyCode != keyCode)
return false;
- if ( (modifiers & _modifierMask) != (_modifiers & _modifierMask) )
+ if ((modifiers & _modifierMask) != (_modifiers & _modifierMask))
return false;
// if modifiers is non-zero, the 'any modifier' state is implicit
- if ( (modifiers & ~Qt::KeypadModifier) != 0 )
+ if ((modifiers & ~Qt::KeypadModifier) != 0)
testState |= AnyModifierState;
- if ( (testState & _stateMask) != (_state & _stateMask) )
+ if ((testState & _stateMask) != (_state & _stateMask))
return false;
- // special handling for the 'Any Modifier' state, which checks for the presence of
- // any or no modifiers. In this context, the 'keypad' modifier does not count.
+ // special handling for the 'Any Modifier' state, which checks for the
+ // presence of any or no modifiers. In this context, the 'keypad' modifier
+ // does not count.
bool anyModifiersSet = modifiers != 0 && modifiers != Qt::KeypadModifier;
bool wantAnyModifier = _state & KeyboardTranslator::AnyModifierState;
- if ( _stateMask & KeyboardTranslator::AnyModifierState )
- {
- if ( wantAnyModifier != anyModifiersSet )
- return false;
+ if (_stateMask & KeyboardTranslator::AnyModifierState) {
+ if (wantAnyModifier != anyModifiersSet)
+ return false;
}
return true;
}
-QByteArray KeyboardTranslator::Entry::escapedText(bool expandWildCards,Qt::KeyboardModifiers modifiers) const
-{
- QByteArray result(text(expandWildCards,modifiers));
- for ( int i = 0 ; i < result.size() ; i++ )
- {
+QByteArray KeyboardTranslator::Entry::escapedText(bool expandWildCards,
+ Qt::KeyboardModifiers modifiers) const {
+ QByteArray result(text(expandWildCards, modifiers));
+
+ for (int i = 0; i < result.size(); i++) {
char ch = result[i];
char replacement = 0;
- switch ( ch )
- {
- case 27 : replacement = 'E'; break;
- case 8 : replacement = 'b'; break;
- case 12 : replacement = 'f'; break;
- case 9 : replacement = 't'; break;
- case 13 : replacement = 'r'; break;
- case 10 : replacement = 'n'; break;
+ switch (ch) {
+ case 27:
+ replacement = 'E';
+ break;
+ case 8:
+ replacement = 'b';
+ break;
+ case 12:
+ replacement = 'f';
+ break;
+ case 9:
+ replacement = 't';
+ break;
+ case 13:
+ replacement = 'r';
+ break;
+ case 10:
+ replacement = 'n';
+ break;
default:
// any character which is not printable is replaced by an equivalent
// \xhh escape sequence (where 'hh' are the corresponding hex digits)
- if ( !QChar(QLatin1Char(ch)).isPrint() )
+ if (!QChar(QLatin1Char(ch)).isPrint())
replacement = 'x';
+ break;
}
- if ( replacement == 'x' )
- {
+ if (replacement == 'x') {
QByteArray escaped("\\x");
- escaped += QByteArray(1,ch).toHex();
+ escaped += QByteArray(1, ch).toHex();
result.replace(i, 1, QByteArrayView(escaped));
- } else if ( replacement != 0 )
- {
- result.remove(i,1);
- result.insert(i,'\\');
- result.insert(i+1,replacement);
+ } else if (replacement != 0) {
+ result.remove(i, 1);
+ result.insert(i, '\\');
+ result.insert(i + 1, replacement);
}
}
return result;
}
-QByteArray KeyboardTranslator::Entry::unescape(const QByteArray& input) const
-{
+
+QByteArray KeyboardTranslator::Entry::unescape(const QByteArray &input) const {
QByteArray result(input);
- for ( int i = 0 ; i < result.size()-1 ; i++ )
- {
+ for (int i = 0; i < result.size() - 1; i++) {
char ch = result[i];
- if ( ch == '\\' )
- {
- char replacement[2] = {0,0};
- int charsToRemove = 2;
- bool escapedChar = true;
-
- switch ( result[i+1] )
- {
- case 'E' : replacement[0] = 27; break;
- case 'b' : replacement[0] = 8 ; break;
- case 'f' : replacement[0] = 12; break;
- case 't' : replacement[0] = 9 ; break;
- case 'r' : replacement[0] = 13; break;
- case 'n' : replacement[0] = 10; break;
- case 'x' :
- {
+ if (ch == '\\') {
+ char replacement[2] = {0, 0};
+ int charsToRemove = 2;
+ bool escapedChar = true;
+
+ switch (result[i + 1]) {
+ case 'E':
+ replacement[0] = 27;
+ break;
+ case 'b':
+ replacement[0] = 8;
+ break;
+ case 'f':
+ replacement[0] = 12;
+ break;
+ case 't':
+ replacement[0] = 9;
+ break;
+ case 'r':
+ replacement[0] = 13;
+ break;
+ case 'n':
+ replacement[0] = 10;
+ break;
+ case 'x': {
// format is \xh or \xhh where 'h' is a hexadecimal
// digit from 0-9 or A-F which should be replaced
// with the corresponding character value
char hexDigits[3] = {0};
- if ( (i < result.size()-2) && isxdigit(result[i+2]) )
- hexDigits[0] = result[i+2];
- if ( (i < result.size()-3) && isxdigit(result[i+3]) )
- hexDigits[1] = result[i+3];
+ if ((i < result.size() - 2) && isxdigit(result[i + 2]))
+ hexDigits[0] = result[i + 2];
+ if ((i < result.size() - 3) && isxdigit(result[i + 3]))
+ hexDigits[1] = result[i + 3];
unsigned charValue = 0;
- sscanf(hexDigits,"%x",&charValue);
+ sscanf(hexDigits, "%x", &charValue);
replacement[0] = (char)charValue;
charsToRemove = 2 + strlen(hexDigits);
- }
- break;
- default:
- escapedChar = false;
- }
-
- if ( escapedChar )
- result.replace(i,charsToRemove,replacement);
+ break;
+ }
+ default:
+ escapedChar = false;
+ break;
+ }
+
+ if (escapedChar)
+ result.replace(i, charsToRemove, replacement);
}
}
return result;
}
-void KeyboardTranslator::Entry::insertModifier( QString& item , int modifier ) const
-{
- if ( !(modifier & _modifierMask) )
+void KeyboardTranslator::Entry::insertModifier(QString &item,
+ int modifier) const {
+ if (!(modifier & _modifierMask))
return;
- if ( modifier & _modifiers )
+ if (modifier & _modifiers)
item += QLatin1Char('+');
else
item += QLatin1Char('-');
- if ( modifier == Qt::ShiftModifier )
+ if (modifier == Qt::ShiftModifier)
item += QLatin1String("Shift");
- else if ( modifier == Qt::ControlModifier )
+ else if (modifier == Qt::ControlModifier)
item += QLatin1String("Ctrl");
- else if ( modifier == Qt::AltModifier )
+ else if (modifier == Qt::AltModifier)
item += QLatin1String("Alt");
- else if ( modifier == Qt::MetaModifier )
+ else if (modifier == Qt::MetaModifier)
item += QLatin1String("Meta");
- else if ( modifier == Qt::KeypadModifier )
+ else if (modifier == Qt::KeypadModifier)
item += QLatin1String("KeyPad");
}
-void KeyboardTranslator::Entry::insertState( QString& item , int state ) const
-{
- if ( !(state & _stateMask) )
+
+void KeyboardTranslator::Entry::insertState(QString &item, int state) const {
+ if (!(state & _stateMask))
return;
- if ( state & _state )
- item += QLatin1Char('+') ;
+ if (state & _state)
+ item += QLatin1Char('+');
else
- item += QLatin1Char('-') ;
+ item += QLatin1Char('-');
- if ( state == KeyboardTranslator::AlternateScreenState )
+ if (state == KeyboardTranslator::AlternateScreenState)
item += QLatin1String("AppScreen");
- else if ( state == KeyboardTranslator::NewLineState )
+ else if (state == KeyboardTranslator::NewLineState)
item += QLatin1String("NewLine");
- else if ( state == KeyboardTranslator::AnsiState )
+ else if (state == KeyboardTranslator::AnsiState)
item += QLatin1String("Ansi");
- else if ( state == KeyboardTranslator::CursorKeysState )
+ else if (state == KeyboardTranslator::CursorKeysState)
item += QLatin1String("AppCursorKeys");
- else if ( state == KeyboardTranslator::AnyModifierState )
+ else if (state == KeyboardTranslator::AnyModifierState)
item += QLatin1String("AnyModifier");
- else if ( state == KeyboardTranslator::ApplicationKeypadState )
+ else if (state == KeyboardTranslator::ApplicationKeypadState)
item += QLatin1String("AppKeypad");
}
-QString KeyboardTranslator::Entry::resultToString(bool expandWildCards,Qt::KeyboardModifiers modifiers) const
-{
- if ( !_text.isEmpty() )
- return QString::fromLatin1(escapedText(expandWildCards,modifiers));
- else if ( _command == EraseCommand )
+
+QString KeyboardTranslator::Entry::resultToString(
+ bool expandWildCards, Qt::KeyboardModifiers modifiers) const {
+ if (!_text.isEmpty())
+ return QString::fromLatin1(escapedText(expandWildCards, modifiers));
+ else if (_command == EraseCommand)
return QLatin1String("Erase");
- else if ( _command == ScrollPageUpCommand )
+ else if (_command == ScrollPageUpCommand)
return QLatin1String("ScrollPageUp");
- else if ( _command == ScrollPageDownCommand )
+ else if (_command == ScrollPageDownCommand)
return QLatin1String("ScrollPageDown");
- else if ( _command == ScrollLineUpCommand )
+ else if (_command == ScrollLineUpCommand)
return QLatin1String("ScrollLineUp");
- else if ( _command == ScrollLineDownCommand )
+ else if (_command == ScrollLineDownCommand)
return QLatin1String("ScrollLineDown");
- else if ( _command == ScrollLockCommand )
+ else if (_command == ScrollLockCommand)
return QLatin1String("ScrollLock");
else if (_command == ScrollUpToTopCommand)
return QLatin1String("ScrollUpToTop");
@@ -780,105 +741,98 @@ QString KeyboardTranslator::Entry::resultToString(bool expandWildCards,Qt::Keybo
return QString();
}
-QString KeyboardTranslator::Entry::conditionToString() const
-{
+
+QString KeyboardTranslator::Entry::conditionToString() const {
QString result = QKeySequence(_keyCode).toString();
- insertModifier( result , Qt::ShiftModifier );
- insertModifier( result , Qt::ControlModifier );
- insertModifier( result , Qt::AltModifier );
- insertModifier( result , Qt::MetaModifier );
- insertModifier( result , Qt::KeypadModifier );
+ insertModifier(result, Qt::ShiftModifier);
+ insertModifier(result, Qt::ControlModifier);
+ insertModifier(result, Qt::AltModifier);
+ insertModifier(result, Qt::MetaModifier);
+ insertModifier(result, Qt::KeypadModifier);
- insertState( result , KeyboardTranslator::AlternateScreenState );
- insertState( result , KeyboardTranslator::NewLineState );
- insertState( result , KeyboardTranslator::AnsiState );
- insertState( result , KeyboardTranslator::CursorKeysState );
- insertState( result , KeyboardTranslator::AnyModifierState );
- insertState( result , KeyboardTranslator::ApplicationKeypadState );
+ insertState(result, KeyboardTranslator::AlternateScreenState);
+ insertState(result, KeyboardTranslator::NewLineState);
+ insertState(result, KeyboardTranslator::AnsiState);
+ insertState(result, KeyboardTranslator::CursorKeysState);
+ insertState(result, KeyboardTranslator::AnyModifierState);
+ insertState(result, KeyboardTranslator::ApplicationKeypadState);
return result;
}
-KeyboardTranslator::KeyboardTranslator(const QString& name)
-: _name(name)
-{
+KeyboardTranslator::KeyboardTranslator(const QString &name) : _name(name) {
}
-void KeyboardTranslator::setDescription(const QString& description)
-{
+void KeyboardTranslator::setDescription(const QString &description) {
_description = description;
}
-QString KeyboardTranslator::description() const
-{
- return _description;
+
+QString KeyboardTranslator::description() const {
+ return _description;
}
-void KeyboardTranslator::setName(const QString& name)
-{
- _name = name;
+
+void KeyboardTranslator::setName(const QString &name) {
+ _name = name;
}
-QString KeyboardTranslator::name() const
-{
- return _name;
+
+QString KeyboardTranslator::name() const {
+ return _name;
}
-QList KeyboardTranslator::entries() const
-{
+QList KeyboardTranslator::entries() const {
return _entries.values();
}
-void KeyboardTranslator::addEntry(const Entry& entry)
-{
+void KeyboardTranslator::addEntry(const Entry &entry) {
const int keyCode = entry.keyCode();
- _entries.insert(keyCode,entry);
-}
-void KeyboardTranslator::replaceEntry(const Entry& existing , const Entry& replacement)
-{
- if ( !existing.isNull() )
- _entries.remove(existing.keyCode(),existing);
- _entries.insert(replacement.keyCode(),replacement);
-}
-void KeyboardTranslator::removeEntry(const Entry& entry)
-{
- _entries.remove(entry.keyCode(),entry);
-}
-KeyboardTranslator::Entry KeyboardTranslator::findEntry(int keyCode, Qt::KeyboardModifiers modifiers, States state) const
-{
- for (auto it = _entries.cbegin(), end = _entries.cend(); it != end; ++it)
- {
+ _entries.insert(keyCode, entry);
+}
+
+void KeyboardTranslator::replaceEntry(const Entry &existing,
+ const Entry &replacement) {
+ if (!existing.isNull())
+ _entries.remove(existing.keyCode(), existing);
+ _entries.insert(replacement.keyCode(), replacement);
+}
+
+void KeyboardTranslator::removeEntry(const Entry &entry) {
+ _entries.remove(entry.keyCode(), entry);
+}
+
+KeyboardTranslator::Entry KeyboardTranslator::findEntry(int keyCode, Qt::KeyboardModifiers modifiers,
+ States state) const {
+ for (auto it = _entries.cbegin(), end = _entries.cend(); it != end; ++it) {
if (it.key() == keyCode)
- if ( it.value().matches(keyCode,modifiers,state) )
+ if (it.value().matches(keyCode, modifiers, state))
return *it;
}
return Entry(); // entry not found
}
-void KeyboardTranslatorManager::addTranslator(KeyboardTranslator* translator)
-{
- _translators.insert(translator->name(),translator);
- if ( !saveTranslator(translator) )
- qDebug() << "Unable to save translator" << translator->name()
- << "to disk.";
+void KeyboardTranslatorManager::addTranslator(KeyboardTranslator *translator) {
+ _translators.insert(translator->name(), translator);
+
+ if (!saveTranslator(translator))
+ qDebug() << "Unable to save translator" << translator->name() << "to disk.";
}
-bool KeyboardTranslatorManager::deleteTranslator(const QString& name)
-{
- Q_ASSERT( _translators.contains(name) );
+
+bool KeyboardTranslatorManager::deleteTranslator(const QString &name) {
+ Q_ASSERT(_translators.contains(name));
// locate and delete
QString path = findTranslatorPath(name);
- if ( QFile::remove(path) )
- {
+ if (QFile::remove(path)) {
_translators.remove(name);
return true;
- }
- else
- {
+ } else {
qDebug() << "Failed to remove translator - " << path;
return false;
}
}
-Q_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager )
-KeyboardTranslatorManager* KeyboardTranslatorManager::instance()
-{
+
+Q_GLOBAL_STATIC(KeyboardTranslatorManager, theKeyboardTranslatorManager)
+
+KeyboardTranslatorManager *KeyboardTranslatorManager::instance() {
return theKeyboardTranslatorManager;
}
diff --git a/lib/qtermwidget/KeyboardTranslator.h b/lib/qtermwidget/KeyboardTranslator.h
index 7f650fbf..e48a7b0c 100644
--- a/lib/qtermwidget/KeyboardTranslator.h
+++ b/lib/qtermwidget/KeyboardTranslator.h
@@ -1,22 +1,22 @@
/*
- This source file is part of Konsole, a terminal emulator.
+ This source file is part of Konsole, a terminal emulator.
- Copyright 2007-2008 by Robert Knight
+ Copyright 2007-2008 by Robert Knight
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef KEYBOARDTRANSLATOR_H
#define KEYBOARDTRANSLATOR_H
@@ -54,8 +54,7 @@ class KeyboardTranslator
* This enum describes the states which may be associated with with a particular
* entry in the keyboard translation entry.
*/
- enum State
- {
+ enum State {
/** Indicates that no special state is active */
NoState = 0,
/**
@@ -86,8 +85,7 @@ class KeyboardTranslator
/**
* This enum describes commands which are associated with particular key sequences.
*/
- enum Command
- {
+ enum Command {
/** Indicates that no command is associated with this command sequence */
NoCommand = 0,
/** TODO Document me */
@@ -116,8 +114,7 @@ class KeyboardTranslator
* and the character sequence and commands associated with it for a particular
* KeyboardTranslator.
*/
- class Entry
- {
+ class Entry {
public:
/**
* Constructs a new entry for a keyboard translator.
@@ -378,10 +375,8 @@ class KeyboardTranslatorReader
static KeyboardTranslator::Entry createEntry( const QString& condition ,
const QString& result );
private:
- struct Token
- {
- enum Type
- {
+ struct Token {
+ enum Type {
TitleKeyword,
TitleText,
KeyKeyword,
@@ -404,7 +399,7 @@ class KeyboardTranslatorReader
static bool parseAsModifier(const QString& item , Qt::KeyboardModifier& modifier);
static bool parseAsStateFlag(const QString& item , KeyboardTranslator::State& state);
static bool parseAsKeyCode(const QString& item , int& keyCode);
- static bool parseAsCommand(const QString& text , KeyboardTranslator::Command& command);
+ static bool parseAsCommand(const QString& text , KeyboardTranslator::Command& command);
QIODevice* _source;
QString _description;
@@ -497,7 +492,7 @@ class KeyboardTranslatorManager
QList allTranslators();
/** Returns the global KeyboardTranslatorManager instance. */
- static KeyboardTranslatorManager* instance();
+ static KeyboardTranslatorManager* instance();
private:
static const QByteArray defaultTranslatorText;
@@ -515,53 +510,60 @@ class KeyboardTranslatorManager
bool _haveLoadedAll;
};
-inline int KeyboardTranslator::Entry::keyCode() const { return _keyCode; }
-inline void KeyboardTranslator::Entry::setKeyCode(int keyCode) { _keyCode = keyCode; }
+inline int KeyboardTranslator::Entry::keyCode() const {
+ return _keyCode;
+}
-inline void KeyboardTranslator::Entry::setModifiers( Qt::KeyboardModifiers modifier )
-{
+inline void KeyboardTranslator::Entry::setKeyCode(int keyCode) {
+ _keyCode = keyCode;
+}
+
+inline void KeyboardTranslator::Entry::setModifiers( Qt::KeyboardModifiers modifier ) {
_modifiers = modifier;
}
-inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifiers() const { return _modifiers; }
-inline void KeyboardTranslator::Entry::setModifierMask( Qt::KeyboardModifiers mask )
-{
+inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifiers() const {
+ return _modifiers;
+}
+
+inline void KeyboardTranslator::Entry::setModifierMask( Qt::KeyboardModifiers mask ) {
_modifierMask = mask;
}
-inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifierMask() const { return _modifierMask; }
-inline bool KeyboardTranslator::Entry::isNull() const
-{
+inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifierMask() const {
+ return _modifierMask;
+}
+
+inline bool KeyboardTranslator::Entry::isNull() const {
return ( *this == Entry() );
}
-inline void KeyboardTranslator::Entry::setCommand( Command command )
-{
+inline void KeyboardTranslator::Entry::setCommand( Command command ) {
_command = command;
}
-inline KeyboardTranslator::Command KeyboardTranslator::Entry::command() const { return _command; }
-inline void KeyboardTranslator::Entry::setText( const QByteArray& text )
-{
+inline KeyboardTranslator::Command KeyboardTranslator::Entry::command() const {
+ return _command;
+}
+
+inline void KeyboardTranslator::Entry::setText( const QByteArray& text ) {
_text = unescape(text);
}
-inline int oneOrZero(int value)
-{
+
+inline int oneOrZero(int value) {
return value ? 1 : 0;
}
-inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards,Qt::KeyboardModifiers modifiers) const
-{
+
+inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards,Qt::KeyboardModifiers modifiers) const {
QByteArray expandedText = _text;
- if (expandWildCards)
- {
+ if (expandWildCards) {
int modifierValue = 1;
modifierValue += oneOrZero(modifiers & Qt::ShiftModifier);
modifierValue += oneOrZero(modifiers & Qt::AltModifier) << 1;
modifierValue += oneOrZero(modifiers & KeyboardTranslator::CTRL_MOD) << 2;
- for (int i=0;i<_text.length();i++)
- {
+ for (int i=0;i<_text.length();i++) {
if (expandedText[i] == '*')
expandedText[i] = '0' + modifierValue;
}
@@ -570,17 +572,21 @@ inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards,Qt::Keybo
return expandedText;
}
-inline void KeyboardTranslator::Entry::setState( States state )
-{
+inline void KeyboardTranslator::Entry::setState( States state ) {
_state = state;
}
-inline KeyboardTranslator::States KeyboardTranslator::Entry::state() const { return _state; }
-inline void KeyboardTranslator::Entry::setStateMask( States stateMask )
-{
+inline KeyboardTranslator::States KeyboardTranslator::Entry::state() const {
+ return _state;
+}
+
+inline void KeyboardTranslator::Entry::setStateMask( States stateMask ) {
_stateMask = stateMask;
}
-inline KeyboardTranslator::States KeyboardTranslator::Entry::stateMask() const { return _stateMask; }
+
+inline KeyboardTranslator::States KeyboardTranslator::Entry::stateMask() const {
+ return _stateMask;
+}
Q_DECLARE_METATYPE(KeyboardTranslator::Entry)
Q_DECLARE_METATYPE(const KeyboardTranslator*)
diff --git a/lib/qtermwidget/LineFont.h b/lib/qtermwidget/LineFont.h
deleted file mode 100644
index 9c080ea2..00000000
--- a/lib/qtermwidget/LineFont.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// WARNING: Autogenerated by "fontembedder ./linefont.src".
-// You probably do not want to hand-edit this!
-
-static const quint32 LineChars[] = {
- 0x00007c00, 0x000fffe0, 0x00421084, 0x00e739ce, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00427000, 0x004e7380, 0x00e77800, 0x00ef7bc0,
- 0x00421c00, 0x00439ce0, 0x00e73c00, 0x00e7bde0, 0x00007084, 0x000e7384, 0x000079ce, 0x000f7bce,
- 0x00001c84, 0x00039ce4, 0x00003dce, 0x0007bdee, 0x00427084, 0x004e7384, 0x004279ce, 0x00e77884,
- 0x00e779ce, 0x004f7bce, 0x00ef7bc4, 0x00ef7bce, 0x00421c84, 0x00439ce4, 0x00423dce, 0x00e73c84,
- 0x00e73dce, 0x0047bdee, 0x00e7bde4, 0x00e7bdee, 0x00427c00, 0x0043fce0, 0x004e7f80, 0x004fffe0,
- 0x004fffe0, 0x00e7fde0, 0x006f7fc0, 0x00efffe0, 0x00007c84, 0x0003fce4, 0x000e7f84, 0x000fffe4,
- 0x00007dce, 0x0007fdee, 0x000f7fce, 0x000fffee, 0x00427c84, 0x0043fce4, 0x004e7f84, 0x004fffe4,
- 0x00427dce, 0x00e77c84, 0x00e77dce, 0x0047fdee, 0x004e7fce, 0x00e7fde4, 0x00ef7f84, 0x004fffee,
- 0x00efffe4, 0x00e7fdee, 0x00ef7fce, 0x00efffee, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x000f83e0, 0x00a5294a, 0x004e1380, 0x00a57800, 0x00ad0bc0, 0x004390e0, 0x00a53c00, 0x00a5a1e0,
- 0x000e1384, 0x0000794a, 0x000f0b4a, 0x000390e4, 0x00003d4a, 0x0007a16a, 0x004e1384, 0x00a5694a,
- 0x00ad2b4a, 0x004390e4, 0x00a52d4a, 0x00a5a16a, 0x004f83e0, 0x00a57c00, 0x00ad83e0, 0x000f83e4,
- 0x00007d4a, 0x000f836a, 0x004f93e4, 0x00a57d4a, 0x00ad836a, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001c00, 0x00001084, 0x00007000, 0x00421000,
- 0x00039ce0, 0x000039ce, 0x000e7380, 0x00e73800, 0x000e7f80, 0x00e73884, 0x0003fce0, 0x004239ce
-};
diff --git a/lib/qtermwidget/Screen.h b/lib/qtermwidget/Screen.h
index dd1499f0..e6922428 100644
--- a/lib/qtermwidget/Screen.h
+++ b/lib/qtermwidget/Screen.h
@@ -392,11 +392,9 @@ class Screen
/** Return the number of lines. */
- int getLines() const
- { return lines; }
+ int getLines() const { return lines; }
/** Return the number of columns. */
- int getColumns() const
- { return columns; }
+ int getColumns() const { return columns; }
/** Return the number of lines in the history buffer. */
int getHistLines() const;
/**
diff --git a/lib/qtermwidget/ScreenWindow.cpp b/lib/qtermwidget/ScreenWindow.cpp
index e5d73c2e..04d928c6 100644
--- a/lib/qtermwidget/ScreenWindow.cpp
+++ b/lib/qtermwidget/ScreenWindow.cpp
@@ -1,22 +1,21 @@
/*
- Copyright (C) 2007 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright (C) 2007 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
-
#include "ScreenWindow.h"
#include
#include "Screen.h"
diff --git a/lib/qtermwidget/ScreenWindow.h b/lib/qtermwidget/ScreenWindow.h
index 0921a34d..6ae09300 100644
--- a/lib/qtermwidget/ScreenWindow.h
+++ b/lib/qtermwidget/ScreenWindow.h
@@ -1,20 +1,20 @@
/*
- Copyright 2007-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2007-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef SCREENWINDOW_H
diff --git a/lib/qtermwidget/SearchBar.cpp b/lib/qtermwidget/SearchBar.cpp
index b1f2125d..3c0d6533 100644
--- a/lib/qtermwidget/SearchBar.cpp
+++ b/lib/qtermwidget/SearchBar.cpp
@@ -1,20 +1,20 @@
/*
- Copyright 2013 Christian Surlykke
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2013 Christian Surlykke
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include
#include
diff --git a/lib/qtermwidget/SearchBar.h b/lib/qtermwidget/SearchBar.h
index 9896af2c..3358c35f 100644
--- a/lib/qtermwidget/SearchBar.h
+++ b/lib/qtermwidget/SearchBar.h
@@ -1,20 +1,20 @@
/*
- Copyright 2013 Christian Surlykke
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2013 Christian Surlykke
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef _SEARCHBAR_H
#define _SEARCHBAR_H
diff --git a/lib/qtermwidget/TerminalCharacterDecoder.cpp b/lib/qtermwidget/TerminalCharacterDecoder.cpp
index d067622c..de232812 100644
--- a/lib/qtermwidget/TerminalCharacterDecoder.cpp
+++ b/lib/qtermwidget/TerminalCharacterDecoder.cpp
@@ -1,22 +1,22 @@
/*
- This file is part of Konsole, an X terminal.
-
- Copyright 2006-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+
+ Copyright 2006-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include "TerminalCharacterDecoder.h"
diff --git a/lib/qtermwidget/TerminalCharacterDecoder.h b/lib/qtermwidget/TerminalCharacterDecoder.h
index e25e996e..2011121f 100644
--- a/lib/qtermwidget/TerminalCharacterDecoder.h
+++ b/lib/qtermwidget/TerminalCharacterDecoder.h
@@ -1,22 +1,22 @@
/*
- This file is part of Konsole, an X terminal.
-
- Copyright 2006-2008 by Robert Knight
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ This file is part of Konsole, an X terminal.
+
+ Copyright 2006-2008 by Robert Knight
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef TERMINAL_CHARACTER_DECODER_H
diff --git a/lib/qtermwidget/TerminalDisplay.cpp b/lib/qtermwidget/TerminalDisplay.cpp
index 196f4384..b501a4fd 100644
--- a/lib/qtermwidget/TerminalDisplay.cpp
+++ b/lib/qtermwidget/TerminalDisplay.cpp
@@ -1,23 +1,23 @@
/*
- This file is part of Konsole, a terminal emulator for KDE.
+ This file is part of Konsole, a terminal emulator for KDE.
- Copyright 2006-2008 by Robert Knight
- Copyright 1997,1998 by Lars Doelle
+ Copyright 2006-2008 by Robert Knight
+ Copyright 1997,1998 by Lars Doelle
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#include "TerminalDisplay.h"
@@ -199,15 +199,6 @@ bool TerminalDisplay::isLineCharString(const std::wstring& string) const {
}
-// assert for i in [0..31] : vt100extended(vt100_graphics[i]) == i.
-
-unsigned short vt100_graphics[32] =
-{ // 0/8 1/9 2/10 3/11 4/12 5/13 6/14 7/15
- 0x0020, 0x25C6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0,
- 0x00b1, 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c,
- 0xF800, 0xF801, 0x2500, 0xF803, 0xF804, 0x251c, 0x2524, 0x2534,
- 0x252c, 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00b7
-};
void TerminalDisplay::fontChange(const QFont&)
{
@@ -523,7 +514,24 @@ enum LineEncode
BotR = (1<<23)
};
-#include "LineFont.h"
+static const quint32 LineChars[] = {
+ 0x00007c00, 0x000fffe0, 0x00421084, 0x00e739ce, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00427000, 0x004e7380, 0x00e77800, 0x00ef7bc0,
+ 0x00421c00, 0x00439ce0, 0x00e73c00, 0x00e7bde0, 0x00007084, 0x000e7384, 0x000079ce, 0x000f7bce,
+ 0x00001c84, 0x00039ce4, 0x00003dce, 0x0007bdee, 0x00427084, 0x004e7384, 0x004279ce, 0x00e77884,
+ 0x00e779ce, 0x004f7bce, 0x00ef7bc4, 0x00ef7bce, 0x00421c84, 0x00439ce4, 0x00423dce, 0x00e73c84,
+ 0x00e73dce, 0x0047bdee, 0x00e7bde4, 0x00e7bdee, 0x00427c00, 0x0043fce0, 0x004e7f80, 0x004fffe0,
+ 0x004fffe0, 0x00e7fde0, 0x006f7fc0, 0x00efffe0, 0x00007c84, 0x0003fce4, 0x000e7f84, 0x000fffe4,
+ 0x00007dce, 0x0007fdee, 0x000f7fce, 0x000fffee, 0x00427c84, 0x0043fce4, 0x004e7f84, 0x004fffe4,
+ 0x00427dce, 0x00e77c84, 0x00e77dce, 0x0047fdee, 0x004e7fce, 0x00e7fde4, 0x00ef7f84, 0x004fffee,
+ 0x00efffe4, 0x00e7fdee, 0x00ef7fce, 0x00efffee, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x000f83e0, 0x00a5294a, 0x004e1380, 0x00a57800, 0x00ad0bc0, 0x004390e0, 0x00a53c00, 0x00a5a1e0,
+ 0x000e1384, 0x0000794a, 0x000f0b4a, 0x000390e4, 0x00003d4a, 0x0007a16a, 0x004e1384, 0x00a5694a,
+ 0x00ad2b4a, 0x004390e4, 0x00a52d4a, 0x00a5a16a, 0x004f83e0, 0x00a57c00, 0x00ad83e0, 0x000f83e4,
+ 0x00007d4a, 0x000f836a, 0x004f93e4, 0x00a57d4a, 0x00ad836a, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001c00, 0x00001084, 0x00007000, 0x00421000,
+ 0x00039ce0, 0x000039ce, 0x000e7380, 0x00e73800, 0x000e7f80, 0x00e73884, 0x0003fce0, 0x004239ce
+};
static void drawLineChar(QPainter& paint, int x, int y, int w, int h, uint8_t code)
{
diff --git a/lib/qtermwidget/TerminalDisplay.h b/lib/qtermwidget/TerminalDisplay.h
index 6a338446..7f7a6052 100644
--- a/lib/qtermwidget/TerminalDisplay.h
+++ b/lib/qtermwidget/TerminalDisplay.h
@@ -1,21 +1,21 @@
/*
- Copyright 2007-2008 by Robert Knight
- Copyright 1997,1998 by Lars Doelle
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
+ Copyright 2007-2008 by Robert Knight
+ Copyright 1997,1998 by Lars Doelle
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
*/
#ifndef TERMINALDISPLAY_H
@@ -75,8 +75,6 @@ enum BackgroundMode {
Tile
};
-extern unsigned short vt100_graphics[32];
-
class ScreenWindow;
/**
diff --git a/lib/qtermwidget/Vt102Emulation.cpp b/lib/qtermwidget/Vt102Emulation.cpp
index 20cd3bb7..2c0b1544 100644
--- a/lib/qtermwidget/Vt102Emulation.cpp
+++ b/lib/qtermwidget/Vt102Emulation.cpp
@@ -1279,11 +1279,18 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* event, bool fromPaste)
// Apply current character map.
-wchar_t Vt102Emulation::applyCharset(wchar_t c)
-{
- if (CHARSET.graphic && 0x5f <= c && c <= 0x7e) return vt100_graphics[c-0x5f];
- if (CHARSET.pound && c == '#' ) return 0xa3; //This mode is obsolete
- return c;
+wchar_t Vt102Emulation::applyCharset(wchar_t c) {
+ // assert for i in [0..31] : vt100extended(vt100_graphics[i]) == i.
+ const unsigned short vt100_graphics[32] = {
+ // 0/8 1/9 2/10 3/11 4/12 5/13 6/14 7/15
+ 0x0020, 0x25C6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0,
+ 0x00b1, 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c,
+ 0xF800, 0xF801, 0x2500, 0xF803, 0xF804, 0x251c, 0x2524, 0x2534,
+ 0x252c, 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00b7
+ };
+ if (CHARSET.graphic && 0x5f <= c && c <= 0x7e) return vt100_graphics[c-0x5f];
+ if (CHARSET.pound && c == '#' ) return 0xa3; //This mode is obsolete
+ return c;
}
/*
diff --git a/lib/qtermwidget/qtermwidget.cpp b/lib/qtermwidget/qtermwidget.cpp
index 814ca248..7461db58 100644
--- a/lib/qtermwidget/qtermwidget.cpp
+++ b/lib/qtermwidget/qtermwidget.cpp
@@ -1,19 +1,20 @@
-/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+/*
+ Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
#include
#include
@@ -43,8 +44,7 @@
#define STEP_ZOOM 3
QTermWidget::QTermWidget(QWidget *messageParentWidget, QWidget *parent)
- : QWidget(parent)
-{
+ : QWidget(parent) {
m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(0, 0, 0, 0);
setLayout(m_layout);
@@ -163,8 +163,7 @@ QTermWidget::QTermWidget(QWidget *messageParentWidget, QWidget *parent)
});
}
-QTermWidget::~QTermWidget()
-{
+QTermWidget::~QTermWidget() {
setUrlFilterEnabled(false);
clearHighLightTexts();
delete m_urlFilter;
@@ -173,22 +172,19 @@ QTermWidget::~QTermWidget()
delete m_emulation;
}
-void QTermWidget::selectionChanged(bool textSelected)
-{
+void QTermWidget::selectionChanged(bool textSelected) {
emit copyAvailable(textSelected);
}
-void QTermWidget::search(bool forwards, bool next)
-{
+void QTermWidget::search(bool forwards, bool next) {
int startColumn, startLine;
- if (next) // search from just after current selection
- {
+ if (next) {
+ // search from just after current selection
m_terminalDisplay->screenWindow()->screen()->getSelectionEnd(startColumn, startLine);
startColumn++;
- }
- else // search from start of current selection
- {
+ } else {
+ // search from start of current selection
m_terminalDisplay->screenWindow()->screen()->getSelectionStart(startColumn, startLine);
}
@@ -221,93 +217,74 @@ void QTermWidget::search(bool forwards, bool next)
historySearch->search();
}
-QSize QTermWidget::sizeHint() const
-{
+QSize QTermWidget::sizeHint() const {
QSize size = m_terminalDisplay->sizeHint();
size.rheight() = 150;
return size;
}
-void QTermWidget::setTerminalSizeHint(bool enabled)
-{
+void QTermWidget::setTerminalSizeHint(bool enabled) {
m_terminalDisplay->setTerminalSizeHint(enabled);
}
-bool QTermWidget::terminalSizeHint()
-{
+bool QTermWidget::terminalSizeHint() {
return m_terminalDisplay->terminalSizeHint();
}
-void QTermWidget::setTerminalFont(const QFont &font)
-{
+void QTermWidget::setTerminalFont(const QFont &font) {
m_terminalDisplay->setVTFont(font);
}
-QFont QTermWidget::getTerminalFont()
-{
+QFont QTermWidget::getTerminalFont() {
return m_terminalDisplay->getVTFont();
}
-void QTermWidget::setTerminalOpacity(qreal level)
-{
+void QTermWidget::setTerminalOpacity(qreal level) {
m_terminalDisplay->setOpacity(level);
}
-void QTermWidget::setTerminalBackgroundImage(const QString& backgroundImage)
-{
+void QTermWidget::setTerminalBackgroundImage(const QString& backgroundImage) {
m_terminalDisplay->setBackgroundImage(backgroundImage);
}
-void QTermWidget::setTerminalBackgroundMovie(const QString& backgroundMovie)
-{
+void QTermWidget::setTerminalBackgroundMovie(const QString& backgroundMovie) {
m_terminalDisplay->setBackgroundMovie(backgroundMovie);
}
-void QTermWidget::setTerminalBackgroundVideo(const QString& backgroundVideo)
-{
+void QTermWidget::setTerminalBackgroundVideo(const QString& backgroundVideo) {
m_terminalDisplay->setBackgroundVideo(backgroundVideo);
}
-void QTermWidget::setTerminalBackgroundMode(int mode)
-{
+void QTermWidget::setTerminalBackgroundMode(int mode) {
m_terminalDisplay->setBackgroundMode((BackgroundMode)mode);
}
-void QTermWidget::setTextCodec(QStringEncoder codec)
-{
+void QTermWidget::setTextCodec(QStringEncoder codec) {
m_emulation->setCodec(std::move(codec));
}
-void QTermWidget::setColorScheme(const QString& origName)
-{
+void QTermWidget::setColorScheme(const QString& origName) {
const ColorScheme *cs = nullptr;
const bool isFile = QFile::exists(origName);
- const QString& name = isFile ?
- QFileInfo(origName).baseName() :
- origName;
+ const QString& name = isFile ? QFileInfo(origName).baseName() : origName;
// avoid legacy (int) solution
- if (!availableColorSchemes().contains(name))
- {
- if (isFile)
- {
+ if (!availableColorSchemes().contains(name)) {
+ if (isFile) {
if (ColorSchemeManager::instance()->loadCustomColorScheme(origName))
cs = ColorSchemeManager::instance()->findColorScheme(name);
else
- qWarning () << Q_FUNC_INFO
- << "cannot load color scheme from"
- << origName;
+ qWarning () << Q_FUNC_INFO << "cannot load color scheme from" << origName;
}
if (!cs)
cs = ColorSchemeManager::instance()->defaultColorScheme();
- }
- else
+ } else {
cs = ColorSchemeManager::instance()->findColorScheme(name);
+ }
- if (! cs)
- {
+ if (! cs) {
QMessageBox::information(messageParentWidget,
tr("Color Scheme Error"),
tr("Cannot load color scheme: %1").arg(name));
@@ -319,13 +296,11 @@ void QTermWidget::setColorScheme(const QString& origName)
m_hasDarkBackground = cs->hasDarkBackground();
}
-QStringList QTermWidget::getAvailableColorSchemes()
-{
+QStringList QTermWidget::getAvailableColorSchemes() {
return QTermWidget::availableColorSchemes();
}
-QStringList QTermWidget::availableColorSchemes()
-{
+QStringList QTermWidget::availableColorSchemes() {
QStringList ret;
const auto allColorSchemes = ColorSchemeManager::instance()->allColorSchemes();
for (const ColorScheme* cs : allColorSchemes)
@@ -333,38 +308,31 @@ QStringList QTermWidget::availableColorSchemes()
return ret;
}
-void QTermWidget::addCustomColorSchemeDir(const QString& custom_dir)
-{
+void QTermWidget::addCustomColorSchemeDir(const QString& custom_dir) {
ColorSchemeManager::instance()->addCustomColorSchemeDir(custom_dir);
}
-void QTermWidget::setBackgroundColor(const QColor &color)
-{
+void QTermWidget::setBackgroundColor(const QColor &color) {
m_terminalDisplay->setBackgroundColor(color);
}
-void QTermWidget::setForegroundColor(const QColor &color)
-{
+void QTermWidget::setForegroundColor(const QColor &color) {
m_terminalDisplay->setForegroundColor(color);
}
-void QTermWidget::setANSIColor(const int ansiColorId, const QColor &color)
-{
+void QTermWidget::setANSIColor(const int ansiColorId, const QColor &color) {
m_terminalDisplay->setColorTableColor(ansiColorId, color);
}
-void QTermWidget::setPreeditColorIndex(int index)
-{
+void QTermWidget::setPreeditColorIndex(int index) {
m_terminalDisplay->setPreeditColorIndex(index);
}
-void QTermWidget::setSize(const QSize &size)
-{
+void QTermWidget::setSize(const QSize &size) {
m_terminalDisplay->setSize(size.width(), size.height());
}
-void QTermWidget::setHistorySize(int lines)
-{
+void QTermWidget::setHistorySize(int lines) {
if (lines < 0)
m_emulation->setHistory(HistoryTypeFile());
else if (lines == 0)
@@ -373,8 +341,7 @@ void QTermWidget::setHistorySize(int lines)
m_emulation->setHistory(HistoryTypeBuffer(lines));
}
-int QTermWidget::historySize() const
-{
+int QTermWidget::historySize() const {
const HistoryType& currentHistory = m_emulation->history();
if (currentHistory.isEnabled()) {
@@ -388,39 +355,32 @@ int QTermWidget::historySize() const
}
}
-void QTermWidget::setScrollBarPosition(ScrollBarPosition pos)
-{
+void QTermWidget::setScrollBarPosition(ScrollBarPosition pos) {
m_terminalDisplay->setScrollBarPosition(pos);
}
-void QTermWidget::scrollToEnd()
-{
+void QTermWidget::scrollToEnd() {
m_terminalDisplay->scrollToEnd();
}
-void QTermWidget::sendText(const QString &text)
-{
+void QTermWidget::sendText(const QString &text) {
m_emulation->sendText(text);
}
-void QTermWidget::sendKeyEvent(QKeyEvent *e)
-{
+void QTermWidget::sendKeyEvent(QKeyEvent *e) {
m_emulation->sendKeyEvent(e, false);
}
-void QTermWidget::resizeEvent(QResizeEvent*)
-{
+void QTermWidget::resizeEvent(QResizeEvent*) {
//qDebug("global window resizing...with %d %d", this->size().width(), this->size().height());
m_terminalDisplay->resize(this->size());
}
-void QTermWidget::sessionFinished()
-{
+void QTermWidget::sessionFinished() {
emit finished();
}
-void QTermWidget::updateTerminalSize()
-{
+void QTermWidget::updateTerminalSize() {
int minLines = -1;
int minColumns = -1;
@@ -444,8 +404,7 @@ void QTermWidget::updateTerminalSize()
}
}
-void QTermWidget::monitorTimerDone()
-{
+void QTermWidget::monitorTimerDone() {
//FIXME: The idea here is that the notification popup will appear to tell the user than output from
//the terminal has stopped and the popup will disappear when the user activates the session.
//
@@ -464,8 +423,7 @@ void QTermWidget::monitorTimerDone()
m_notifiedActivity=false;
}
-void QTermWidget::activityStateSet(int state)
-{
+void QTermWidget::activityStateSet(int state) {
if (state==NOTIFYBELL) {
m_terminalDisplay->bell("Bell in QTermWidget!");
} else if (state==NOTIFYACTIVITY) {
@@ -492,16 +450,14 @@ void QTermWidget::activityStateSet(int state)
emit stateChanged(state);
}
-void QTermWidget::setMonitorActivity(bool enabled)
-{
+void QTermWidget::setMonitorActivity(bool enabled) {
m_monitorActivity=enabled;
m_notifiedActivity=false;
activityStateSet(NOTIFYNORMAL);
}
-void QTermWidget::setMonitorSilence(bool enabled)
-{
+void QTermWidget::setMonitorSilence(bool enabled) {
if (m_monitorSilence==enabled) {
return;
}
@@ -516,56 +472,46 @@ void QTermWidget::setMonitorSilence(bool enabled)
activityStateSet(NOTIFYNORMAL);
}
-void QTermWidget::setSilenceTimeout(int seconds)
-{
+void QTermWidget::setSilenceTimeout(int seconds) {
m_silenceSeconds=seconds;
if (m_monitorSilence) {
m_monitorTimer->start(m_silenceSeconds*1000);
}
}
-void QTermWidget::bracketText(QString& text)
-{
+void QTermWidget::bracketText(QString& text) {
m_terminalDisplay->bracketText(text);
}
-void QTermWidget::disableBracketedPasteMode(bool disable)
-{
+void QTermWidget::disableBracketedPasteMode(bool disable) {
m_terminalDisplay->disableBracketedPasteMode(disable);
}
-bool QTermWidget::bracketedPasteModeIsDisabled() const
-{
+bool QTermWidget::bracketedPasteModeIsDisabled() const {
return m_terminalDisplay->bracketedPasteModeIsDisabled();
}
-void QTermWidget::copyClipboard()
-{
+void QTermWidget::copyClipboard() {
m_terminalDisplay->copyClipboard(QClipboard::Clipboard);
}
-void QTermWidget::copySelection()
-{
+void QTermWidget::copySelection() {
m_terminalDisplay->copyClipboard(QClipboard::Selection);
}
-void QTermWidget::pasteClipboard()
-{
+void QTermWidget::pasteClipboard() {
m_terminalDisplay->pasteClipboard();
}
-void QTermWidget::pasteSelection()
-{
+void QTermWidget::pasteSelection() {
m_terminalDisplay->pasteSelection();
}
-void QTermWidget::selectAll()
-{
+void QTermWidget::selectAll() {
m_terminalDisplay->selectAll();
}
-int QTermWidget::setZoom(int step)
-{
+int QTermWidget::setZoom(int step) {
QFont font = m_terminalDisplay->getVTFont();
font.setPointSize(font.pointSize() + step);
@@ -573,34 +519,28 @@ int QTermWidget::setZoom(int step)
return font.pointSize();
}
-int QTermWidget::zoomIn()
-{
+int QTermWidget::zoomIn() {
return setZoom(STEP_ZOOM);
}
-int QTermWidget::zoomOut()
-{
+int QTermWidget::zoomOut() {
return setZoom(-STEP_ZOOM);
}
-void QTermWidget::setKeyBindings(const QString & kb)
-{
+void QTermWidget::setKeyBindings(const QString & kb) {
m_emulation->setKeyBindings(kb);
}
-void QTermWidget::clear()
-{
+void QTermWidget::clear() {
clearScreen();
clearScrollback();
}
-void QTermWidget::clearScrollback()
-{
+void QTermWidget::clearScrollback() {
m_emulation->clearHistory();
}
-void QTermWidget::clearScreen()
-{
+void QTermWidget::clearScreen() {
m_emulation->reset();
/**
* TODO:
@@ -610,8 +550,7 @@ void QTermWidget::clearScreen()
*/
}
-void QTermWidget::setFlowControlEnabled(bool enabled)
-{
+void QTermWidget::setFlowControlEnabled(bool enabled) {
if (m_flowControl == enabled) {
return;
}
@@ -621,31 +560,26 @@ void QTermWidget::setFlowControlEnabled(bool enabled)
emit flowControlEnabledChanged(enabled);
}
-bool QTermWidget::flowControlEnabled(void)
-{
+bool QTermWidget::flowControlEnabled(void) {
return m_flowControl;
}
-void QTermWidget::setFlowControlWarningEnabled(bool enabled)
-{
+void QTermWidget::setFlowControlWarningEnabled(bool enabled) {
if (flowControlEnabled()) {
// Do not show warning label if flow control is disabled
m_terminalDisplay->setFlowControlWarningEnabled(enabled);
}
}
-QStringList QTermWidget::availableKeyBindings()
-{
+QStringList QTermWidget::availableKeyBindings() {
return KeyboardTranslatorManager::instance()->allTranslators();
}
-QString QTermWidget::keyBindings()
-{
+QString QTermWidget::keyBindings() {
return m_emulation->keyBindings();
}
-void QTermWidget::toggleShowSearchBar()
-{
+void QTermWidget::toggleShowSearchBar() {
if(m_searchBar->isHidden()) {
m_searchBar->setText(selectedText(true));
m_searchBar->show();
@@ -654,118 +588,96 @@ void QTermWidget::toggleShowSearchBar()
}
}
-void QTermWidget::setMotionAfterPasting(int action)
-{
+void QTermWidget::setMotionAfterPasting(int action) {
m_terminalDisplay->setMotionAfterPasting((MotionAfterPasting) action);
}
-int QTermWidget::historyLinesCount()
-{
+int QTermWidget::historyLinesCount() {
return m_terminalDisplay->screenWindow()->screen()->getHistLines();
}
-int QTermWidget::screenColumnsCount()
-{
+int QTermWidget::screenColumnsCount() {
return m_terminalDisplay->screenWindow()->screen()->getColumns();
}
-int QTermWidget::screenLinesCount()
-{
+int QTermWidget::screenLinesCount() {
return m_terminalDisplay->screenWindow()->screen()->getLines();
}
-void QTermWidget::setSelectionStart(int row, int column)
-{
+void QTermWidget::setSelectionStart(int row, int column) {
m_terminalDisplay->screenWindow()->screen()->setSelectionStart(column, row, true);
}
-void QTermWidget::setSelectionEnd(int row, int column)
-{
+void QTermWidget::setSelectionEnd(int row, int column) {
m_terminalDisplay->screenWindow()->screen()->setSelectionEnd(column, row);
}
-void QTermWidget::getSelectionStart(int& row, int& column)
-{
+void QTermWidget::getSelectionStart(int& row, int& column) {
m_terminalDisplay->screenWindow()->screen()->getSelectionStart(column, row);
}
-void QTermWidget::getSelectionEnd(int& row, int& column)
-{
+void QTermWidget::getSelectionEnd(int& row, int& column) {
m_terminalDisplay->screenWindow()->screen()->getSelectionEnd(column, row);
}
-QString QTermWidget::selectedText(bool preserveLineBreaks)
-{
+QString QTermWidget::selectedText(bool preserveLineBreaks) {
return m_terminalDisplay->screenWindow()->screen()->selectedText(preserveLineBreaks);
}
-Filter::HotSpot* QTermWidget::getHotSpotAt(const QPoint &pos) const
-{
+Filter::HotSpot* QTermWidget::getHotSpotAt(const QPoint &pos) const {
int row = 0, column = 0;
m_terminalDisplay->getCharacterPosition(pos, row, column);
return getHotSpotAt(row, column);
}
-Filter::HotSpot* QTermWidget::getHotSpotAt(int row, int column) const
-{
+Filter::HotSpot* QTermWidget::getHotSpotAt(int row, int column) const {
return m_terminalDisplay->filterChain()->hotSpotAt(row, column);
}
-QList QTermWidget::filterActions(const QPoint& position)
-{
+QList QTermWidget::filterActions(const QPoint& position) {
return m_terminalDisplay->filterActions(position);
}
-int QTermWidget::recvData(const char *buff, int len) const
-{
+int QTermWidget::recvData(const char *buff, int len) const {
m_emulation->receiveData( buff, len );
return len;
}
-void QTermWidget::setKeyboardCursorShape(KeyboardCursorShape shape)
-{
+void QTermWidget::setKeyboardCursorShape(KeyboardCursorShape shape) {
m_terminalDisplay->setKeyboardCursorShape(shape);
}
-void QTermWidget::setKeyboardCursorShape(uint32_t shape)
-{
+void QTermWidget::setKeyboardCursorShape(uint32_t shape) {
m_terminalDisplay->setKeyboardCursorShape((KeyboardCursorShape)shape);
}
-void QTermWidget::setBlinkingCursor(bool blink)
-{
+void QTermWidget::setBlinkingCursor(bool blink) {
m_terminalDisplay->setBlinkingCursor(blink);
}
-void QTermWidget::setBidiEnabled(bool enabled)
-{
+void QTermWidget::setBidiEnabled(bool enabled) {
m_terminalDisplay->setBidiEnabled(enabled);
}
-bool QTermWidget::isBidiEnabled()
-{
+bool QTermWidget::isBidiEnabled() {
return m_terminalDisplay->isBidiEnabled();
}
-void QTermWidget::cursorChanged(Emulation::KeyboardCursorShape cursorShape, bool blinkingCursorEnabled)
-{
+void QTermWidget::cursorChanged(Emulation::KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) {
// TODO: A switch to enable/disable DECSCUSR?
setKeyboardCursorShape(cursorShape);
setBlinkingCursor(blinkingCursorEnabled);
}
-void QTermWidget::setMargin(int margin)
-{
+void QTermWidget::setMargin(int margin) {
m_terminalDisplay->setMargin(margin);
}
-int QTermWidget::getMargin() const
-{
+int QTermWidget::getMargin() const {
return m_terminalDisplay->margin();
}
-void QTermWidget::saveHistory(QTextStream *stream, int format, int start, int end)
-{
+void QTermWidget::saveHistory(QTextStream *stream, int format, int start, int end) {
TerminalCharacterDecoder *decoder;
if(format == 0) {
decoder = new PlainTextDecoder;
@@ -783,26 +695,22 @@ void QTermWidget::saveHistory(QTextStream *stream, int format, int start, int en
delete decoder;
}
-void QTermWidget::saveHistory(QIODevice *device, int format, int start, int end)
-{
+void QTermWidget::saveHistory(QIODevice *device, int format, int start, int end) {
QTextStream stream(device);
saveHistory(&stream, format, start, end);
}
-void QTermWidget::screenShot(QPixmap *pixmap)
-{
+void QTermWidget::screenShot(QPixmap *pixmap) {
QPixmap currPixmap(m_terminalDisplay->size());
m_terminalDisplay->render(&currPixmap);
*pixmap = currPixmap.scaled(pixmap->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
-void QTermWidget::repaintDisplay(void)
-{
+void QTermWidget::repaintDisplay(void) {
m_terminalDisplay->repaintDisplay();
}
-void QTermWidget::screenShot(const QString &fileName)
-{
+void QTermWidget::screenShot(const QString &fileName) {
qreal deviceratio = m_terminalDisplay->devicePixelRatio();
deviceratio = deviceratio*2;
QPixmap pixmap(m_terminalDisplay->size() * deviceratio);
@@ -811,19 +719,16 @@ void QTermWidget::screenShot(const QString &fileName)
pixmap.save(fileName);
}
-void QTermWidget::setLocked(bool enabled)
-{
+void QTermWidget::setLocked(bool enabled) {
this->setEnabled(!enabled);
m_terminalDisplay->setLocked(enabled);
}
-void QTermWidget::setDrawLineChars(bool drawLineChars)
-{
+void QTermWidget::setDrawLineChars(bool drawLineChars) {
m_terminalDisplay->setDrawLineChars(drawLineChars);
}
-void QTermWidget::setBoldIntense(bool boldIntense)
-{
+void QTermWidget::setBoldIntense(bool boldIntense) {
m_terminalDisplay->setBoldIntense(boldIntense);
}
@@ -843,8 +748,7 @@ void QTermWidget::setKeyboardCursorColor(bool useForegroundColor, const QColor&
m_terminalDisplay->setKeyboardCursorColor(useForegroundColor, color);
}
-void QTermWidget::addHighLightText(const QString &text, const QColor &color)
-{
+void QTermWidget::addHighLightText(const QString &text, const QColor &color) {
for (int i = 0; i < m_highLightTexts.size(); i++) {
if (m_highLightTexts.at(i)->text == text) {
return;
@@ -857,8 +761,7 @@ void QTermWidget::addHighLightText(const QString &text, const QColor &color)
m_terminalDisplay->repaint();
}
-QMap QTermWidget::getHighLightTexts(void)
-{
+QMap QTermWidget::getHighLightTexts(void) {
QMap highLightTexts;
for (int i = 0; i < m_highLightTexts.size(); i++) {
highLightTexts.insert(m_highLightTexts.at(i)->text, m_highLightTexts.at(i)->color);
@@ -866,8 +769,7 @@ QMap