diff --git a/CMakeLists.txt b/CMakeLists.txt index 74b5203..8138231 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,144 +1,113 @@ project(kinfocenter) set(PROJECT_VERSION "5.18.80") cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(QT_MIN_VERSION "5.12.0") set(KF5_MIN_VERSION "5.66.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(FeatureSummary) include(KDEClangFormat) include(ECMQMLModules) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Completion Config ConfigWidgets CoreAddons Crash DBusAddons DocTools I18n IconThemes KCMUtils KIO Service Solid WidgetsAddons WindowSystem XmlGui Declarative Package Solid ) if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL") find_package(OpenGL) set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries" URL "https://www.opengl.org" TYPE OPTIONAL ) else() find_package(OpenGLES) set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries" URL "https://www.khronos.org/opengles" TYPE OPTIONAL ) endif() find_package(EGL) set_package_properties(EGL PROPERTIES TYPE OPTIONAL PURPOSE "Required for OpenGL Information Module" ) find_package(KF5Wayland CONFIG) set_package_properties(KF5Wayland PROPERTIES TYPE OPTIONAL ) add_feature_info("KF5Wayland" KF5Wayland_FOUND "Required for Wayland Compositor Information Module") if(NOT APPLE) find_package(X11) set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" URL "https://www.x.org" TYPE OPTIONAL PURPOSE "Required for building the X11 based workspace" ) if(X11_FOUND) set(HAVE_X11 TRUE) endif() else() set(X11_FOUND False) endif() ecm_find_qmlmodule(org.kde.kirigami 2.5) -configure_file(config-project-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-project-version.h) -configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS) add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_USE_QSTRINGBUILDER) add_subdirectory( Categories ) add_subdirectory( kcontrol/menus ) add_subdirectory( Modules ) include(ECMOptionalAddSubdirectory) ecm_optional_add_subdirectory( doc ) -include_directories( ToolTips ) - -set( kinfocenter_SRCS -infocenter.cpp -main.cpp -sidepanel.cpp -kcmcontainer.cpp -kcmtreeitem.cpp -kcmcategoryitem.cpp -infokcmmodel.cpp -infokcmproxymodel.cpp -ToolTips/tooltipmanager.cpp -) - -add_executable( kinfocenter ${kinfocenter_SRCS} ) -target_compile_definitions(kinfocenter PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") - -target_link_libraries( kinfocenter - KF5::Completion - KF5::ConfigWidgets - KF5::CoreAddons - KF5::Crash - KF5::DBusAddons - KF5::I18n - KF5::IconThemes - KF5::KCMUtils - KF5::Service - KF5::Solid - KF5::WidgetsAddons - KF5::WindowSystem - KF5::XmlGui -) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) ##install -install( TARGETS kinfocenter ${INSTALL_TARGETS_DEFAULT_ARGS} ) install( FILES org.kde.kinfocenter.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) install( PROGRAMS org.kde.kinfocenter.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES kinfocenterui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kinfocenter ) + +ADD_CUSTOM_TARGET(kinfocenter_link ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink ${KDE_INSTALL_FULL_BINDIR}/systemsettings5 ${CMAKE_CURRENT_BINARY_DIR}/kinfocenter) + +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kinfocenter DESTINATION ${KDE_INSTALL_FULL_BINDIR}/ ) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/Categories/CMakeLists.txt b/Categories/CMakeLists.txt index 4641094..d7d163e 100644 --- a/Categories/CMakeLists.txt +++ b/Categories/CMakeLists.txt @@ -1,5 +1,5 @@ install( FILES kinfocentercategory.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -install( FILES deviceinfocategory.desktop graphicalinfocategory.desktop networkinfocategory.desktop lostfoundcategory.desktop +install( FILES deviceinfocategory.desktop graphicalinfocategory.desktop networkinfocategory.desktop lostfoundcategory.desktop basicinformation.desktop detailedinformation.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/Categories/basicinformation.desktop b/Categories/basicinformation.desktop new file mode 100644 index 0000000..c7dc390 --- /dev/null +++ b/Categories/basicinformation.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +X-KDE-ServiceTypes=KInfoCenterCategory +X-KDE-KInfoCenter-Category=basic_information +Icon=dialog-information + +Name=Basic Information diff --git a/Categories/detailedinformation.desktop b/Categories/detailedinformation.desktop new file mode 100644 index 0000000..70687ea --- /dev/null +++ b/Categories/detailedinformation.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +X-KDE-ServiceTypes=KInfoCenterCategory +X-KDE-KInfoCenter-Category=detailed_information +Icon=dialog-information + +Name=Detailed Information diff --git a/Categories/deviceinfocategory.desktop b/Categories/deviceinfocategory.desktop index 6ebc9c7..be30f2d 100644 --- a/Categories/deviceinfocategory.desktop +++ b/Categories/deviceinfocategory.desktop @@ -1,82 +1,83 @@ [Desktop Entry] Type=Service X-KDE-ServiceTypes=KInfoCenterCategory X-KDE-KInfoCenter-Category=device_information +X-KDE-KInfoCenter-Parent-Category=detailed_information Icon=hwinfo -Name=Device Information +Name=Devices Name[ar]=معلومات الأجهزة Name[be@latin]=Źviestki z pryłady Name[bg]=Данни за устройства Name[bn]=ডিভাইস তথ্য Name[bn_IN]=ডিভাইস সংক্রান্ত তথ্য Name[bs]=Podaci o uređajima Name[ca]=Informació dels dispositius Name[ca@valencia]=Informació dels dispositius Name[cs]=Informace o zařízení Name[csb]=Wëdowiédzô ò ùrządzeniach Name[da]=Enhedsinformation Name[de]=Geräteinformationen Name[el]=Πληροφορίες συσκευής Name[en_GB]=Device Information Name[eo]=Aparataj Informoj Name[es]=Información sobre dispositivos Name[et]=Seadmete teave Name[eu]=Gailuari buruzko informazioa Name[fi]=Laitetiedot Name[fr]=Informations sur les périphériques Name[fy]=Apparaatynformaasje Name[ga]=Eolas faoi Ghléas Name[gl]=Información do dispositivo Name[gu]=ઉપકરણ માહિતી Name[he]=מידע על התקנים Name[hi]=उपकरण जानकारी Name[hne]=उपकरन जानकारी Name[hr]=Podaci o uređaju Name[hu]=Eszközjellemzők Name[ia]=Information de dispositivo Name[id]=Informasi Perangkat Name[is]=Upplýsingar tækis Name[it]=Informazioni sui dispositivi Name[ja]=デバイス情報 Name[kk]=Құрылғы мәліметі Name[km]=ព័ត៌មាន​ឧបករណ៍ Name[kn]=ಸಾಧನದ ಮಾಹಿತಿ Name[ko]=장치 정보 Name[ku]=Agahiya Cîhazê Name[lt]=Informacija apie įrenginius Name[lv]=Ierīču informācija Name[mai]=डिवायस सूचना Name[mk]=Информации за уреди Name[ml]=ഉപകരണ വിവരം Name[mr]=साधन माहिती Name[nb]=Enhetsinformasjon Name[nds]=Reedschap-Informatschonen Name[nl]=Apparaatinformatie Name[nn]=Einingsinformasjon Name[or]=ଯନ୍ତ୍ର ସୂଚନା Name[pa]=ਜੰਤਰ ਜਾਣਕਾਰੀ Name[pl]=Dane o urządzeniach Name[pt]=Informação dos Dispositivos Name[pt_BR]=Informações do dispositivo Name[ro]=Informații dispozitiv Name[ru]=Сведения об устройствах Name[si]=මෙවලම් තොරතුරු Name[sk]=Informácie o zariadení Name[sl]=Podatki o napravah Name[sr]=подаци о уређајима Name[sr@ijekavian]=подаци о уређајима Name[sr@ijekavianlatin]=podaci o uređajima Name[sr@latin]=podaci o uređajima Name[sv]=Enhetsinformation Name[ta]=Device Information Name[tg]=Иттилоот дар бораи дастгоҳ Name[th]=รายละเอียดอุปกรณ์ Name[tr]=Aygıt Bilgileri Name[ug]=ئۈسكۈنە ئۇچۇرى Name[uk]=Інформація про пристрої Name[vi]=Thông tin thiết bị Name[wa]=Informåcions so l' éndjin Name[x-test]=xxDevice Informationxx Name[zh_CN]=设备信息 Name[zh_TW]=裝置資訊 diff --git a/Categories/graphicalinfocategory.desktop b/Categories/graphicalinfocategory.desktop index 23e42a9..25312a4 100644 --- a/Categories/graphicalinfocategory.desktop +++ b/Categories/graphicalinfocategory.desktop @@ -1,66 +1,67 @@ [Desktop Entry] Type=Service X-KDE-ServiceTypes=KInfoCenterCategory X-KDE-KInfoCenter-Category=graphical_information +X-KDE-KInfoCenter-Parent-Category=detailed_information Icon=applications-graphics -Name=Graphical Information +Name=Graphics Name[ar]=المعلومات الرّسوميّة Name[bg]=Данни за графичната система Name[bs]=Podaci o grafici Name[ca]=Informació gràfica Name[ca@valencia]=Informació gràfica Name[cs]=Informace o grafice Name[da]=Grafikinformation Name[de]=Grafische Informationen Name[el]=Πληροφορίες γραφικών Name[en_GB]=Graphical Information Name[es]=Información sobre gráficos Name[et]=Monitoriteave Name[eu]=Informazio grafikoa Name[fi]=Grafiikkatiedot Name[fr]=Informations graphiques Name[ga]=Faisnéis Ghrafach Name[gl]=Información gráfica Name[he]=מידע גרפי Name[hi]=ग्राफिक जानकारी Name[hr]=Grafičke informacije Name[hu]=Grafikai jellemzők Name[ia]=Information graphic Name[id]=Informasi Grafis Name[is]=Myndrænar upplýsingar Name[it]=Informazioni grafiche Name[ja]=グラフィック情報 Name[kk]=Графикалық мәлімет Name[km]=ព័ត៌មាន​ប្រជាសាស្ត្រ Name[kn]=ಚಿತ್ರಾತ್ಮಕ ಮಾಹಿತಿ Name[ko]=그래픽 정보 Name[lt]=Grafikos informacija Name[lv]=Grafiskā informācija Name[mr]=ग्राफिकल माहिती Name[nb]=Grafisk informasjon Name[nds]=Graafsche Informatschonen Name[nl]=Grafische informatie Name[nn]=Grafisk informasjon Name[pa]=ਗਰਾਫਿਕਲ ਜਾਣਕਾਰੀ Name[pl]=Dane o grafice Name[pt]=Informação Gráfica Name[pt_BR]=Informações gráficas Name[ro]=Informații despre grafică Name[ru]=Сведения о графике Name[sk]=Informácie o grafike Name[sl]=Podatki o grafiki Name[sr]=Подаци о графици Name[sr@ijekavian]=Подаци о графици Name[sr@ijekavianlatin]=Podaci o grafici Name[sr@latin]=Podaci o grafici Name[sv]=Grafisk information Name[th]=ข้อมูลรายละเอียดแบบกราฟิก Name[tr]=Grafiksel Bilgiler Name[ug]=گرافىك ئۇچۇرى Name[uk]=Графічна інформація Name[vi]=Thông tin đồ hoạ Name[wa]=Informåcions grafikes Name[x-test]=xxGraphical Informationxx Name[zh_CN]=图形信息 Name[zh_TW]=圖形資訊 diff --git a/Categories/kinfocentercategory.desktop b/Categories/kinfocentercategory.desktop index 66554e4..8293df1 100644 --- a/Categories/kinfocentercategory.desktop +++ b/Categories/kinfocentercategory.desktop @@ -1,68 +1,69 @@ [Desktop Entry] Type=ServiceType X-KDE-ServiceType=KInfoCenterCategory Name=KInfoCenter Category Name[ar]=فئة «مركز معلوماتك» Name[bg]=Категория в информационния център Name[bs]=Kategorija K‑infocentra Name[ca]=Categoria del KInfoCenter Name[ca@valencia]=Categoria de KInfoCenter Name[cs]=Kategorie KInfoCenter Name[da]=KInfoCenter-kategori Name[de]=Infozentrum-Kategorie Name[el]=Κατηγορία κέντρου πληροφοριών Name[en_GB]=KInfoCentre Category Name[es]=Categoría de KInfoCenter Name[et]=KDE infokeskuse kategooria Name[eu]=KInfoCenter kategoria Name[fi]=KInfoCenter-luokka Name[fr]=Catégorie de KInfoCenter Name[ga]=Catagóir KInfoCenter Name[gl]=Categoría de KInfoCenter Name[he]=קטגוריית KInfoCenter Name[hi]=के-इन्फ़ोसेंटर वर्ग Name[hr]=Kategorija KInfoCentera Name[hu]=KInfoCenter kategória Name[ia]=Categoria de KInfoCenter Name[id]=Kategori KInfoCenter Name[is]=Flokkur í KInfoCenter Name[it]=Categoria del centro d'informazione Name[ja]=KInfoCenter カテゴリ Name[kk]=KInfoCenter санаты Name[km]=ប្រភេទ KInfoCenter Name[kn]=KInfoCenter ಪಂಗಡ Name[ko]=KInfoCenter 분류 Name[lt]=KInfoCenter kategorija Name[lv]=KInfoCenter kategorija Name[mr]=केइन्फोसेंटर विभाग Name[nb]=KInfoCenter-kategori Name[nds]=KDE-Infozentrum-Kategorie Name[nl]=Categorie KInfoCenter Name[nn]=KInfoCenter-kategori Name[pa]=ਕੇ-ਜਾਣਕਾਰੀ ਸੈਂਟਰ ਕੈਟਾਗਰੀ Name[pl]=Kategoria ośrodka informacji Name[pt]=Categoria do KInfoCenter Name[pt_BR]=Categoria do KInfoCenter Name[ro]=Categorie Centru de informații KDE Name[ru]=Категория «Информации о системе» Name[sk]=KInfoCenter kategória Name[sl]=Kategorija v KInfoCenter Name[sr]=Категорија К‑инфоцентра Name[sr@ijekavian]=Категорија К‑инфоцентра Name[sr@ijekavianlatin]=Kategorija K‑infocentra Name[sr@latin]=Kategorija K‑infocentra Name[sv]=Kategori i informationscentralen Name[th]=หมวดศูนย์ข้อมูล-K Name[tr]=KDE Bilgi Merkezi Kategorisi Name[ug]=KInfoCenter كاتېگورىيە Name[uk]=Категорія KInfoCenter Name[vi]=Thể loại trong KInfoCenter Name[wa]=Categoreye do Cinte d' informåcions K Name[x-test]=xxKInfoCenter Categoryxx Name[zh_CN]=KInfoCenter 分类 Name[zh_TW]=KInfoCenter 類別 # Cat Ident [PropertyDef::X-KDE-KInfoCenter-Category] Type=QString - +[PropertyDef::X-KDE-KInfoCenter-Parent-Category] +Type=QString diff --git a/Categories/networkinfocategory.desktop b/Categories/networkinfocategory.desktop index 9c156e0..6efca50 100644 --- a/Categories/networkinfocategory.desktop +++ b/Categories/networkinfocategory.desktop @@ -1,67 +1,68 @@ [Desktop Entry] Type=Service X-KDE-ServiceTypes=KInfoCenterCategory X-KDE-KInfoCenter-Category=network_information +X-KDE-KInfoCenter-Parent-Category=detailed_information Icon=preferences-system-network -Name=Network Information +Name=Network Name[ar]=معلومات الشّبكة Name[bg]=Мрежови данни Name[bs]=Podaci o mreži Name[ca]=Informació de la xarxa Name[ca@valencia]=Informació de la xarxa Name[cs]=Informace o síti Name[da]=Netværksinformation Name[de]=Netzwerkinformationen Name[el]=Πληροφορίες δικτύου Name[en_GB]=Network Information Name[es]=Información sobre la red Name[et]=Võrguteave Name[eu]=Sareko informazioa Name[fi]=Verkkotiedot Name[fr]=Informations sur le réseau Name[ga]=Faisnéis Líonra Name[gl]=Información da rede Name[he]=מידע על הרשת Name[hi]=नेटवर्क जानकारी Name[hr]=Mrežne informacije Name[hu]=Hálózati információk Name[ia]=Information de rete Name[id]=Informasi Jaringan Name[is]=Netupplýsingar Name[it]=Informazioni sulla rete Name[ja]=ネットワーク情報 Name[kk]=Желі мәліметі Name[km]=ព័ត៌មាន​​បណ្ដាញ Name[kn]=ಜಾಲಬಂಧ ಮಾಹಿತಿ Name[ko]=네트워크 정보 Name[lt]=Informacija apie tinklą Name[lv]=Tīkla informācija Name[mr]=संजाळ माहिती Name[nb]=Nettverksinformasjon Name[nds]=Nettwark-Informatschonen Name[nl]=Netwerkinformatie Name[nn]=Nettverksinformasjon Name[pa]=ਨੈੱਟਵਰਕ ਜਾਣਕਾਰੀ Name[pl]=Dane o sieci Name[pt]=Informação da Rede Name[pt_BR]=Informações da rede Name[ro]=Informații despre rețea Name[ru]=Сведения о сети Name[sk]=Informácie o sieti Name[sl]=Podatki o omrežju Name[sr]=Подаци о мрежи Name[sr@ijekavian]=Подаци о мрежи Name[sr@ijekavianlatin]=Podaci o mreži Name[sr@latin]=Podaci o mreži Name[sv]=Nätverksinformation Name[tg]=Иттилооти шабака Name[th]=ข้อมูลเครือข่าย Name[tr]=Ağ Bilgileri Name[ug]=تور ئۇچۇرى Name[uk]=Інформація щодо мережі Name[vi]=Thông tin mạng Name[wa]=Informåcions sol rantoele Name[x-test]=xxNetwork Informationxx Name[zh_CN]=网络信息 Name[zh_TW]=網路資訊 diff --git a/Modules/about-distro/src/about-distro.desktop b/Modules/about-distro/src/about-distro.desktop index ca6a4cb..ee62c2a 100644 --- a/Modules/about-distro/src/about-distro.desktop +++ b/Modules/about-distro/src/about-distro.desktop @@ -1,118 +1,119 @@ [Desktop Entry] Type=Service Icon=ktip Exec=kcmshell5 about-distro X-KDE-Library=kcm_about_distro X-KDE-ServiceTypes=KCModule X-KDE-ParentApp=kinfocenter X-KDE-PluginKeyword=kcm-about-distro X-KDE-System-Settings-Parent-Category=system-administration +X-KDE-KInfoCenter-Category=basic_information X-KDE-Weight=0 X-KDE-Keywords=about,info,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[ca]=quant a,info,informació,distribució,distro,sistema,nucli,qt,kde X-KDE-Keywords[cs]=o aplikaci,informace,distribuce,distro,systém,jádro,qt,kde X-KDE-Keywords[da]=om,info,information,distribution,distro,system,kerne,qt,kde X-KDE-Keywords[de]=Über,Info,Information,Distribution,Distro,System,Kernel,Qt,KDE X-KDE-Keywords[en_GB]=about,info,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[es]=acerca de,info,información,distribución,distro,sistema,kernel,qt,kde X-KDE-Keywords[et]=teave,info,distributsioon,distro,süsteem,kernel,qt,kde X-KDE-Keywords[eu]=hori buruz,info,informazioa,banaketa,distribuzioa,distro,sistema,muina,kernela,qt,kde X-KDE-Keywords[fi]=tietoja,tietoa,tiedot,info,jakelu,distribuutio,distro,järjestelmä,ydin,käyttöjärjestelmäydin,kernel,qt,kde X-KDE-Keywords[fr]=à propos,info,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[gl]=sobre,info,información,distribución,sistema,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[hu]=névjegy,infó,információk,disztribúció,disztró,rendszer,kernel,qt,kde X-KDE-Keywords[ia]=about,info,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[id]=tentang,informasi,distribusi,distro,sistem,kernel,qt,kde X-KDE-Keywords[it]=informazioni,info,distribuzione,distro,sistema,kernel,qt,kde X-KDE-Keywords[ja]=情報,ディストリビューション,ディストリ,システム,カーネル X-KDE-Keywords[ko]=about,info,information,distribution,distro,system,kernel,qt,kde,정보,배포판,시스템,커널 X-KDE-Keywords[lt]=apie,informacija,distribucija,platinimas,platinamasis paketas,distro,sistema,branduolys,qt,kde X-KDE-Keywords[nl]=over,info,informatie,distributie,distro,systeem,kernel,qt,kde X-KDE-Keywords[nn]=om,info,informasjon,distribusjon,distro,system,kjerne,qt,kde X-KDE-Keywords[pl]=info,informacje,dystrybucja,distro,system,jądro,qt,kde X-KDE-Keywords[pt]=acerca,informação,distribuição,sistema,'kernel',qt,kde X-KDE-Keywords[pt_BR]=sobre,info,informações,distribuição,sistema,kernel,qt,kde X-KDE-Keywords[ru]=about,info,information,distribution,distro,system,kernel,qt,kde,информация,сведения,дистрибутив,ядро,процессор,компьютер,операционная система,память,архитектура X-KDE-Keywords[sk]=o,info,informácia,distribúcia,distro,systém,jadro,qt,kde X-KDE-Keywords[sv]=om,info,information,distribution,distro,system,kernel,qt,kde X-KDE-Keywords[uk]=information,distribution,distro,system,kernel,qt,kde,інформація,дистрибутив,дистро,система,ядро,процесор,комп’ютер,інфо X-KDE-Keywords[x-test]=xxaboutxx,xxinfoxx,xxinformationxx,xxdistributionxx,xxdistroxx,xxsystemxx,xxkernelxx,xxqtxx,xxkdexx X-KDE-Keywords[zh_CN]=about,info,information,distribution,distro,system,kernel,qt,kde,有关信息,信息,分发,发行版,系统,内核 X-KDE-Keywords[zh_TW]=about,info,information,distribution,distro,system,kernel,qt,kde,關於,資訊,信息,發行版,發行,系統,核心,內核 Categories=Qt;KDE;X-KDE-settings-personalization;X-KDE-information; Name=System Information Name[ca]=Informació del sistema Name[cs]=Systémové informace Name[da]=Systeminformation Name[de]=Systeminformation Name[en_GB]=System Information Name[es]=Información del sistema Name[et]=Süsteemi teave Name[eu]=Sistemaren informazioa Name[fi]=Järjestelmätiedot Name[fr]=Informations système Name[gl]=Información do sistema Name[hu]=Rendszerjellemzők Name[ia]=Information de Systema Name[id]=Informasi Sistem Name[it]=Informazioni di sistema Name[ko]=시스템 정보 Name[lt]=Sistemos informacija Name[nl]=Systeeminformatie Name[nn]=Systeminformasjon Name[pl]=Informacje systemowe Name[pt]=Informação do Sistema Name[pt_BR]=Informações do sistema Name[ru]=Сведения о системе Name[sk]=Systémové informácie Name[sv]=Systeminformation Name[tg]=Иттилоот дар бораи низом Name[uk]=Інформація про систему Name[x-test]=xxSystem Informationxx Name[zh_CN]=系统信息 Name[zh_TW]=系統資訊 Comment=Information About This System Comment[ar]=معلومات عن هذا النّظام Comment[ca]=Informació quant a aquest sistema Comment[ca@valencia]=Informació quant a aquest sistema Comment[cs]=Informace o tomto systému Comment[da]=Information om dette system Comment[de]=Informationen über dieses System Comment[el]=Πληροφορίες σχετικά με αυτό το σύστημα Comment[en_GB]=Information About This System Comment[es]=Información sobre este sistema Comment[et]=Teave süsteemi kohta Comment[eu]=Sistema honi buruzko informazioa Comment[fi]=Tietoa tästä järjestelmästä Comment[fr]=Informations sur ce système Comment[gl]=Información sobre o sistema Comment[he]=מידע על מערכת זו Comment[hu]=Információk erről a rendszerről Comment[ia]=Information re iste systema Comment[id]=Informasi Tentang Sistem Ini Comment[it]=Informazioni su questo sistema Comment[ja]=このシステムに関する情報 Comment[ko]=이 시스템 정보 Comment[lt]=Informacija apie šią sistemą Comment[nb]=Informasjon om dette systemet Comment[nl]=Informatie over dit systeem Comment[nn]=Informasjon om systemet Comment[pl]=Dane o systemie Comment[pt]=Informação Sobre o Sistema Comment[pt_BR]=Informações sobre este sistema Comment[ru]=Сведения об этой системе Comment[sk]=Informácia o tomto systéme Comment[sl]=Podrobnosti o tem sistemu Comment[sr]=Подаци о овом систему Comment[sr@ijekavian]=Подаци о овом систему Comment[sr@ijekavianlatin]=Podaci o ovom sistemu Comment[sr@latin]=Podaci o ovom sistemu Comment[sv]=Information om systemet Comment[tg]=Иттилоот дар бораи низоми ҷорӣ Comment[tr]=Bu Sistem Hakkında Bilgi Comment[uk]=Інформація щодо цієї системи Comment[x-test]=xxInformation About This Systemxx Comment[zh_CN]=此系统的信息 Comment[zh_TW]=關於此系統的資訊 diff --git a/Modules/energy/kcm_energyinfo.desktop b/Modules/energy/kcm_energyinfo.desktop index 5e734b7..a45f30d 100644 --- a/Modules/energy/kcm_energyinfo.desktop +++ b/Modules/energy/kcm_energyinfo.desktop @@ -1,139 +1,140 @@ [Desktop Entry] Exec=kcmshell5 kcm_energyinfo Icon=battery Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_energyinfo X-KDE-ParentApp=kinfocenter +X-KDE-KInfoCenter-Category=basic_information -Name=Energy Information +Name=Energy Name[ar]=معلومات عن الطّاقة Name[ca]=Informació de l'energia Name[ca@valencia]=Informació de l'energia Name[cs]=Informace o energii Name[da]=Energiinformation Name[de]=Energie-Information Name[el]=Πληροφορίες για την ενέργεια Name[en_GB]=Energy Information Name[es]=Información sobre energía Name[et]=Energiateave Name[eu]=Energiari buruzko informazioa Name[fi]=Energiatiedot Name[fr]=Information sur l'énergie Name[gl]=Información da enerxía Name[he]= מידע על הספקת החשמל Name[hu]=Energiakezelési jellemzők Name[ia]=Information de energia Name[id]=Informasi Energi Name[it]=Informazioni energetiche Name[ja]=エネルギー情報 Name[ko]=에너지 정보 Name[lt]=Energijos informacija Name[nb]=Energiinformasjon Name[nl]=Energie-informatie Name[nn]=Energiinformasjon Name[pl]=Dane o zasilaniu Name[pt]=Informação de Energia Name[pt_BR]=Informações de energia Name[ru]=Энергопотребление Name[sk]=Informácie o energii Name[sl]=Podatki o energiji Name[sr]=Подаци о енергији Name[sr@ijekavian]=Подаци о енергији Name[sr@ijekavianlatin]=Podaci o energiji Name[sr@latin]=Podaci o energiji Name[sv]=Information om energi Name[tr]=Enerji Bilgisi Name[uk]=Інформація щодо енергоспоживання Name[x-test]=xxEnergy Informationxx Name[zh_CN]=能源信息 Name[zh_TW]=能源資訊 Comment=Energy Consumption Statistics Comment[ar]=إحصائيّات استهلاك الطّاقة Comment[ca]=Estadístiques del consum d'energia Comment[ca@valencia]=Estadístiques del consum d'energia Comment[cs]=Statistika spotřeby energie Comment[da]=Statistik over energiforbrug Comment[de]=Statistiken über den Energieverbrauch Comment[el]=Στατιστικά κατανάλωσης ενέργειας Comment[en_GB]=Energy Consumption Statistics Comment[es]=Estadísticas de consumo de energía Comment[et]=Energiatarbe statistika Comment[eu]=Energia kontsumoaren estatistikak Comment[fi]=Energiankulutuksen tilastot Comment[fr]=Statistiques de consommation d'énergie Comment[gl]=Estatísticas de consumo enerxético Comment[he]=סטטיסטיקת צריכת אנרגיה Comment[hu]=Energiafogyasztási statisztikák Comment[ia]=Statistica de consumo de energia Comment[id]=Statistik Konsumsi Energi Comment[it]=Statistiche del consumo di energia Comment[ja]=エネルギー消費の統計 Comment[ko]=에너지 소모 통계 Comment[lt]=Energijos sunaudojimo statistika Comment[nb]=Statistikk over energibruk Comment[nl]=Statistiek over energiegebruik Comment[nn]=Statistikk over energibruk Comment[pl]=Statystka poboru energii Comment[pt]=Estatísticas do Consumo de Energia Comment[pt_BR]=Estatística do consumo de energia Comment[ru]=Статистика энергопотребления Comment[sk]=Štatistiky o spotrebe energie Comment[sl]=Statistika porabe energije Comment[sr]=Статистика потрошње енергије Comment[sr@ijekavian]=Статистика потрошње енергије Comment[sr@ijekavianlatin]=Statistika potrošnje energije Comment[sr@latin]=Statistika potrošnje energije Comment[sv]=Statistik över energiförbrukning Comment[tr]=Enerji Tüketimi İstatistikleri Comment[uk]=Статистика споживання електроенергії Comment[x-test]=xxEnergy Consumption Statisticsxx Comment[zh_CN]=能源消耗统计 Comment[zh_TW]=能源消耗統計 X-KDE-Keywords=Battery,Energy,Statistics,History,Power X-KDE-Keywords[ar]=Battery,Energy,Statistics,History,Power,بطارية,طاقة,إحصائيات,احصائيات,تأريخ,تاريخ X-KDE-Keywords[ca]=Bateria,Energia,Estadístiques,Historial,Potència X-KDE-Keywords[ca@valencia]=Bateria,Energia,Estadístiques,Historial,Potència X-KDE-Keywords[cs]=Baterie,Energie,Statistika,Historie,Napájení X-KDE-Keywords[da]=Batteri,energi,strøm,statistik,historik X-KDE-Keywords[de]=Akku,Energie,Statistik,Verlauf X-KDE-Keywords[el]=Μπαταρία,Ενέργεια,Στατιστικά,Ιστορικό,Ισχύς X-KDE-Keywords[en_GB]=Battery,Energy,Statistics,History,Power X-KDE-Keywords[es]=Batería,Energía,Estadísticas,Historial,Consumo X-KDE-Keywords[et]=aku,energia,statistika,ajalugu,toide X-KDE-Keywords[eu]=Bateria,Energia,Estatistikak,Historia,Indarra X-KDE-Keywords[fi]=Battery,Energy,Statistics,History,Power,Akku,Energia,Tilastot,Historia,Virta X-KDE-Keywords[fr]=Batterie, Énergie, Statistiques, Historique, Alimentation X-KDE-Keywords[gl]=batería,enerxía,estatísticas,historia,histórico,historial,rexistro,corrente X-KDE-Keywords[he]=Battery,Energy,Statistics,History,Power,סוללה,אנרגיה,סטטיסטיקה,היסטוריה,חשמל X-KDE-Keywords[hu]=Telep,Energia,Statisztika,Előzmény,Energiakezelés X-KDE-Keywords[ia]=Batteria,Energia,Statistica,Historia,Potentia X-KDE-Keywords[id]=Baterai,Energi,Statistik,Histori,Daya X-KDE-Keywords[it]=Batteria,Energia,Statistiche,Storico,Alimentazione X-KDE-Keywords[ja]=バッテリ,エネルギー,統計,履歴,電源 X-KDE-Keywords[ko]=Battery,Energy,Statistics,History,Power,배터리,에너지,통계,전원,전력 X-KDE-Keywords[lt]=Akumuliatorius,Energija,Statistika,Istorija,Maitinimas,Baterija,Žurnalas X-KDE-Keywords[nb]=Batteri,Energi,Statistikk,Historie,Effekt X-KDE-Keywords[nl]=Batterij,Statistiek,Geschiedenis,Energie X-KDE-Keywords[nn]=batteri,energi,statistikk,historie,straum,effekt X-KDE-Keywords[pl]=Bateria,Energia,Statystyka,Historia,Zasilanie X-KDE-Keywords[pt]=Bateria,Energia,Estatísticas,Histórico,Potência X-KDE-Keywords[pt_BR]=Bateria,Energia,Estatística,Histórico,Potência X-KDE-Keywords[ru]=Battery,Energy,Statistics,History,Power,батарея,аккумулятор,статистика,энергия,энергопотребление,электропитание,история,журнал,питание X-KDE-Keywords[sk]=Batéria,Energia,Štatistika,História,Napájanie X-KDE-Keywords[sl]=baterija,energija,statistika,zgodovina,moč,poraba X-KDE-Keywords[sr]=Battery,Energy,Statistics,History,Power,батерија,енергија,статистика,историјат,напајање X-KDE-Keywords[sr@ijekavian]=Battery,Energy,Statistics,History,Power,батерија,енергија,статистика,историјат,напајање X-KDE-Keywords[sr@ijekavianlatin]=Battery,Energy,Statistics,History,Power,baterija,energija,statistika,istorijat,napajanje X-KDE-Keywords[sr@latin]=Battery,Energy,Statistics,History,Power,baterija,energija,statistika,istorijat,napajanje X-KDE-Keywords[sv]=Batteri,Energi,Statistik,historik,Effekt X-KDE-Keywords[tr]=Pil,Enerji,İstatistik,Geçmiş,Güç X-KDE-Keywords[uk]=Battery,Energy,Statistics,History,Power,акумулятор,енергія,статистика,журнал,живлення,споживання,енергоспоживання X-KDE-Keywords[x-test]=xxBatteryxx,xxEnergyxx,xxStatisticsxx,xxHistoryxx,xxPowerxx X-KDE-Keywords[zh_CN]=Battery,Energy,Statistics,History,Power,电池,能源,统计,历史,电源 X-KDE-Keywords[zh_TW]=Battery,Energy,Statistics,History,Power X-KDE-Weight=2 X-KDE-FormFactors=desktop,tablet,handset Categories=Qt;KDE;X-KDE-information; diff --git a/Modules/fileindexermonitor/kcm_fileindexermonitor.desktop b/Modules/fileindexermonitor/kcm_fileindexermonitor.desktop index aba467b..9e1a02c 100644 --- a/Modules/fileindexermonitor/kcm_fileindexermonitor.desktop +++ b/Modules/fileindexermonitor/kcm_fileindexermonitor.desktop @@ -1,130 +1,131 @@ [Desktop Entry] Exec=kcmshell5 kcm_fileindexermonitor Icon=baloo Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_fileindexermonitor X-KDE-ParentApp=kinfocenter +X-KDE-KInfoCenter-Category=basic_information Name=File Indexer Monitor Name[ar]=مرقاب مفهرس الملفّات Name[ca]=Monitor de l'indexador de fitxers Name[ca@valencia]=Monitor de l'indexador de fitxers Name[da]=Overvågning af filindeksering Name[de]=Datei-Indizierungsüberwachung Name[el]=Επόπτης εφαρμογής δεικτοδότησης αρχείων Name[en_GB]=File Indexer Monitor Name[es]=Monitor del indexador de archivos Name[et]=Failide indekseerimise jälgimine Name[eu]=Fitxategi indexatzearen begiralea Name[fi]=Tiedostoindeksoijan valvonta Name[fr]=Indicateur de l'indexeur de fichiers Name[gl]=Vixilante do indexador de ficheiros Name[he]=מנטר אינדוקס קבצים Name[hu]=Fájlindexelő-figyelő Name[ia]=Monitor de indicisator de File Name[id]=Pemantau Pengindeks File Name[it]=Monitor indicizzatore di file Name[ko]=파일 인덱서 모니터 Name[lt]=Failų indeksavimo prižiūryklė Name[nl]=Monitor voor bestandenindexering Name[nn]=Overvaking av filindeksering Name[pl]=Monitor indeksowania plików Name[pt]=Monitor de Indexação de Ficheiros Name[pt_BR]=Monitor de Indexação de Arquivos Name[ru]=Индексирование файлов Name[sk]=Monitor indexera súborov Name[sl]=Nadzornik izgrajevalnika kazala datotek Name[sr]=Надзорник индексара фајлова Name[sr@ijekavian]=Надзорник индексара фајлова Name[sr@ijekavianlatin]=Nadzornik indeksara fajlova Name[sr@latin]=Nadzornik indeksara fajlova Name[sv]=Filindexeringsövervakare Name[tr]=Dosya Dizinleme İzleyicisi Name[uk]=Монітор засобу індексування файлів Name[x-test]=xxFile Indexer Monitorxx Name[zh_CN]=文件索引器监视器 Name[zh_TW]=檔案索引器監視器 Comment=Monitor State of File Indexer Comment[ar]=حالة مرقاب مفهرس الملفّات Comment[ca]=Monitor de l'estat de l'indexador de fitxers Comment[ca@valencia]=Monitor de l'estat de l'indexador de fitxers Comment[da]=Overvåg filindekseringens tilstand Comment[de]=Überwachungsstatus der Datei-Indizierung Comment[el]=Παρακολούθηση της κατάστασης της δεικτοδότησης αρχείων Comment[en_GB]=Monitor State of File Indexer Comment[es]=Monitoriza el estado del indexador de archivos Comment[et]=Failide indekseerimise oleku jälgimine Comment[eu]=Fitxategi indexatzailearen egoera gainbegiratu Comment[fi]=Tiedostoindeksoijan tilan valvonta Comment[fr]=Indique l'état de l'indexeur de fichiers Comment[gl]=Vixía o estado do indexador de ficheiros. Comment[he]=ניטור את מצבו של מאנדקס הקבצים Comment[hu]=A fájlindexelő állapotának monitorozása Comment[ia]=Stato de monitor de indicisator de file Comment[id]=Keadaan Pemantauan Pengindeks File Comment[it]=Controlla lo stato dell'indicizzatore di file Comment[ko]=파일 인덱서 상태 관리 Comment[lt]=Stebėti failų indeksavimo būseną Comment[nl]=Monitorstatus voor bestandenindexering Comment[nn]=Overvak statusen til filindeksering Comment[pl]=Stan monitora indeksowania plików Comment[pt]=Vigia o estado da indexação dos ficheiros Comment[pt_BR]=Monitora o estado da indexação dos arquivos Comment[ru]=Состояние индексирования файлов Comment[sk]=Monitoring stavu indexera súborov Comment[sl]=Nadzirajte stanje izgrajevalnika kazala datotek Comment[sr]=Надзире стање индексара фајлова Comment[sr@ijekavian]=Надзире стање индексара фајлова Comment[sr@ijekavianlatin]=Nadzire stanje indeksara fajlova Comment[sr@latin]=Nadzire stanje indeksara fajlova Comment[sv]=Övervaka filindexeringens tillstånd Comment[tr]=Dosya Dizinleyici'nin Durumunu İzle Comment[uk]=Спостереження за станом засобу індексування файлів Comment[x-test]=xxMonitor State of File Indexerxx Comment[zh_CN]=监视文件索引器状态 Comment[zh_TW]=監控檔案索引器的狀態 X-KDE-Keywords=Baloo,File,Index,Monitor X-KDE-Keywords[ar]=Baloo,File,Index,Monitor,بالو,ملف,ملفات,مهفرس,فهرسة,فهرس,مرقاب,مراقب X-KDE-Keywords[ca]=Baloo,Fitxer,Índex,Monitor X-KDE-Keywords[ca@valencia]=Baloo,Fitxer,Índex,Monitor X-KDE-Keywords[da]=Baloo,Fil,Indeksering,Overvåg X-KDE-Keywords[de]=Baloo,Datei,Index,Indizierung,Überwachung X-KDE-Keywords[el]=Baloo,Αρχείο,Ευρετήριο,Επόπτης X-KDE-Keywords[en_GB]=Baloo,File,Index,Monitor X-KDE-Keywords[es]=Baloo,Archivo,Índice,Monitor X-KDE-Keywords[et]=Baloo,failid,indekseerimine,jälgimine X-KDE-Keywords[eu]=Baloo,Fitxategi,Indize,Begirale X-KDE-Keywords[fi]=Baloo,File,Index,Monitor,Tiedosto,Indeksi,Indeksointi,Valvonta,Tarkkailu,Aktiviteetti X-KDE-Keywords[fr]=Baloo,Fichier,Index,Indicateur X-KDE-Keywords[gl]=Baloo,File,Ficheiro,Ficheiros,Index,Índice,Indexador,Monitor,Vixilante,Vixiante,Vixía,Garda X-KDE-Keywords[he]=Baloo,File,Index,Monitor,קובץ,אינדקס,מוניטור,מנטר X-KDE-Keywords[hu]=Baloo,Fájl,Index,Monitor X-KDE-Keywords[ia]=Baloo,File,Index,Monitor X-KDE-Keywords[id]=Baloo,File,Indeks,Pemantau X-KDE-Keywords[it]=Baloo,file,indice,monitor X-KDE-Keywords[ko]=Baloo,File,Index,Monitor,파일,인덱스,색인,모니터 X-KDE-Keywords[lt]=Baloo,Failai,Indeksavimas,Stebėjimas,Prižiūryklė X-KDE-Keywords[nl]=Baloo,bestand,index,monitor X-KDE-Keywords[nn]=Baloo,fil,indeks,indeksering,overvaking X-KDE-Keywords[pl]=Baloo,Plik,Indeks,Monitor X-KDE-Keywords[pt]=Baloo,Ficheiro,Índice,Monitor X-KDE-Keywords[pt_BR]=Baloo,Arquivo,Índice,Monitor X-KDE-Keywords[ru]=Baloo,File,Index,Monitor,монитор,наблюдение,индексирование файлов,состояние индексирования файлов X-KDE-Keywords[sk]=Baloo,Súbor,Index,Monitor X-KDE-Keywords[sl]=Baloo,datoteka,kazalo,indeks,nadzornik X-KDE-Keywords[sr]=Baloo,File,Index,Monitor,Балу,фајл,индекс,надзор X-KDE-Keywords[sr@ijekavian]=Baloo,File,Index,Monitor,Балу,фајл,индекс,надзор X-KDE-Keywords[sr@ijekavianlatin]=Baloo,File,Index,Monitor,Baloo,fajl,indeks,nadzor X-KDE-Keywords[sr@latin]=Baloo,File,Index,Monitor,Baloo,fajl,indeks,nadzor X-KDE-Keywords[sv]=Baloo,Fil,Indexering,Övervaka X-KDE-Keywords[tr]=Baloo,Dosya,Dizin,Monitörü,İzleyici X-KDE-Keywords[uk]=Baloo,File,Index,Monitor,балу,файл,індекс,індексування,монітор,спостереження,стеження X-KDE-Keywords[x-test]=xxBalooxx,xxFilexx,xxIndexxx,xxMonitorxx X-KDE-Keywords[zh_CN]=Baloo,File,Index,Monitor,文件,索引,监视 X-KDE-Keywords[zh_TW]=Baloo,File,Index,Monitor X-KDE-Weight=3 Categories=Qt;KDE;X-KDE-information; diff --git a/Modules/memory/kcm_memory.desktop b/Modules/memory/kcm_memory.desktop index 0b59277..926d18e 100644 --- a/Modules/memory/kcm_memory.desktop +++ b/Modules/memory/kcm_memory.desktop @@ -1,242 +1,243 @@ [Desktop Entry] Exec=kcmshell5 kcm_memory Icon=partitionmanager Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Weight=1 X-KDE-Library=kcm_memory X-KDE-ParentApp=kinfocenter +X-KDE-KInfoCenter-Category=basic_information X-DocPath=kinfocenter/index.html#kcm_memory Name=Memory Name[af]=Geheue Name[ar]=الذّاكرة Name[as]=স্মৃতিশক্তি Name[be]=Памяць Name[be@latin]=Pamiać Name[bg]=Памет Name[bn]=মেমরি Name[bn_IN]=মেমরি Name[br]=Memor Name[bs]=Memorija Name[ca]=Memòria Name[ca@valencia]=Memòria Name[cs]=Paměť Name[csb]=Pamiãc Name[cy]=Cof Name[da]=Hukommelse Name[de]=Speicher Name[el]=Μνήμη Name[en_GB]=Memory Name[eo]=Memoro Name[es]=Memoria Name[et]=Mälu Name[eu]=Memoria Name[fa]=حافظه Name[fi]=Muisti Name[fr]=Mémoire Name[fy]=Unthâld Name[ga]=Cuimhne Name[gl]=Memoria Name[gu]=મેમરી Name[he]=זיכרון Name[hi]=मेमोरी Name[hne]=मेमोरी Name[hr]=Memorija Name[hsb]=Pomjatk Name[hu]=Memória Name[ia]=Memoria Name[id]=Memori Name[is]=Minni Name[it]=Memoria Name[ja]=メモリ Name[ka]=მეხსიერება Name[kk]=Жады Name[km]=សតិ Name[kn]=ಸ್ಮೃತಿ Name[ko]=메모리 Name[ku]=Bîr Name[lt]=Atmintis Name[lv]=Atmiņa Name[mai]=स्मृति Name[mk]=Меморија Name[ml]=മെമ്മറി Name[mr]=स्मृती Name[ms]=Ingatan Name[nb]=Minne Name[nds]=Spieker Name[ne]=स्मृति Name[nl]=Geheugen Name[nn]=Minne Name[oc]=Memòria Name[or]=ସ୍ମୃତିସ୍ଥାନ Name[pa]=ਮੈਮੋਰੀ Name[pl]=Dane o pamięci Name[pt]=Memória Name[pt_BR]=Memória Name[ro]=Memorie Name[ru]=Память Name[se]=Muitu Name[si]=මතකය Name[sk]=Pamäť Name[sl]=Pomnilnik Name[sr]=Меморија Name[sr@ijekavian]=Меморија Name[sr@ijekavianlatin]=Memorija Name[sr@latin]=Memorija Name[sv]=Minne Name[ta]=நினைவு Name[te]=మెమొరి Name[tg]=Ҳофиза Name[th]=หน่วยความจำ Name[tr]=Bellek Name[ug]=ئەسلەك Name[uk]=Пам'ять Name[uz]=Xotira Name[uz@cyrillic]=Хотира Name[vi]=Bộ nhớ Name[wa]=Memwere Name[xh]=Inkumbulo Name[x-test]=xxMemoryxx Name[zh_CN]=内存 Name[zh_TW]=記憶體 Comment=Memory information Comment[af]=Geheue informasie Comment[ar]=معلومات الذّاكرة Comment[as]=স্মৃতিশক্তিৰ তথ্য Comment[be]=Звесткі пра памяць Comment[be@latin]=Źviestki pra pamiać Comment[bg]=Данни за системната памет Comment[bn]=মেমরি সংক্রান্ত তথ্য Comment[bn_IN]=মেমরি সংক্রান্ত তথ্য Comment[br]=Titouroù diwar-benn ar memor Comment[bs]=Podaci o memoriji Comment[ca]=Informació de la memòria Comment[ca@valencia]=Informació de la memòria Comment[cs]=Informace o paměti Comment[csb]=Wëdowiédzô ò pamiãcë Comment[cy]=Gwybodaeth Cof Comment[da]=Information om hukommelsen Comment[de]=Informationen zum Speicher Comment[el]=Πληροφορίες για τη Μνήμη Comment[en_GB]=Memory information Comment[eo]=Informoj pri memoro Comment[es]=Información sobre la memoria Comment[et]=Mäluga seotud info Comment[eu]=Memoriari buruzko informazioa Comment[fa]=اطلاعات حافظه Comment[fi]=Tietoa muistista Comment[fr]=Informations sur la mémoire Comment[fy]=Unthâld ynformaasje Comment[ga]=Faisnéis chuimhne Comment[gl]=Información da memoria Comment[gu]=મેમરી માહિતી Comment[he]=מידע על הזיכרון Comment[hi]=मेमोरी जानकारी Comment[hne]=मेमोरी जानकारी Comment[hr]=Podaci o memoriji Comment[hsb]=Informacija wo pomjatku Comment[hu]=A memória jellemzői Comment[ia]=Information de memoria Comment[id]=Informasi memori Comment[is]=Upplýsingar um vinnsluminni Comment[it]=Informazioni sulla memoria Comment[ja]=メモリの情報 Comment[ka]=ინფორმაცია მეხსიერების შესახებ Comment[kk]=Жад мәліметі Comment[km]=ព័ត៌មាន​សតិ Comment[kn]=ಸ್ಮೃತಿ ಮಾಹಿತಿ Comment[ko]=메모리 정보 Comment[ku]=Agahiya Bîrê Comment[lt]=Atminties informacija Comment[lv]=Atmiņas informācija Comment[mai]=मेमोरी सूचना Comment[mk]=Информации за меморијата Comment[ml]=മെമ്മറിയെക്കുറിച്ചുള്ള വിവരങ്ങള്‍ Comment[mr]=स्मृती माहिती Comment[ms]=Maklumat ingatan Comment[nb]=Minneinformasjon Comment[nds]=Informatschoon över den Spieker Comment[ne]=स्मृति सूचना Comment[nl]=Geheugeninformatie Comment[nn]=Minneinformasjon Comment[or]=ସ୍ମୃତିସ୍ଥାନ ସୂଚନା Comment[pa]=ਮੈਮੋਰੀ ਜਾਣਕਾਰੀ Comment[pl]=Dane o pamięci Comment[pt]=Informações sobre a memória Comment[pt_BR]=Informações da memória Comment[ro]=Informații despre memorie Comment[ru]=Сведения об использовании памяти Comment[se]=Muitodiehtu Comment[si]=මතක තොරතුරු Comment[sk]=Informácie o pamäti Comment[sl]=Podatki o pomnilniku Comment[sr]=Подаци о меморији Comment[sr@ijekavian]=Подаци о меморији Comment[sr@ijekavianlatin]=Podaci o memoriji Comment[sr@latin]=Podaci o memoriji Comment[sv]=Minnesinformation Comment[ta]=நினைவுத் தகவல் Comment[te]=మెమొరి సమాచారం Comment[th]=ข้อมูลหน่วยความจำ Comment[tr]=Bellek hakkında bilgi Comment[ug]=ئەسلەك ئۇچۇرى Comment[uk]=Інформація щодо пам'яті Comment[uz]=Xotira haqida maʼlumot Comment[uz@cyrillic]=Хотира ҳақида маълумот Comment[vi]=Thông tin về bộ nhớ Comment[wa]=Informåcion sol memwere Comment[xh]=Ulwazi lwenkumbulo Comment[x-test]=xxMemory informationxx Comment[zh_CN]=内存信息 Comment[zh_TW]=記憶體資訊 X-KDE-Keywords=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information X-KDE-Keywords[ar]=ذاكرة,ذاكرة عشوائية,ذاكرة وهميّة,ذاكرة فيزيائيّة,ذاكرة مشتركة,تبديل,معلومات النّظام X-KDE-Keywords[bs]=Memorija,RAM,virtuelna memorija,fizička memorija,razmijeniti,informacijski sustav X-KDE-Keywords[ca]=Memòria,RAM,Memòria virtual,Memòria física,Memòria compartida,Swap,Intercanvi,Informació del sistema X-KDE-Keywords[ca@valencia]=Memòria,RAM,Memòria virtual,Memòria física,Memòria compartida,Swap,Intercanvi,Informació del sistema X-KDE-Keywords[cs]=Paměť,RAM,Virtuální paměť,Fyzická paměť,Sdílená paměť,Swap,Informace o systému X-KDE-Keywords[da]=Hukommelse,RAM,Virtuel hukommelse,fysisk hukommelse,delt hukommelse,Swap,Systeminformation X-KDE-Keywords[de]=Speicher,RAM,Virtueller Speicher,Physischer Speicher,Shared Memory,Auslagerung,Swap,Systeminformationen X-KDE-Keywords[el]=μνήμη,RAM,εικονική μνήμη,φυσική μνήμη,κοινόχρηστη μνήμη,Swap,πληροφορίες συστήματος X-KDE-Keywords[en_GB]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information X-KDE-Keywords[es]=Memoria,RAM,Memoria virtual,Memoria física,Memoria compartida,Intercambio,Información sobre el sistema X-KDE-Keywords[et]=mälu,RAM,virtuaalmälu,füüsiline mälu,jagatud mälu,saaleala,süsteemi teave X-KDE-Keywords[eu]=Memoria,RAM,memoria birtuala,alegiazko memoria,memoria fisikoa,memoria partekatua,trukea,sistema-informazioa X-KDE-Keywords[fi]=muisti,RAM,virtuaalimuisti,fyysinen muisti,jaettu muisti,swap,sivutus,sivutusmuisti,näennäismuisti,järjestelmätiedot X-KDE-Keywords[fr]=Mémoire, RAM, Mémoire virtuelle, Mémoire physique, Mémoire partagée, Échange, Informations système X-KDE-Keywords[ga]=Cuimhne,RAM,Cuimhne fhíorúil,Cuimhne ábhartha,Comhchuimhne,Cuimhne bhabhtála,Babhtáil,Eolas faoin Chóras X-KDE-Keywords[gl]=memoria,RAM,memoria virtual,memoria física,memoria compartida,swap, intercambio,área de intercambio,información do sistema X-KDE-Keywords[hu]=Memória,RAM,Virtuális memória,Fizikai memória,Megosztott memória,Swap,Rendszerjellemzők X-KDE-Keywords[ia]=Memoria,RAM,memoria virtual,memoria physic,memoria compartite,Swap,Information de systema X-KDE-Keywords[id]=Memori,RAM,memori Virtual,memori Fisik,memori Berbagi,Swap,Informasi Sistem X-KDE-Keywords[it]=Memoria,RAM,memoria virtuale,memoria fisica,memoria condivisa,swap,Informazioni di sistema X-KDE-Keywords[kk]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information X-KDE-Keywords[km]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information X-KDE-Keywords[ko]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,메모리,가상 메모리,스왑 메모리,물리 메모리,공유 메모리,스왑,시스템 정보 X-KDE-Keywords[lt]=Atmintis,RAM,Virtuali atmintis,Fizinė atmintis,Bendrinama atmintis,Swap,Sistemos informacija,OA,operatyvinė atmintis,sukeitimų X-KDE-Keywords[mr]=मेमरी, RAM, व्हर्च्युअल मेमरी, फिजिकल मेमरी, शेअर्ड मेमरी, स्वॅप, प्रणाली माहीती X-KDE-Keywords[nb]=Minne,RAM,Virtuelt minne,Fysisk minne,Delt minne,Veksleminne,Systeminformasjon X-KDE-Keywords[nds]=Spieker,RAM,virtuell,physikaalsch,deelt,Utlagerspieker,Systeeminformatschonen X-KDE-Keywords[nl]=geheugen,RAM,virtueel geheugen,fysiek geheugen,gedeeld geheugen,swap,systeeminformatie X-KDE-Keywords[nn]=minne,RAM,virtuelt minne,fysisk minne,delt minne,veksleminne,systeminformasjon X-KDE-Keywords[pl]=Pamięć,RAM,Wirtualna pamięć,Fizyczna pamięć,Współdzielona pamięć,Plik wymiany,Dane o systemie X-KDE-Keywords[pt]=Memória,RAM,Memória virtual,Memória física,Memória partilhada,Paginação,Informação do Sistema X-KDE-Keywords[pt_BR]=Memória,RAM,Memória virtual,Memória física,Memória compartilhada,Swap,Informação do sistema X-KDE-Keywords[ru]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,память,виртуальная память,физическая память,разделяемая память,подкачка,сведения о системе X-KDE-Keywords[sk]=Pamúť,RAM,Virtuálna pamäť,Fyzická pamäť,Zdieľaná pamäť,Swap,Systémové informácie X-KDE-Keywords[sl]=pomnilnik,ram,navidezni pomnilnik,fizični pomnilnik,deljeni pomnilnik,izmenjevalni pomnilnik, izmenjevalni prostor,sistemski podatki,podatki o sistemu X-KDE-Keywords[sr]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,меморија,РАМ,виртуелна меморија,физичка меморија,дељена меморија,размена,системске информације X-KDE-Keywords[sr@ijekavian]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,меморија,РАМ,виртуелна меморија,физичка меморија,дељена меморија,размена,системске информације X-KDE-Keywords[sr@ijekavianlatin]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,memorija,RAM,virtuelna memorija,fizička memorija,deljena memorija,razmena,sistemske informacije X-KDE-Keywords[sr@latin]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,memorija,RAM,virtuelna memorija,fizička memorija,deljena memorija,razmena,sistemske informacije X-KDE-Keywords[sv]=Minne,RAM,Virtuellt minne,Fysiskt minne,Delat minne,Växling,Systeminformation X-KDE-Keywords[tr]=Bellek,RAM,Sanal bellek,Fiziksel bellek,Paylaşılan bellek,Takas alanı,Swap,Sistem bilgileri X-KDE-Keywords[uk]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,пам’ять,віртуальна пам’ять,фізична пам’ять,спільна пам’ять,свопінг,резервна пам’ять,резерв,своп,система,інформація,відомості X-KDE-Keywords[x-test]=xxMemoryxx,xxRAMxx,xxVirtual memoryxx,xxPhysical memoryxx,xxShared memoryxx,xxSwapxx,xxSystem Informationxx X-KDE-Keywords[zh_CN]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information,内存,随机存储,虚拟内存,物理内存,共享内存,交换空间,系统信息 X-KDE-Keywords[zh_TW]=Memory,RAM,Virtual memory,Physical memory,Shared memory,Swap,System Information Categories=Qt;KDE;X-KDE-information; diff --git a/ToolTips/tooltipmanager.cpp b/ToolTips/tooltipmanager.cpp deleted file mode 100644 index 96c4f8e..0000000 --- a/ToolTips/tooltipmanager.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2008 by Konstantin Heil * - * * - * 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 "tooltipmanager.h" - -#include "kcmtreeitem.h" -#include "sidepanel.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -class IconLoaderSingleton -{ -public: - IconLoaderSingleton() = default; - - KIconLoader self; -}; - -Q_GLOBAL_STATIC(IconLoaderSingleton, privateIconLoaderSelf) - -class ToolTipManager::Private -{ -public: - KToolTipWidget *tooltip = nullptr; - QAbstractItemView* view = nullptr; - QTimer* timer = nullptr; - QModelIndex item; - QRect itemRect; - int delay = QApplication::style()->styleHint(QStyle::SH_ToolTip_WakeUpDelay); -}; - -ToolTipManager::ToolTipManager(QAbstractItemView* parent) - : QObject(parent) - , d(new ToolTipManager::Private) -{ - d->view = parent; - d->tooltip = new KToolTipWidget(d->view); - d->tooltip->setHideDelay(0); - - connect(parent, &QAbstractItemView::viewportEntered, this, &ToolTipManager::hideToolTip); - connect(parent, &QAbstractItemView::entered, this, &ToolTipManager::requestToolTip); - - d->timer = new QTimer(this); - d->timer->setSingleShot(true); - connect(d->timer, &QTimer::timeout, this, &ToolTipManager::prepareToolTip); - - // When the mousewheel is used, the items don't get a hovered indication - // (Qt-issue #200665). To assure that the tooltip still gets hidden, - // the scrollbars are observed. - connect(parent->horizontalScrollBar(), &QAbstractSlider::valueChanged, this, &ToolTipManager::hideToolTip); - connect(parent->verticalScrollBar(), &QAbstractSlider::valueChanged, this, &ToolTipManager::hideToolTip); - - d->view->viewport()->installEventFilter(this); -} - -ToolTipManager::~ToolTipManager() -{ - delete d; -} - -bool ToolTipManager::eventFilter(QObject* watched, QEvent* event) -{ - if ( watched == d->view->viewport() ) { - switch ( event->type() ) { - case QEvent::Leave: - case QEvent::MouseButtonPress: - hideToolTip(); - break; - case QEvent::ToolTip: - return true; - default: - break; - } - } - - return QObject::eventFilter(watched, event); -} - -void ToolTipManager::requestToolTip(const QModelIndex& index) -{ - // only request a tooltip for the name column and when no selection or - // drag & drop operation is done (indicated by the left mouse button) - if ( !(QApplication::mouseButtons() & Qt::LeftButton) ) { - d->tooltip->hide(); - - d->itemRect = d->view->visualRect(index); - const QPoint pos = d->view->viewport()->mapToGlobal(d->itemRect.topLeft()); - d->itemRect.moveTo(pos); - d->item = index; - d->timer->start(d->delay); - } else { - hideToolTip(); - } -} - -void ToolTipManager::hideToolTip() -{ - d->timer->stop(); - d->tooltip->hideLater(); -} - -void ToolTipManager::prepareToolTip() -{ - showToolTip( d->item ); -} - -void ToolTipManager::showToolTip( const QModelIndex& menuItem ) -{ - if (QApplication::mouseButtons() & Qt::LeftButton) { - return; - } - - QWidget * tip = createTipContent( menuItem ); - connect(d->tooltip, &KToolTipWidget::hidden, tip, &QObject::deleteLater); - - d->tooltip->showBelow(d->itemRect, tip, d->view->nativeParentWidget()->windowHandle()); -} - -QWidget * ToolTipManager::createTipContent( const QModelIndex& item ) -{ - QWidget * tipContent = new QWidget(); - QGridLayout* tipLayout = new QGridLayout(); - - QLayout * primaryLine = generateToolTipLine( item, tipContent, QSize(32,32), true ); - tipLayout->addLayout( primaryLine, 0, 0 ); - - for ( int done = 0; d->view->model()->rowCount( item ) > done; done = 1 + done ) { - QModelIndex childItem = d->view->model()->index( done, 0, item ); - QLayout * subLine = generateToolTipLine( childItem, tipContent, QSize(24,24), false ); - tipLayout->addLayout( subLine, done + 2, 0 ); - } - - tipLayout->setVerticalSpacing( 0 ); - tipContent->setLayout( tipLayout ); - - if( d->view->model()->rowCount( item ) > 0 ) { - QFrame * separatorLine = new QFrame( tipContent ); - separatorLine->setFrameStyle( QFrame::HLine ); - tipLayout->addWidget( separatorLine, 1, 0 ); - } - - return tipContent; -} - -QLayout * ToolTipManager::generateToolTipLine( const QModelIndex & item, QWidget * toolTip, const QSize& iconSize, bool comment ) -{ - SidePanel *sidePanel = static_cast(d->view); - KcmTreeItem *menuItem = static_cast( sidePanel->mapToProxySource(item).internalPointer() ); - - QString text = menuItem->data(); - if ( comment ) { - text = QStringLiteral( "%1" ).arg( menuItem->data() ); - } - - QLabel * textLabel = new QLabel( toolTip ); - textLabel->setForegroundRole(QPalette::ToolTipText); - textLabel->setText( text ); - - // Get icon - QPalette pal = textLabel->palette(); - for (auto state : { QPalette::Active, QPalette::Inactive, QPalette::Disabled }) { - pal.setBrush(state, QPalette::WindowText, pal.toolTipText()); - pal.setBrush(state, QPalette::Window, pal.toolTipBase()); - } - - privateIconLoaderSelf->self.setCustomPalette(pal); - - QIcon icon = KDE::icon(menuItem->iconName(), &privateIconLoaderSelf->self); - QLabel * iconLabel = new QLabel( toolTip ); - iconLabel->setPixmap( icon.pixmap(iconSize) ); - iconLabel->setMaximumSize( iconSize ); - - // Generate layout - QHBoxLayout * layout = new QHBoxLayout(); - layout->addWidget( iconLabel ); - layout->addWidget( textLabel ); - - return layout; -} - diff --git a/ToolTips/tooltipmanager.h b/ToolTips/tooltipmanager.h deleted file mode 100644 index d88798d..0000000 --- a/ToolTips/tooltipmanager.h +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2008 by Konstantin Heil * - * * - * 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 TOOLTIPMANAGER_H -#define TOOLTIPMANAGER_H - -#include - -#include - -class QLayout; -class QAbstractItemView; - -/** - * @brief Manages the tooltips for an item view. - * - * When hovering an item, a tooltip is shown after - * a short timeout. The tooltip is hidden again when the - * viewport is hovered or the item view has been left. - */ -class ToolTipManager : public QObject -{ - Q_OBJECT - -public: - /** - * Standard constructor. The ToolTipManager will start handling ToolTip events on the provided - * view immediately. - * - * @param parent The view which will have the tooltips displayed for. - */ - explicit ToolTipManager(QAbstractItemView* parent); - ~ToolTipManager() override; - -public Q_SLOTS: - /** - * Hides the currently shown tooltip. Invoking this method is - * only needed when the tooltip should be hidden although - * an item is hovered. - */ - void hideToolTip(); - -protected: - /** - * Please see the Qt documentation for more details. - * - * @param watched The object that was being watched. - * @param event The event object. - * @returns true if the event was handled in this filter, or false if it was not. - */ - bool eventFilter( QObject* watched, QEvent* event ) override; - -private Q_SLOTS: - void prepareToolTip(); - void requestToolTip(const QModelIndex& index); - -private: - void showToolTip( const QModelIndex& menuItem ); - QWidget * createTipContent( const QModelIndex& item ); - QLayout * generateToolTipLine( const QModelIndex& item, QWidget * toolTip, const QSize& iconSize, bool comment ); - - class Private; - ToolTipManager::Private* d; -}; - -#endif diff --git a/config-X11.h.cmake b/config-X11.h.cmake deleted file mode 100644 index 48c2470..0000000 --- a/config-X11.h.cmake +++ /dev/null @@ -1,2 +0,0 @@ -/* Set to 1 if you have X11 at all */ -#cmakedefine01 HAVE_X11 diff --git a/config-project-version.h.cmake b/config-project-version.h.cmake deleted file mode 100644 index bfcd42a..0000000 --- a/config-project-version.h.cmake +++ /dev/null @@ -1 +0,0 @@ -#define PROJECT_VERSION "${PROJECT_VERSION}" diff --git a/infocenter.cpp b/infocenter.cpp deleted file mode 100644 index d097db1..0000000 --- a/infocenter.cpp +++ /dev/null @@ -1,255 +0,0 @@ - -/* - * infocenter.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "infocenter.h" - -//KDE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//QT -#include -#include -#include -#include -#include -#include -#include -#include - -KInfoCenter::KInfoCenter() : KXmlGuiWindow( 0, Qt::WindowContextHelpButtonHint ) -{ - setWindowIcon(QIcon::fromTheme(QStringLiteral("hwinfo"))); - setWindowTitle(i18nc("Main window title", "KInfocenter")); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - - setMinimumWidth(800); - setMinimumHeight(600); - - m_cWidget = new QWidget(this); - setCentralWidget(m_cWidget); - - QVBoxLayout *cLayout = new QVBoxLayout(m_cWidget); - - cLayout->setSpacing(0); - cLayout->setContentsMargins(0, 0, 0, 0); - createMainFrame(); - createToolBar(); - - //TreeWidget - connect(m_sideMenu,SIGNAL(clicked(const KcmTreeItem*)),this,SLOT(itemClickedSlot(const KcmTreeItem*))); - - //SearchBox - connect(m_searchText, &QLineEdit::textChanged, m_sideMenu, &SidePanel::filterSideMenuSlot); - connect(m_searchAction, SIGNAL(triggered()),m_searchText,SLOT(setFocus())); - - //Buttons - connect(m_moduleHelpAction, &QAction::triggered,this,&KInfoCenter::helpClickedSlot); - - //Menu - connect(m_aboutKcm, &QAction::triggered, this, &KInfoCenter::aboutKcmSlot); - - //Startup - m_searchText->completionObject()->setItems(m_sideMenu->allChildKeywords()); - m_sideMenu->setFocus(Qt::OtherFocusReason); - m_sideMenu->changeToFirstValidItem(); - - m_toolTips = new ToolTipManager(m_sideMenu); - setupGUI(QSize(800,600), ToolBar | Keys | Save | Create, QStringLiteral("kinfocenterui.rc")); - - delete m_helpAction->menu(); - m_helpAction->setMenu( dynamic_cast( factory()->container(QStringLiteral("help"), this) ) ); - menuBar()->hide(); - - QAction *aboutApp = actionCollection()->action(QStringLiteral("help_about_app")); - aboutApp->setIcon(QIcon::fromTheme(QStringLiteral("hwinfo"))); -} - -KInfoCenter::~KInfoCenter() -{ - delete m_toolTips; - - //TreeWidget - disconnect(m_sideMenu,SIGNAL(clicked(const KcmTreeItem*)),this,SLOT(itemClickedSlot(const KcmTreeItem*))); - - //SearchBox - disconnect(m_searchText, &QLineEdit::textChanged, m_sideMenu, &SidePanel::filterSideMenuSlot); - disconnect(m_searchAction, SIGNAL(triggered()),m_searchText, SLOT(setFocus())); - - //Buttons - disconnect(m_moduleHelpAction, &QAction::triggered, this, &KInfoCenter::helpClickedSlot); - - //Menu - disconnect(m_aboutKcm, &QAction::triggered, this, &KInfoCenter::aboutKcmSlot); -} - -bool KInfoCenter::eventFilter(QObject *watched, QEvent *event) -{ - if (watched == m_sideMenu && event->type() == QEvent::Move) { - m_contain->setKcmTopEdge(m_sideMenu->y()); - } - return false; -} - -void KInfoCenter::createToolBar() -{ - KStandardAction::quit(this, &KInfoCenter::close, actionCollection()); - KStandardAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection()); - - toolBar()->setMovable(false); - - m_aboutKcm = actionCollection()->addAction(QStringLiteral("help_about_module")); - m_aboutKcm->setText(i18nc("Information about current module located in about menu","About Current Information Module")); - m_aboutKcm->setIcon(QIcon::fromTheme(QStringLiteral("help-about"))); - m_aboutKcm->setEnabled(false); - - m_moduleHelpAction = new QAction(this); - m_moduleHelpAction->setText(i18nc("Module help button label", "Module Help")); - m_moduleHelpAction->setIcon(QIcon::fromTheme(QStringLiteral("help-contextual"))); - - m_helpAction = new KActionMenu( QIcon::fromTheme(QStringLiteral("help-contents")), i18nc("Help button label","Help"), this ); - m_helpAction->setDelayed( false ); - - actionCollection()->addAction(QStringLiteral("helpModule"), m_moduleHelpAction); - actionCollection()->addAction(QStringLiteral("helpMenu"), m_helpAction); -} - -void KInfoCenter::createMainFrame() -{ - QWidget *mainDisplay = new QWidget(); - mainDisplay->setContentsMargins(0,0,0,0); - - QHBoxLayout *mainLayout = new QHBoxLayout(mainDisplay); - - m_splitter = new QSplitter(m_cWidget); - m_splitter->setContentsMargins(0, 0, 0, 0); - m_splitter->setHandleWidth(5); - mainLayout->addWidget(m_splitter); - - createMenuFrame(); - - m_contain = new KcmContainer(m_splitter); - m_splitter->addWidget(m_contain); - - m_splitter->setStretchFactor(0, 0); - m_splitter->setStretchFactor(1, 1); - - m_cWidget->layout()->addWidget(mainDisplay); -} - -void KInfoCenter::createMenuFrame() -{ - QWidget *sideFrame = new QWidget(m_splitter); - sideFrame->setContentsMargins(0,0,0,0); - - QVBoxLayout *menuLayout = new QVBoxLayout(sideFrame); - menuLayout->setContentsMargins(0, 0, 0, 0); - - m_searchText = new KLineEdit(sideFrame); - m_searchText->setClearButtonEnabled(true); - m_searchText->setPlaceholderText( i18nc( "Search Bar Click Message", "Search" ) ); - m_searchText->setCompletionMode( KCompletion::CompletionPopup ); - m_searchText->completionObject()->setIgnoreCase(true); - - m_searchAction = new QAction(this); - m_searchAction->setText(i18nc("Kaction search label", "Search Modules")); - m_searchAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find"))); - - actionCollection()->addAction(QStringLiteral("search"),m_searchAction); - actionCollection()->setDefaultShortcut(m_searchAction, QKeySequence(Qt::CTRL + Qt::Key_F)); - - m_sideMenu = new SidePanel(sideFrame); - m_sideMenu->installEventFilter(this); - connect(m_sideMenu, &SidePanel::clearSearchLine, this, &KInfoCenter::clearSearchLine); - - menuLayout->addWidget(m_searchText); - menuLayout->addWidget(m_sideMenu); - m_splitter->addWidget(sideFrame); -} - -void KInfoCenter::clearSearchLine() -{ - m_searchText->clear(); -} - -void KInfoCenter::itemClickedSlot(const KcmTreeItem *item) -{ - if (item != m_kcmItem) { - resetCondition(); - if(item->type() != KcmTreeItem::CATEGORY) { - setKcm(item); - } - } - m_kcmItem = item; -} - -void KInfoCenter::setKcm(const KcmTreeItem *kcmItem) -{ - m_contain->setKcm(kcmItem->kcm()); - - setButtons(m_contain->buttons()); - m_aboutKcm->setEnabled(true); -} - -void KInfoCenter::setButtons(const KCModule::Buttons buttons) -{ - if (buttons & KCModule::Help && !m_contain->helpPath().isEmpty()) { - m_moduleHelpAction->setEnabled(true); - } -} - -void KInfoCenter::resetCondition() -{ - m_moduleHelpAction->setEnabled(false); - - m_aboutKcm->setEnabled(false); -} - -void KInfoCenter::helpClickedSlot() -{ - // Nicked from Ben, could not use KToolInvocation due to docpath. - QString docPath = m_contain->helpPath(); - - QUrl url(QStringLiteral("help:/") + docPath ); - QProcess::startDetached(QStringLiteral("khelpcenter"), QStringList() << url.url()); -} - -void KInfoCenter::aboutKcmSlot() -{ - KAboutApplicationDialog kcmAboutDialog(*(m_contain->kcmAboutData())); - kcmAboutDialog.exec(); -} - -void KInfoCenter::showError(QWidget *parent, const QString& errorMessage) -{ - KMessageBox::sorry(parent, errorMessage); -} diff --git a/infocenter.h b/infocenter.h deleted file mode 100644 index 22ceb36..0000000 --- a/infocenter.h +++ /dev/null @@ -1,160 +0,0 @@ - -/* - * infocenter.h - * - * Copyright (C) 2010 David Hubner - * - * 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 INFOCENTER -#define INFOCENTER - -//KDE -#include -#include -#include -#include -#include - -//QT -#include -#include -#include -#include -#include - -//Local -#include "sidepanel.h" -#include "kcmcontainer.h" -#include "infokcmmodel.h" -#include "kcmtreeitem.h" -#include "tooltipmanager.h" - -class KcmContainer; -class ToolTipManager; -class KcmTreeItem; - -class KInfoCenter : public KXmlGuiWindow -{ - Q_OBJECT - - public: - - /** - * Create KInfoCenter main window - */ - KInfoCenter(); - - /** - * Destory KInfoCenter object - */ - ~KInfoCenter() override; - - /** - * Event filter to move KCMContainer to be level with - * the side menu. - * - * @param watched object being watched - * @param event event object containing event information - */ - bool eventFilter(QObject *watched, QEvent *event) override; - - public Q_SLOTS: - - /** - * Triggered when mouse is clicked on a treeview item - * - * @param item item selected via mouse - */ - void itemClickedSlot(const KcmTreeItem *item); - - /** - * Triggered when help toolbar action is used. - */ - void helpClickedSlot(); - - /** - * Triggered when the about KCM action is used - * in the help menu. - */ - void aboutKcmSlot(); - - /** - * Show a error message box - * - * @param parent parent object - * @param errorMessage error message text - */ - static void showError(QWidget *parent, const QString& errorMessage); - - private: - - /** - * Create main window and splitter - */ - void createMainFrame(); - - /** - * Create top toolbar on main window and setup toolbar - * actions. - */ - void createToolBar(); - - /** - * Create side menu frame including search bar - */ - void createMenuFrame(); - - /** - * Detect if export and help buttons should be enabled - * - * @param buttons buttons to check - */ - void setButtons(const KCModule::Buttons buttons); - - /** - * Load KCM into KCMContainer - * - * @param kcmItem KCM to be loaded - */ - void setKcm(const KcmTreeItem *kcmItem); - - /** - * Set enable state on KCM About menu action, - * export toolbar action and help toolbar action. - */ - void resetCondition(); - - void clearSearchLine(); - - const KcmTreeItem *m_kcmItem = nullptr; - KcmContainer *m_contain = nullptr; - QSplitter *m_splitter = nullptr; - - QAction *m_aboutKcm = nullptr; - QAction *m_searchAction = nullptr; - QAction *m_moduleHelpAction = nullptr; - KActionMenu *m_helpAction = nullptr; - - QWidget *m_cWidget = nullptr; - KLineEdit *m_searchText = nullptr; - - SidePanel *m_sideMenu = nullptr; - ToolTipManager *m_toolTips = nullptr; -}; - -#endif //INFOCENTER diff --git a/infokcmmodel.cpp b/infokcmmodel.cpp deleted file mode 100644 index f9759a0..0000000 --- a/infokcmmodel.cpp +++ /dev/null @@ -1,233 +0,0 @@ - -/* - * infokcmmodel.h - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "infokcmmodel.h" -#include "kcmcategoryitem.h" - -//KDE -#include -#include -#include - -InfoKcmModel::InfoKcmModel(QObject *parent) - : QAbstractItemModel(parent), - m_root(new KcmCategoryItem(i18n("Information Modules"))) -{ - createTreeItems(); -} - -InfoKcmModel::~InfoKcmModel() -{ - delete m_root; -} - -void InfoKcmModel::createTreeItems() -{ - const KService::List categoryList = KServiceTypeTrader::self()->query(QStringLiteral("KInfoCenterCategory")); - - for(const KService::Ptr &categoryModule : categoryList) { - m_root->addChild(new KcmCategoryItem(categoryModule,m_root)); - } - - const KService::List moduleList = KServiceTypeTrader::self()->query(QStringLiteral("KCModule"), QStringLiteral("[X-KDE-ParentApp] == 'kinfocenter'")); - - for (const KService::Ptr &kcmModule : moduleList) { - if (kcmModule->isType(KST_KService) == true) { - - QString category = kcmModule->property(QStringLiteral("X-KDE-KInfoCenter-Category")).toString().trimmed(); - - if(!category.isEmpty() || !category.isNull()) { - KcmTreeItem *item = m_root->containsCategory(category); - if(item != nullptr) { - item->addChild(new KcmTreeItem(kcmModule,item)); - } else { - KcmTreeItem *lost = m_root->containsCategory(QStringLiteral("lost_and_found")); - if(lost != nullptr) { - lost->addChild(new KcmTreeItem(kcmModule,lost)); - } else { - qWarning() << "Lost and found category not found, unable to display lost Kcontrol modules"; - } - } - } else { - m_root->addChild(new KcmTreeItem(kcmModule,m_root)); - } - } - } -} - -QModelIndex InfoKcmModel::index(int row, int column, const QModelIndex &parent) const -{ - KcmTreeItem *parentItem; - - if (!parent.isValid()) { - parentItem = m_root; - } else { - parentItem = static_cast(parent.internalPointer()); - } - - KcmTreeItem *childItem = parentItem->child(row); - - if (childItem) { - return createIndex(row, column, childItem); - } - return QModelIndex(); -} - -QModelIndex InfoKcmModel::index(int row, int column, KcmTreeItem *parent) const -{ - KcmTreeItem *childItem = parent->child(row); - - if (childItem) { - return createIndex(row, column, childItem); - } - return QModelIndex(); -} - -QModelIndex InfoKcmModel::parent(const QModelIndex &index) const -{ - if (!index.isValid()) { - return QModelIndex(); - } - - KcmTreeItem *child = static_cast(index.internalPointer()); - KcmTreeItem *parent = child->parent(); - - if (parent == m_root) { - return QModelIndex(); - } - - return createIndex(parent->row(), 0, parent); -} - -QModelIndex InfoKcmModel::indexOf(KcmTreeItem *item) -{ - QModelIndex tmpIndex = createIndex(item->row(), 0, item); - - if(!tmpIndex.isValid()) { - return QModelIndex(); - } - return tmpIndex; -} - -int InfoKcmModel::rowCount(const QModelIndex &parent) const -{ - KcmTreeItem *parentItem; - - if (!parent.isValid()) { - parentItem = m_root; - } else { - parentItem = static_cast(parent.internalPointer()); - } - - return parentItem->childCount(); -} - -int InfoKcmModel::columnCount(const QModelIndex &parent) const -{ - // Hard coded, menu should never have more than one column - - Q_UNUSED(parent); - return 1; -} - -QVariant InfoKcmModel::data(const QModelIndex &index, int role) const -{ - if (!index.isValid()) { - return QVariant(); - } - - KcmTreeItem *item = static_cast(index.internalPointer()); - - switch(role) { - case Qt::DisplayRole: - return item->data(); - case Qt::UserRole: - return item->weight(); - case Qt::DecorationRole: - return QIcon::fromTheme(item->iconName()); - default: - return QVariant(); - } -} - -QVariant InfoKcmModel::headerData(int section, Qt::Orientation orientation, int role) const -{ - Q_UNUSED(section); - - if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { - return m_root->data(); - } - - return QVariant(); -} - -Qt::ItemFlags InfoKcmModel::flags(const QModelIndex &index) const -{ - if (!index.isValid()) { - return Qt::ItemIsEnabled; - } - - return Qt::ItemIsEnabled | Qt::ItemIsSelectable; -} - -QModelIndex InfoKcmModel::firstValid() const -{ - int rows = m_root->childCount(); - - // Massive large number to max compare - unsigned int winner = 0; winner--; - - QModelIndex winnerIndex = QModelIndex(); - - for(int i=0;ichild(i); - if(item->type() == KcmTreeItem::KCM) { - if(winner >= (unsigned int)item->weight()) { - winner = item->weight(); - winnerIndex = index(item->row(),0,item->parent()); - } - } - } - return winnerIndex; -} - -QStringList InfoKcmModel::allChildrenKeywords() -{ - return childrenKeywords(m_root); -} - -QStringList InfoKcmModel::childrenKeywords(KcmTreeItem *kcmItem) -{ - QStringList childKeywords; - - int rows = kcmItem->childCount(); - for(int i=0;ichild(i); - if(item->type() == KcmTreeItem::CATEGORY) { - childKeywords = childKeywords + childrenKeywords(item); - } else { - childKeywords = childKeywords + item->keywords(); - } - } - return childKeywords; -} diff --git a/infokcmmodel.h b/infokcmmodel.h deleted file mode 100644 index 13c81dd..0000000 --- a/infokcmmodel.h +++ /dev/null @@ -1,136 +0,0 @@ - -/* - * infokcmmodel.h - * - * Copyright (C) 2010 David Hubner - * - * 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 INFOKCMMODEL -#define INFOKCMMODEL - -//KDE -#include - -//QT -#include -#include -#include -#include -#include -#include - -//Local -#include "kcmtreeitem.h" - -class KcmTreeItem; - -class InfoKcmModel : public QAbstractItemModel -{ - Q_OBJECT - - public: - - /** - * Create InfoKcmModel object. - * Abstract data model to display KCM's for a tree view - * - * @param parent objects parent - */ - explicit InfoKcmModel(QObject *parent); - - ~InfoKcmModel() override; - - /** - * Get index of item in model - * - * @param row row position - * @param column column position - * @param parent parent of object - * @return index of object - */ - QModelIndex index(int row, int column, const QModelIndex& parent) const override; - QModelIndex index(int row, int column, KcmTreeItem *parent) const; - - /** - * Get parent of item in model - */ - QModelIndex parent(const QModelIndex& index) const override; - - /** - * Get amount of rows under parent - */ - int rowCount(const QModelIndex& parent) const override; - - /** - * Get amount of columns under parent - */ - int columnCount(const QModelIndex& parent) const override; - - /** - * Get the stored data for a role - * - * @param index objects index - * @param role role to retrieve data about - */ - QVariant data(const QModelIndex& index, int role) const override; - - /** - * Get header information - */ - QVariant headerData(int, Qt::Orientation, int) const override; - - /** - * Get set flags for a treeitem - */ - Qt::ItemFlags flags(const QModelIndex &) const override; - - /** - * Get the first valid item on the treeview - * Checks main root items only - * - * @return index of valid item - */ - QModelIndex firstValid() const; - - /** - * Get all KCM keywords for all KCMs stored in the model - */ - QStringList allChildrenKeywords(); - - /** - * Get QModelIndex of a KcmTreeItem - */ - QModelIndex indexOf(KcmTreeItem *item); - - private: - - /** - * Init tree items - */ - void createTreeItems(); - - /** - * Get a certain KCM's keywords - */ - QStringList childrenKeywords(KcmTreeItem *kcmItem); - - KService::List m_moduleList; - KcmTreeItem *m_root; -}; - -#endif // INFOKCMMODEL diff --git a/infokcmproxymodel.cpp b/infokcmproxymodel.cpp deleted file mode 100644 index 127322f..0000000 --- a/infokcmproxymodel.cpp +++ /dev/null @@ -1,56 +0,0 @@ - -/* - * infokcmproxymodel.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "infokcmproxymodel.h" - - -InfoKcmProxyModel::InfoKcmProxyModel(QObject *parent) : QSortFilterProxyModel(parent) -{ - setSortRole(Qt::UserRole); -} - -bool InfoKcmProxyModel::lessThan(const QModelIndex &leftIndex, const QModelIndex &rightIndex) const -{ - if(!leftIndex.isValid() && !rightIndex.isValid()) { - return true; - } - - KcmTreeItem *leftItem = static_cast(leftIndex.internalPointer()); - KcmTreeItem *rightItem = static_cast(rightIndex.internalPointer()); - - return (leftItem->weight() < rightItem->weight()); -} - -bool InfoKcmProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const -{ - QModelIndex index=sourceModel()->index(sourceRow, 0, sourceParent); - KcmTreeItem *indexItem = static_cast(index.internalPointer()); - - if(indexItem->type() == KcmTreeItem::CATEGORY) { - if(indexItem->childrenRegExp(filterRegExp()) == true) { - return true; - } - } - - return !indexItem->keywords().filter(filterRegExp()).isEmpty(); -} diff --git a/infokcmproxymodel.h b/infokcmproxymodel.h deleted file mode 100644 index 9c43467..0000000 --- a/infokcmproxymodel.h +++ /dev/null @@ -1,61 +0,0 @@ - -/* - * infokcmproxymodel.h - * - * Copyright (C) 2010 David Hubner - * - * 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 INFOKCMPROXYMODEL -#define INFOKCMPROXYMODEL - -//QT -#include -#include -#include - -//Local -#include "kcmtreeitem.h" - -class InfoKcmProxyModel : public QSortFilterProxyModel -{ - public: - - /** - * Create InfoKcMProxyModel object. Used to filter out - * and sort a tree view. - * - * @param parent objects parent - */ - explicit InfoKcmProxyModel(QObject *parent); - - /** - * Check if left item is less than right item - * Uses X-KDE-Weight for measurements - */ - bool lessThan(const QModelIndex &, const QModelIndex &) const override; - - private: - - /** - * Filter out rows - * Used in search implementation - */ - bool filterAcceptsRow(int, const QModelIndex &) const override; -}; - -#endif // INFOKCMPROXYMODEL diff --git a/kcmcategoryitem.cpp b/kcmcategoryitem.cpp deleted file mode 100644 index 9b80356..0000000 --- a/kcmcategoryitem.cpp +++ /dev/null @@ -1,85 +0,0 @@ - -/* - * kcmcategoryitem.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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 "kcmcategoryitem.h" - -KcmCategoryItem::KcmCategoryItem(const KService::Ptr &module, KcmTreeItem *parent) : - KcmTreeItem(module, parent) -{ -} - -KcmCategoryItem::KcmCategoryItem(const QString& categoryName) : - KcmTreeItem(), m_category(categoryName) -{ -} - -QString KcmCategoryItem::data() const -{ - if(m_category.isEmpty()) { - return m_moduleInfo->moduleName(); - } - - return category(); -} - -KcmTreeItem::itemType KcmCategoryItem::type() const -{ - return CATEGORY; -} - -QString KcmCategoryItem::category() const -{ - if(m_category.isEmpty()) - { - return m_module->property(QStringLiteral("X-KDE-KInfoCenter-Category")).toString().trimmed(); - } - return m_category; -} - -KCModuleInfo KcmCategoryItem::kcm() const -{ - return KCModuleInfo(); -} - -int KcmCategoryItem::weight() const -{ - return (category().count() + 1000); -} - -QString KcmCategoryItem::iconName() const -{ - if(m_category.isEmpty()) - { - return m_moduleInfo->icon(); - } - return QString(); -} - -QString KcmCategoryItem::whatsThis() const -{ - return QString(); -} - -QStringList KcmCategoryItem::keywords() const -{ - return QStringList(); -} diff --git a/kcmcategoryitem.h b/kcmcategoryitem.h deleted file mode 100644 index b42b10b..0000000 --- a/kcmcategoryitem.h +++ /dev/null @@ -1,98 +0,0 @@ - -/* - * kcmcategoryitem.h - * - * Copyright (C) 2010 David Hubner - * - * 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 KCMCATEGORYITEM -#define KCMCATEGORYITEM - -#include "kcmtreeitem.h" - -//KDE -#include -#include - -class KcmCategoryItem : public KcmTreeItem -{ - public: - - /** - * Category Tree Item for InfoKcmModel. Holds information about a Category - * - * @param module pointer to KCM module - * @param parent objects parent - */ - explicit KcmCategoryItem(const KService::Ptr &module, KcmTreeItem *parent=nullptr); - - /** - * Category Tree Item for InfoKcmModel. Holds information about a Category - * - * @note Used for root folder objects - */ - explicit KcmCategoryItem(const QString& category); - - /** - * Get data of tree item - */ - QString data() const override; - - /** - * Get category of tree item. - * Set in X-KDE-KInfoCenter-Category - */ - QString category() const override; - - /** - * Gets the item type. - */ - itemType type() const override; - - /** - * Get tree item KCMs Data - */ - KCModuleInfo kcm() const override; - - /** - * Get tree items KCM's weight - */ - int weight() const override; - - /** - * Get icon tied to KCM - */ - QString iconName() const override; - - /** - * Get whatsThis information from KCM - */ - QString whatsThis() const override; - - /** - * Get KCM tree item keywords - */ - QStringList keywords() const override; - - private: - - const QString m_category; -}; - -#endif //KCMCATEGORYITEM - diff --git a/kcmcontainer.cpp b/kcmcontainer.cpp deleted file mode 100644 index 25fbb13..0000000 --- a/kcmcontainer.cpp +++ /dev/null @@ -1,146 +0,0 @@ - -/* - * kcmcontainer.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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 "kcmcontainer.h" - -//KDE -#include - -//QT -#include -#include -#include - -KcmContainer::KcmContainer(QWidget *parent) : QScrollArea(parent), m_titleLabel(nullptr), - m_centerWidget(nullptr), m_mod(nullptr), m_kcmTopEdge(-1) -{ - setWidgetResizable( true ); - setFrameStyle( QFrame::NoFrame ); - - setContainerLayout(); -} - -KcmContainer::~KcmContainer() -{ - delete m_mod; -} - -void KcmContainer::setContainerLayout() -{ - if (!m_mod && m_centerWidget) { - // we have no module, but a widget set up for one, - // so just return for now - return; - } - - m_mod = nullptr; // will be deleted on the line below - delete m_centerWidget; - m_centerWidget = new QWidget(this); - m_centerWidget->setContentsMargins(0,0,0,0); - - QVBoxLayout *centerWidgetLayout = new QVBoxLayout(m_centerWidget); - centerWidgetLayout->setContentsMargins(0, 0, 0, 0); - - QFont font; - // Adapted from KTitleWidget to match KCM qml title size - font.setPointSize(qRound(QApplication::font().pointSize() * 1.6)); - - m_titleLabel = new QLabel(m_centerWidget); - m_titleLabel->setFont(font); - m_titleLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - m_titleLabel->setContentsMargins(style()->pixelMetric(QStyle::PM_DefaultFrameWidth), 0, 0, 0); - m_titleLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - - centerWidgetLayout->addWidget(m_titleLabel); - setWidget(m_centerWidget); - m_centerWidget->setAutoFillBackground(false); - setKcmTopEdge(m_kcmTopEdge); -} - -void KcmContainer::setKcm(const KCModuleInfo &info) -{ - setContainerLayout(); - - m_mod = new KCModuleProxy(info); - m_modInfo = info; - - // Adpated from systemsettings ModuleView::updatePageIconHeader similar hack - if (!m_mod->realModule()->inherits("KCModuleQml") ) { - m_centerWidget->setContentsMargins(5,5,5,5); - } - - setKcmTitle(info); - - m_mod->setWhatsThis(m_mod->quickHelp()); - m_centerWidget->layout()->addWidget(m_mod); -} - -void KcmContainer::setKcmTopEdge(int y) -{ - m_kcmTopEdge = y; - if (m_kcmTopEdge < 0) { - return; - } - - if (m_titleLabel) { - int spacing = style()->layoutSpacing(QSizePolicy::DefaultType, QSizePolicy::DefaultType, Qt::Vertical); - m_titleLabel->setMinimumHeight(m_kcmTopEdge - spacing); - } -} - -void KcmContainer::setKcmTitle(const KCModuleInfo &info) -{ - //HACK: not much other ways to detect is a qml kcm - // Adpated from systemsettings ModuleView::updatePageIconHeader similar hack - if (m_mod->realModule()->inherits("KCModuleQml") ) { - m_titleLabel->setVisible(false); - } - m_titleLabel->setText(info.comment()); -} - -QString KcmContainer::helpPath() const -{ - if(m_mod == nullptr) { - return QString(); - } - return m_modInfo.docPath(); -} - -KCModule::Buttons KcmContainer::buttons() const -{ - return m_mod->buttons(); -} - -const KAboutData *KcmContainer::kcmAboutData() const -{ - return m_mod->aboutData(); -} - -QString KcmContainer::name() const -{ - return m_modInfo.moduleName(); -} - -QString KcmContainer::fileName() const -{ - return m_modInfo.fileName(); -} diff --git a/kcmcontainer.h b/kcmcontainer.h deleted file mode 100644 index 28abc73..0000000 --- a/kcmcontainer.h +++ /dev/null @@ -1,114 +0,0 @@ - -/* - * kcmcontainer.h - * - * Copyright (C) 2010 David Hubner - * - * 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 KCMCONTAINER -#define KCMCONTAINER - -//KDE -#include -#include -#include -#include - -//QT -#include -#include -#include -#include - -class KcmContainer : public QScrollArea -{ - public: - - /** - * Widget to display and receive information - * about displayed KCM. - * - * @param parent objects parent - */ - explicit KcmContainer(QWidget *parent); - - /** - * Destory KCMContainer - */ - ~KcmContainer(); - - /** - * Set and show KCM in KCMContainer window - */ - void setKcm(const KCModuleInfo &); - - /** - * Move KCMContainer top edge to a certain position - * - * @param y y coordinates of top edge - */ - void setKcmTopEdge(int y); - - /** - * Get currently selected KCMs document path - * for .desktop - * X-KDE-DocPath - */ - QString helpPath() const; - - /** - * Get currently selected KCMs - * information on which buttons need to be shown - */ - KCModule::Buttons buttons() const; - - /** - * Get about data for currently selected KCM - */ - const KAboutData *kcmAboutData() const; - - /** - * Get currently selected KCMs name - */ - QString name() const; - - /** - * Get currently selected KCMs .desktop file name - */ - QString fileName() const; - - private: - - /** - * Init and set KCMContainer Layout - */ - void setContainerLayout(); - - /** - * Set top title in KCMContainer - */ - void setKcmTitle(const KCModuleInfo &); - - QLabel *m_titleLabel; - QWidget *m_centerWidget; - KCModuleProxy *m_mod; - KCModuleInfo m_modInfo; - int m_kcmTopEdge; -}; - -#endif //KCMCONTAINER diff --git a/kcmtreeitem.cpp b/kcmtreeitem.cpp deleted file mode 100644 index 49dc574..0000000 --- a/kcmtreeitem.cpp +++ /dev/null @@ -1,154 +0,0 @@ - -/* - * kcmtreeitem.h - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "kcmtreeitem.h" - -KcmTreeItem::KcmTreeItem(const KService::Ptr &module, KcmTreeItem *parent) : m_parent(parent), m_module(module), - m_moduleInfo(new KCModuleInfo(m_module)) -{ -} - -KcmTreeItem::KcmTreeItem() : m_parent(nullptr), m_moduleInfo(new KCModuleInfo()) -{ -} - -KcmTreeItem::~KcmTreeItem() -{ - qDeleteAll(m_children); - delete m_moduleInfo; -} - -void KcmTreeItem::addChild(KcmTreeItem *child) -{ - m_children.append(child); -} - -KcmTreeItem *KcmTreeItem::child(const int row) -{ - if(childCount() > row) { - return m_children.value(row); - } - return nullptr; -} - -int KcmTreeItem::childCount() const -{ - return m_children.count(); -} - -int KcmTreeItem::columnCount() const -{ - // Hard coded, menu should never have more than one column - return 1; -} - -KcmTreeItem *KcmTreeItem::parent() const -{ - return m_parent; -} - -int KcmTreeItem::row() -{ - if (m_parent) { - return indexOf(const_cast(this)); - } - - return 0; -} - -int KcmTreeItem::indexOf(KcmTreeItem *item) -{ - if (m_parent) { - return m_parent->m_children.indexOf(item); - } - - return 0; -} - -QString KcmTreeItem::data() const -{ - return m_moduleInfo->moduleName(); -} - -QString KcmTreeItem::category() const -{ - return m_module->property(QStringLiteral("X-KDE-KInfoCenter-Category")).toString().trimmed(); -} - -KcmTreeItem::itemType KcmTreeItem::type() const -{ - return KCM; -} - -KcmTreeItem *KcmTreeItem::containsCategory(const QString& category) -{ - foreach(KcmTreeItem *item, m_children) { - if(item->type() == CATEGORY) { - if(item->category().contains(category)) { - return item; - } - if(item->containsCategory(category)) { - return item; - } - } - } - return nullptr; -} - -KCModuleInfo KcmTreeItem::kcm() const -{ - return *m_moduleInfo; -} - -int KcmTreeItem::weight() const -{ - return m_moduleInfo->weight(); -} - -QString KcmTreeItem::iconName() const -{ - return m_moduleInfo->icon(); -} - -QString KcmTreeItem::whatsThis() const -{ - return m_moduleInfo->comment(); -} - -bool KcmTreeItem::childrenRegExp(const QRegExp& pattern) -{ - foreach(KcmTreeItem *item, m_children) { - if(item->keywords().filter(pattern).count() > 0) { - return true; - } - } - return false; -} - -QStringList KcmTreeItem::keywords() const -{ - if(m_moduleInfo->keywords().isEmpty()) { - return QStringList(data()); - } - return m_moduleInfo->keywords(); -} diff --git a/kcmtreeitem.h b/kcmtreeitem.h deleted file mode 100644 index e5ee1d1..0000000 --- a/kcmtreeitem.h +++ /dev/null @@ -1,165 +0,0 @@ - -/* - * kcmtreeitem.h - * - * Copyright (C) 2010 David Hubner - * - * 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 KCMTREEITEM -#define KCMTREEITEM - -//KDE -#include -#include - -//QT -#include -#include - -class KcmTreeItem -{ - public: - - /** - * KCM Tree Item for InfoKcmModel. Holds information about a KCM - * - * @param module pointer to KCM module - * @param parent objects parent - */ - explicit KcmTreeItem(const KService::Ptr &module, KcmTreeItem *parent=nullptr); - - /** - * KCM Tree Item for InfoKcmModel. Holds information about a KCM - * - * @note Used for root folder objects - * - */ - KcmTreeItem(); - - /** - * Enumeration of the possible tree item types - * - */ - enum itemType { KCM=0, CATEGORY }; - - /** - * Destory KcmTreeItem - */ - virtual ~KcmTreeItem(); - - /** - * Add child tree item to parent - */ - void addChild(KcmTreeItem *); - - /** - * Get child tree item - * - * @param row row where child is located - */ - KcmTreeItem *child(const int row); - - /** - * Get amount of children - */ - int childCount() const; - - /** - * Get parent of current tree item - */ - KcmTreeItem *parent() const; - - /** - * Get index of tree item - */ - int indexOf(KcmTreeItem *); - - /** - * Get amount of columns that tree item contains. - * Hardcoded to 1 - */ - int columnCount() const; - - /** - * Get row of tree item - */ - int row(); - - /** - * Get data of tree item - */ - virtual QString data() const; - - /** - * Get category of tree item. - * Set in X-KDE-KInfoCenter-Category - */ - virtual QString category() const; - - /** - * Gets the item type. - */ - virtual itemType type() const; - - /** - * Check if children of tree item contains a category. - * Used in search implementation - */ - KcmTreeItem *containsCategory(const QString&); - - /** - * Get tree item KCMs Data - */ - virtual KCModuleInfo kcm() const; - - /** - * Get tree items KCM's weight - */ - virtual int weight() const; - - /** - * Get icon tied to KCM - */ - virtual QString iconName() const; - - /** - * Get whatsThis information from KCM - */ - virtual QString whatsThis() const; - - /** - * Check if there are any children tree items keywords that - * have a certain regexp pattern - */ - bool childrenRegExp(const QRegExp& pattern); - - /** - * Get KCM tree item keywords - */ - virtual QStringList keywords() const; - - protected: - - QList m_children; - KcmTreeItem *m_parent; - const KService::Ptr m_module; - - const KCModuleInfo *m_moduleInfo; -}; - -#endif // KCMTREEITEM diff --git a/kinfocenterui.rc b/kinfocenterui.rc deleted file mode 100644 index bc25e73..0000000 --- a/kinfocenterui.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/main.cpp b/main.cpp deleted file mode 100644 index 0feb8fd..0000000 --- a/main.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -/* - * main.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "main.h" - -//KDE -#include -#include -#include -#include -#include -#include - -//Qt -#include - -KicApp::KicApp(int &argc, char **argv) - : QApplication(argc, argv) -{ - QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - KLocalizedString::setApplicationDomain("kinfocenter"); - - const auto displayName = i18n("Info Center"); - KAboutData aboutData( QStringLiteral("kinfocenter"), displayName, - QLatin1String(PROJECT_VERSION), displayName, KAboutLicense::GPL, - i18n("Copyright 2009-2018 KDE")); - - aboutData.addAuthor(i18n("David Hubner"),i18n("Current Maintainer"), QStringLiteral("hubnerd@ntlworld.com")); - aboutData.addAuthor(i18n("Helge Deller"), i18n("Previous Maintainer"), QStringLiteral("deller@kde.org")); - aboutData.addAuthor(i18n("Matthias Hoelzer-Kluepfel"),QString(), QStringLiteral("hoelzer@kde.org")); - aboutData.addAuthor(i18n("Matthias Elter"), QString(), QStringLiteral("elter@kde.org")); - aboutData.addAuthor(i18n("Matthias Ettrich"), QString(), QStringLiteral("ettrich@kde.org")); - aboutData.addAuthor(i18n("Waldo Bastian"), QString(), QStringLiteral("bastian@kde.org")); - aboutData.addAuthor(i18n("Nicolas Ternisien"), QString(), QStringLiteral("nicolas.ternisien@gmail.com")); - KAboutData::setApplicationData(aboutData); - QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("hwinfo"))); - - QCommandLineParser parser; - aboutData.setupCommandLine(&parser); - parser.process(*this); - aboutData.processCommandLine(&parser); - - auto *service = new KDBusService(KDBusService::Unique, this); - - display = new KInfoCenter(); - display->show(); - - connect(service, &KDBusService::activateRequested, this, [this]() { - KWindowSystem::forceActiveWindow(display->winId()); - }); -} - -int main(int argc, char *argv[]) -{ - KicApp Kic(argc, argv); - - KCrash::initialize(); - - return Kic.exec(); -} diff --git a/main.h b/main.h deleted file mode 100644 index b41318b..0000000 --- a/main.h +++ /dev/null @@ -1,48 +0,0 @@ - -/* - * main.h - * - * Copyright (C) 2010 David Hubner - * - * 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 INFOCENTERMAIN -#define INFOCENTERMAIN - -//KDE -#include - -//Local -#include "infocenter.h" - -class KInfoCenter; - -class KicApp : public QApplication { - - Q_OBJECT - - public: - /** - * Init main window of application - */ - KicApp(int &argc, char **argv); - - private: - KInfoCenter *display; -}; - -#endif // INFOCENTERMAIN diff --git a/sidepanel.cpp b/sidepanel.cpp deleted file mode 100644 index d6f736f..0000000 --- a/sidepanel.cpp +++ /dev/null @@ -1,145 +0,0 @@ - -/* - * sidepanel.cpp - * - * Copyright (C) 2010 David Hubner - * - * 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. - * - */ - -//Local -#include "sidepanel.h" - -//KDE -#include - -//QT -#include -#include -#include - -SidePanel::SidePanel(QWidget *parent) - : QTreeView(parent) -{ - setHeaderHidden(true); - setSortingEnabled(true); - setAnimated(true); - sortByColumn(0, Qt::AscendingOrder); - m_model = new InfoKcmModel(this); - - m_proxyModel = new InfoKcmProxyModel(this); - m_proxyModel->setSourceModel(m_model); - - createMenuActions(); - - setMouseTracking(true); - setModel(m_proxyModel); - // Mind that activated does not include clicked when the system is in - // double-click mode https://bugs.kde.org/show_bug.cgi?id=405373 - connect(this, &QAbstractItemView::clicked, this, &SidePanel::clickedSlot); - connect(this, &QAbstractItemView::activated, this, &SidePanel::clickedSlot); -} - -SidePanel::~SidePanel() -{ - delete m_proxyModel; - delete m_model; -} - -void SidePanel::clickedSlot(const QModelIndex &index) -{ - if(index.isValid() == false) { - return; - } - - const KcmTreeItem *item = static_cast(m_proxyModel->mapToSource(index).internalPointer()); - emit clicked(item); -} - -void SidePanel::changeToFirstValidItem() -{ - QModelIndex rootIndex = m_proxyModel->mapFromSource(m_model->firstValid()); - if(rootIndex.isValid() == false) { - return; - } - - setCurrentIndex(rootIndex); - emit clickedSlot(rootIndex); -} - -QModelIndex SidePanel::mapToProxySource(const QModelIndex& index) -{ - QModelIndex tmp = m_proxyModel->mapToSource(index); - - if(tmp.isValid() == true) { - return tmp; - } - return QModelIndex(); -} - -void SidePanel::filterSideMenuSlot(const QString &pattern) -{ - if(pattern.isEmpty()) { - collapseAll(); - } else { - expandAll(); - } - m_proxyModel->setFilterRegExp(QRegExp(pattern,Qt::CaseInsensitive)); -} - -void SidePanel::createMenuActions() -{ - resetAct = new QAction(i18n("Clear Search"), this); - connect(resetAct, &QAction::triggered, this, &SidePanel::resetSearchSlot); - - expAct = new QAction(i18n("Expand All Categories"), this); - connect(expAct, &QAction::triggered, this, &SidePanel::expandAllSlot); - - colAct = new QAction(i18n("Collapse All Categories"), this); - connect(colAct, &QAction::triggered, this, &SidePanel::collapseAllSlot); -} - -void SidePanel::contextMenuEvent(QContextMenuEvent *event) -{ - QMenu menu(this); - - menu.addAction(colAct); - menu.addAction(expAct); - menu.addAction(resetAct); - menu.exec(event->globalPos()); -} - -void SidePanel::collapseAllSlot() -{ - collapseAll(); -} - -void SidePanel::expandAllSlot() -{ - expandAll(); -} - -QStringList SidePanel::allChildKeywords() -{ - return m_model->allChildrenKeywords(); -} - -void SidePanel::resetSearchSlot() -{ - filterSideMenuSlot(QLatin1String("")); - Q_EMIT clearSearchLine(); -} - diff --git a/sidepanel.h b/sidepanel.h deleted file mode 100644 index 8e51d00..0000000 --- a/sidepanel.h +++ /dev/null @@ -1,141 +0,0 @@ - -/* - * sidepanel.h - * - * Copyright (C) 2010 David Hubner - * - * 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 SIDEPANEL -#define SIDEPANEL - -//QT -#include -#include -#include -#include -#include -#include - -//Local -#include "infokcmmodel.h" -#include "infokcmproxymodel.h" - -class InfoKcmModel; -class InfoKcmProxyModel; - -class SidePanel : public QTreeView -{ - Q_OBJECT - - public: - - /** - * Create Side Panel Widget, including search line edit. - * - * @param parent objects parent - */ - explicit SidePanel(QWidget *parent); - - /** - * Destory SidePanel object - */ - ~SidePanel() override; - - /** - * Select the first valid item in TreeView - */ - void changeToFirstValidItem(); - - /** - * Map a QAbstractItemModel index to a QSortFilterProxyModel index - */ - QModelIndex mapToProxySource(const QModelIndex&); - - /** - * Get all the treeview items keywords - */ - QStringList allChildKeywords(); - - /** - * Expand and collapse an Item ( if an expandable item ) - */ - void toggleExpand(const KcmTreeItem *); - - Q_SIGNALS: - - /** - * Emitted when menu item is clicked - */ - void clicked(const KcmTreeItem *); - - private Q_SLOTS: - - /** - * Triggered when treeview item is clicked - */ - void clickedSlot(const QModelIndex &index); - - public Q_SLOTS: - - /** - * Triggered when collapseAll is selected from tree view - * item menu - */ - void collapseAllSlot(); - - /** - * Triggered when ExpandAll is selected from tree view - * item menu - */ - void expandAllSlot(); - - /** - * Filter out all but menu items that fit certain keywords - */ - void filterSideMenuSlot(const QString &); - - /** - * Triggered when Reset Search is selected from tree view - * item menu - */ - void resetSearchSlot(); - -Q_SIGNALS: - void clearSearchLine(); - - private: - - /** - * Created actions for the tree view item menu - */ - void createMenuActions(); - - /** - * Create treeview item menu - */ - void contextMenuEvent(QContextMenuEvent *event) override; - - InfoKcmModel *m_model; - InfoKcmProxyModel *m_proxyModel; - - QAction *colAct; - QAction *expAct; - QAction *resetAct; -}; - -#endif //SIDEPANEL