mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-13 13:55:50 +00:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
4bcdb3a7ff | |||
5ad0c533f0 | |||
d57e54b714 | |||
13f2d560d0 | |||
2220ad6bfe | |||
97f2e78308 | |||
3771ce6ec2 | |||
46db3fee4c | |||
a339f9a743 | |||
4e52d16f1a | |||
097b63415e | |||
77388deab6 | |||
d01d8f95e5 | |||
22586811de | |||
82dda14260 | |||
f8e9945bc4 | |||
139554578c | |||
1827f641f9 | |||
aef1a736c8 | |||
27a80274ac | |||
0e3f83f361 | |||
d30df9dafc | |||
f7a6b86cae | |||
a3e7a84b92 | |||
354fd3cd0c | |||
15abe54290 | |||
60cbc40e9f | |||
bfa4f9e98e |
8
.tx/config
Normal file
8
.tx/config
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[main]
|
||||||
|
host = https://www.transifex.com
|
||||||
|
|
||||||
|
[awesome-widgets.awesome-widgetspot]
|
||||||
|
source_file = sources/translations/awesome-widgets.pot
|
||||||
|
source_lang = en
|
||||||
|
type = PO
|
||||||
|
file_filter = sources/translations/<lang>.po
|
11
AUTHORS
11
AUTHORS
@ -5,8 +5,9 @@ Packagers:
|
|||||||
Konstantin Voinov (openSuSe)
|
Konstantin Voinov (openSuSe)
|
||||||
|
|
||||||
Translators:
|
Translators:
|
||||||
@Mermouy (French translation)
|
@Mermouy (French)
|
||||||
Ernesto Avilés Vzqz (Spanish translation)
|
Ernesto Avilés Vzqz (Spanish)
|
||||||
@underr (Brazillian Portuguese translation)
|
@underr (Brazillian Portuguese)
|
||||||
Виктор Слободян (Ukrainian translation)
|
Виктор Слободян (Ukrainian)
|
||||||
Steve Lemuel (Chinese translation)
|
Steve Lemuel (Chinese)
|
||||||
|
Mariusz Kocoń (Polish)
|
||||||
|
26
CHANGELOG
26
CHANGELOG
@ -1,3 +1,29 @@
|
|||||||
|
Ver.3.1.2:
|
||||||
|
+ add standalone widget configuration example
|
||||||
|
+ new tag tstime
|
||||||
|
+ new tags uptotal* and downtotal*
|
||||||
|
+ add background configuration button
|
||||||
|
+ allow X-AW-Direction property works with graphs and bars (graphical items)
|
||||||
|
+ add bars support to Graphical Items
|
||||||
|
+ add integration with transifex
|
||||||
|
+ add integration with coverity
|
||||||
|
- drop update source (breaking changes if you are using it as developer)
|
||||||
|
- fix pen generation from file image (graphical items)
|
||||||
|
- fix bug with which font html parameters will be pasted even if there cancel clicked
|
||||||
|
- fix bug with invalid total memory formating
|
||||||
|
- fix bug in configuration UI with which there is no selected text pasted
|
||||||
|
- fixes in graphical item configuration UI and behaviour
|
||||||
|
- fix changelog building
|
||||||
|
- fix invalid cast (found by coverity)
|
||||||
|
* change text update mechanism
|
||||||
|
* grahical item improvements
|
||||||
|
* code improvements
|
||||||
|
* translation update
|
||||||
|
|
||||||
|
Ver.3.1.1:
|
||||||
|
- fix broken gcc build (#87)
|
||||||
|
* translation update
|
||||||
|
|
||||||
Ver.3.1.0:
|
Ver.3.1.0:
|
||||||
+ implement templates support (#71)
|
+ implement templates support (#71)
|
||||||
+ implement special functions (#71)
|
+ implement special functions (#71)
|
||||||
|
404
CHANGELOG-RU
404
CHANGELOG-RU
@ -1,404 +0,0 @@
|
|||||||
Вер.3.1.0:
|
|
||||||
+ добавлена поддержка шаблонов (#71)
|
|
||||||
+ добавлена поддержка специальных функций (#71)
|
|
||||||
+ добавлена отдельная директория для настроек (#72)
|
|
||||||
+ произвольные картинки для баров (#80)
|
|
||||||
+ произвольные значения для баров (#80)
|
|
||||||
+ показывать ченджлог после обновления
|
|
||||||
+ добавлен польский перевод (спасибо Mariusz Kocoń)
|
|
||||||
+ использование Qt-5.6 плюшек
|
|
||||||
- исправлено неправильное обновление размера тултипа в desktop panel (#74)
|
|
||||||
- исправлено мигание баров (#81)
|
|
||||||
- убрано использование tasks в пользу QProcess, чтобы избежать падения (#83)
|
|
||||||
- исправления, вызванные новым Qt (5.6)
|
|
||||||
- исправления, вызванные новой Plasma
|
|
||||||
* вместо OWM теперь используется Yahoo! Weather (#73)
|
|
||||||
* улучшена производительность путем оптимизированной подписки (#75)
|
|
||||||
* улучшена производительность путем хранения QVariant вместо частых кастов (#75)
|
|
||||||
* изменен принцип наименования баров (#80, ломает совместимость)
|
|
||||||
* уведомление о большом использовании памяти изменено с 90 на 80 процентов
|
|
||||||
* много рефакторинга
|
|
||||||
|
|
||||||
Вер.3.0.1:
|
|
||||||
+ добавлены патчи для старых версий Qt
|
|
||||||
- убрана проверка на nullptr
|
|
||||||
* диалоги перемещены в QML
|
|
||||||
|
|
||||||
Вер.3.0.0:
|
|
||||||
+ добавлены теги upunits, downunits, upkb, downkb
|
|
||||||
+ добавлены теги dalbum, dartist, dtitle, salbum, sartist, stitle
|
|
||||||
+ добавлена поддержка лямбда функций
|
|
||||||
+ добавлен голландский перевод (спасибо Heimen Stoffels)
|
|
||||||
+ добавлена опциональная проверка обновлений на старте
|
|
||||||
+ добавлена возможность отключить перевод строковых тегов
|
|
||||||
+ добавлена фильтрация в ExtUpgrade (ApiVer == 3)
|
|
||||||
+ добавлена возможность смены иконки погоды (ApiVer == 2)
|
|
||||||
+ показ сообщений, если не найдено обновлений, при прямом запросе
|
|
||||||
+ добавлено перенаправление swap в ExtScript (ApiVer == 4)
|
|
||||||
+ добавлена возможность переноса слов
|
|
||||||
+ добавлена поддержка графиков в GraphicalItems (ApiVer == 3)
|
|
||||||
+ добавлена возможность показать превью из настроек
|
|
||||||
+ добавлены импорт и экспорт конфигурации
|
|
||||||
- исправлен ворнинг для пустых тултипов
|
|
||||||
- исправлен баг, приводящий к увеличению виджета
|
|
||||||
- исправлен баг с отсутствием сохранения настроек DE
|
|
||||||
- исправлен баг с большим размером на старте
|
|
||||||
- исправлен баг с невозможностью использования более, чем 10 расширений
|
|
||||||
- убраны уведомления о свободном месте на диске
|
|
||||||
- убран ключ X-AW-Output в ExtScript (ApiVer == 4)
|
|
||||||
- исправлен возможное падение при вызове деструктора web-источников
|
|
||||||
* более удобный интерфейс настройки
|
|
||||||
* улучшено логирование, применен стиль логирования Qt5
|
|
||||||
* переключено на конкурентное обновление (-DBUILD_FUTURE=ON)
|
|
||||||
* немного оптимизаций
|
|
||||||
* лучшее определение активного сетевого устройства
|
|
||||||
* значение котировок типа double (ApiVer == 3)
|
|
||||||
* лучший показ котировок
|
|
||||||
* больше комментариев в коде
|
|
||||||
* большее следование стилю кода Qt
|
|
||||||
* настройки интервала перемещены в другую группу
|
|
||||||
* работа с DataEngine была перемещена в плагин
|
|
||||||
* изменен формат данных внутри DataEngine (ломает совместимость)
|
|
||||||
|
|
||||||
Вер.2.4.0:
|
|
||||||
+ добавлена поддержка погоды
|
|
||||||
+ добавлена поддержка LA (теги la1, la5, la15)
|
|
||||||
+ добавлена кнопка "Сбросить кеш"
|
|
||||||
+ добавлена поддержка сборки с clang
|
|
||||||
+ добавлен ExtItem агрегатор
|
|
||||||
+ добавлено время в дебаг вывод
|
|
||||||
+ добавлена возможность отключить монитор плеера
|
|
||||||
- исправлен баг с неправильным расчетам скорости сети
|
|
||||||
- исправлен баг с неправильной инициализацией диалога шрифтов
|
|
||||||
- исправлен баг с отсутствием удаления объектов (#60)
|
|
||||||
* переписаны ExtItems для использования собственного абстрактного класса
|
|
||||||
* улучшена работа с обновлениями виджета (#57)
|
|
||||||
* рисование интерфейса переписано на модель сигнал-слот
|
|
||||||
* плагин опять стал приватным
|
|
||||||
* исправлен каст плагина с синглтона (#57)
|
|
||||||
* изменена логика показа данных в DataEngine
|
|
||||||
* изменена сборка пакета и прекращена поддержка отдельного пакета с DataEngine
|
|
||||||
* замена QMap на QHash, если возможно
|
|
||||||
* замена циклов на итераторы, если возможно
|
|
||||||
* список рабочий столов сейчас представлен, как QStringList
|
|
||||||
* рефакторинг
|
|
||||||
|
|
||||||
Вер.2.3.3:
|
|
||||||
* изменен рендеринг с Qt на нативный
|
|
||||||
|
|
||||||
Вер.2.3.2:
|
|
||||||
+ добавлено изменение скорости интернета с KB/s на MB/s, если величина более 1000 KB/s
|
|
||||||
- пофикшен баг с отсутствием действия при активации ссылки (спасибо infans)
|
|
||||||
* улучшена поддержка котировок, например пофикшен возможный сегфолт плазмы
|
|
||||||
* переписать основной виджет к модели сигнал-слот
|
|
||||||
* улучшена поддержка расчета заряда батареи для нескольких батарей
|
|
||||||
|
|
||||||
Вер.2.3.1:
|
|
||||||
- пофикшен баг с отсутствием обновлений значений из настроек
|
|
||||||
- убрана поддержка фильтра `\t`
|
|
||||||
* обновлены переводы
|
|
||||||
* теги fan были объединены с temp, улучшена поддержка тегов lmsensors
|
|
||||||
|
|
||||||
Вер.2.3.0:
|
|
||||||
+ добавлена поддержка фильтров в ExtScript (ApiVer = 3) (#53)
|
|
||||||
+ добавлена возможность отображать `\n`, как перенос строки (#53)
|
|
||||||
+ добавлена сортировка ключей в комбобоксах
|
|
||||||
+ добавлена поддержка тегов (perc)(bid|ask|price)chg (ApiVer = 2)
|
|
||||||
+ добавлены таймауты запросов котировок (#54)
|
|
||||||
- исправлен баг с неправильным парсингом html
|
|
||||||
* ExtQuotes теперь использует JSON вместо XML (ApiVer = 2)
|
|
||||||
* более красивый UI настроек
|
|
||||||
* некоторый рефакторинг
|
|
||||||
|
|
||||||
Вер.2.2.2:
|
|
||||||
+ добавлена поддержка котировок (#46)
|
|
||||||
+ добавлена поддержка свойств height и width (#47)
|
|
||||||
+ добавлена поддержка перевода в плагины (#50)
|
|
||||||
+ добавлено кеширование ключей
|
|
||||||
+ добавлена поддержка X-AW-Number в ExtScript, ExtUpgrade (ApiVer=2)
|
|
||||||
+ добавлено переподключение DataEngine (в некоторых случаях отдельные значения не обновляются)
|
|
||||||
+ добавлено обновление ширины и высоты виджета
|
|
||||||
- исправлен баг при обновлении Ext* (#49)
|
|
||||||
- исправлен баг с сохранением настроек GPUDEV, HDDDEV из графического интерфейса
|
|
||||||
- исправлены настройки Desktop Panel
|
|
||||||
- исправлен баг с добавлением настроек параграфа
|
|
||||||
* дропнута поддержка KDE4 версии (отдельная ветка разработки)
|
|
||||||
* увеличены лимиты для интервалов (#48)
|
|
||||||
* hddtemp был заменен на smartctl по умолчанию
|
|
||||||
* плагины были перемещены из private
|
|
||||||
* более корректное рисование интерфейса
|
|
||||||
|
|
||||||
Вер.2.2.1:
|
|
||||||
+ добавлен ключ X-AW-Interval в ExtUpgrade (ApiVer = 1, default = 3600)
|
|
||||||
+ добавлено кеширование значений в ExtScript и ExtUpgrade
|
|
||||||
+ добавлена поддержка isActive в ExtUpgrade
|
|
||||||
* изменена проверка версий cmake
|
|
||||||
* улучшена логика работы ExtScript и ExtUpgrade
|
|
||||||
|
|
||||||
Вер.2.2.0:
|
|
||||||
* портирование на Plasma 5
|
|
||||||
+ добавлена поддержка списка окон в тултипе
|
|
||||||
+ добавлены уведомления на системные события
|
|
||||||
+ добавлена возможность показать выбранный тег
|
|
||||||
+ добавлены теги $downN, $upN
|
|
||||||
+ добавлен инструмент netdev
|
|
||||||
+ добавлена поддержка smartctl
|
|
||||||
- убрана возможность сокрытия панелей
|
|
||||||
* незначительно изменена логика работы виджета
|
|
||||||
* исправлена отрисовка превью окон
|
|
||||||
* обновление кодовой базы KDE4 под новый ABI
|
|
||||||
* оптимизация работы DataEngine
|
|
||||||
* PKGCMD были заменены на ExtUpgrade
|
|
||||||
|
|
||||||
Вер.2.1.0:
|
|
||||||
+ добавлена функция автообновления
|
|
||||||
+ добавлена поддерка кастомных скриптов
|
|
||||||
+ добавлена поддержка превью рабочего стола для DP
|
|
||||||
+ добавлена поддержка баров
|
|
||||||
- удалена поддержка кастомных команд
|
|
||||||
- фикс #34
|
|
||||||
* исправлены уведомления
|
|
||||||
* переписан UI в соответствии со стандартами KDE
|
|
||||||
* исправлены границы для графических объектов
|
|
||||||
* переписан DP и DE на использование библиотечных функций
|
|
||||||
* изменено определение свойств GPU
|
|
||||||
* изменен поиск регулярных выражений
|
|
||||||
|
|
||||||
Вер.2.0.5:
|
|
||||||
+ добавлен нижний край к тултипу (#30)
|
|
||||||
* исправлен баг с обновлением сетевого интерфейса
|
|
||||||
* исправлен баг с тултипом батареи
|
|
||||||
* отредактирована разметка DP (#31)
|
|
||||||
|
|
||||||
Вер.2.0.4:
|
|
||||||
* более корректная работа с батареями
|
|
||||||
|
|
||||||
Вер.2.0.3:
|
|
||||||
+ добавлена поддержка нескольких тегов $bat
|
|
||||||
* отредактирована разметка
|
|
||||||
|
|
||||||
Вер.2.0.2:
|
|
||||||
+ добавлены теги $fan*
|
|
||||||
+ добавлен китайский перевод (спасибо @Lemueler)
|
|
||||||
+ добавлена проверка сетевых устройств на p2p
|
|
||||||
- удалено ps stats из уведомлений
|
|
||||||
* еще один фикс тегов cpu* и cpucl
|
|
||||||
* переписан конфигурационный интерфейс DP
|
|
||||||
* исправлены нестандартные единицы температуры
|
|
||||||
|
|
||||||
Вер.2.0.1:
|
|
||||||
+ добавлена поддержка кастомных интерфейсов
|
|
||||||
* фикс затенения краев поля
|
|
||||||
* фикс тегов cpu*, cpucl*, gpu*, ps*
|
|
||||||
|
|
||||||
Вер.2.0.0:
|
|
||||||
+ добавлен виджет awesome widget
|
|
||||||
+ новые теги $hddfreemb, $hddfreegb, $memusedmb, $memusedgb, $memfreemb $memfreegb, $swapfreemb, $swapfreegb
|
|
||||||
+ новый DataEngine - battery
|
|
||||||
+ новый тултип - battery
|
|
||||||
+ новые температурные единицы см^-1, ккал/моль, кДж/моль, Реамюр
|
|
||||||
+ добавлена возможность скрывать панели по хоткею
|
|
||||||
- удален виджет pytextmonitor
|
|
||||||
- убраны отдельные поля
|
|
||||||
- удалены README
|
|
||||||
* проект переименован в Awesome Widgets
|
|
||||||
* тег $custom (время) переименован в $ctime
|
|
||||||
* тег $custom (время работы) переименован в $cuptime
|
|
||||||
* тег $time (плеер) переименован в $duration
|
|
||||||
* тег $number переименован в $ndesktop
|
|
||||||
* тег $name переименован в $desktop
|
|
||||||
* тег $total переименован в $tdesktops
|
|
||||||
* дебаг флаг теперь DEBUG
|
|
||||||
* проект полностью переписан на C++
|
|
||||||
* тултип независит теперь от самого виджета
|
|
||||||
* настройка выравнивания текста теперь осуществляется только HTML тегами
|
|
||||||
* настройки батареи и адаптора питания вынесены в DataEngine
|
|
||||||
* изменения в конфигурационном интерфейсе
|
|
||||||
|
|
||||||
Вер.1.11.0:
|
|
||||||
+ добавлена возможность отключения фона
|
|
||||||
+ добавлен desktop DataEngine
|
|
||||||
+ добавлен виджет PTM desktop panel
|
|
||||||
+ добавлено поле текущий рабочий стол (теги $name, $number, $total)
|
|
||||||
+ добавлена возможность взаимодействия с плеерами через mpris
|
|
||||||
* добавлено использование сабмодулей
|
|
||||||
* DataEngine переписан с использованием tasks
|
|
||||||
* фикс чтения температуры nvidia
|
|
||||||
|
|
||||||
Вер.1.10.2:
|
|
||||||
- фикс ошибки с tempUnits в поле hddtemp
|
|
||||||
|
|
||||||
Вер.1.10.1:
|
|
||||||
- пофикшена ошибка с форматами чисел в поле ps
|
|
||||||
- пофикшена инициализация значений в DataEngine
|
|
||||||
- пофикшена проверка qmmp
|
|
||||||
|
|
||||||
Вер.1.10.0:
|
|
||||||
+ добавлены теги $hddtotmb, $hddtotgb
|
|
||||||
+ добавлены теги $memtotmb, $memtotgb, $swaptotmb, $swaptotgb
|
|
||||||
+ добавлена возможность форсированного обновления
|
|
||||||
+ добавлена поддержка clementine
|
|
||||||
+ добавлена поддержка команды hddtemp
|
|
||||||
+ добавлены поддержка disable для HDDDEV и GPUDEV
|
|
||||||
+ добавлена многопоточность в DataEngine
|
|
||||||
+ добавлена проверка ошибок для переменных DataEngine
|
|
||||||
+ добавлена возможность отключения всплывающих сообщений
|
|
||||||
+ добавлена возможность использовать вертикальную разметку
|
|
||||||
+ добавлена возможность добавить пустое пространство
|
|
||||||
+ добавлена возможность вывода отладочной информации (установите переменную окружения 'PTM_DEBUG' в 'yes')
|
|
||||||
+ добавлен перевод Brazillian Portuguese (@underr)
|
|
||||||
+ добавлена украинская локализация (Виктор Слободян)
|
|
||||||
- удален util.py
|
|
||||||
- удалены функции createNotifyrc, поскольку они больше не нужны
|
|
||||||
* рефакторинг конфигурационного интерфейса
|
|
||||||
* настройки плеера были перенесены из виджета в DataEngine
|
|
||||||
* исправлен вызов readme под четырехсимвольное обозначение
|
|
||||||
* перенос readme с md на html
|
|
||||||
|
|
||||||
Вер.1.9.0:
|
|
||||||
+ добавлена поддержка нескольких кастомных команд ($customN)
|
|
||||||
+ добавлено поле скорости hdd ($hddrN, $hddwN)
|
|
||||||
+ добавлены действия в контекстное меню (открыть readme и запустить ksysguard)
|
|
||||||
* исправлен парсинг поля pkg
|
|
||||||
- убрано событие по двойному клику
|
|
||||||
|
|
||||||
Вер.1.8.3:
|
|
||||||
+ добавлен испанский перевод (Ernesto Avilés Vzqz)
|
|
||||||
+ добавлены файлы readme
|
|
||||||
|
|
||||||
Вер.1.8.2:
|
|
||||||
+ добавлены различные температурные единицы (Farenheit и Kelvin)
|
|
||||||
|
|
||||||
Вер.1.8.1:
|
|
||||||
* поле pkg теперь обновляется раз в час
|
|
||||||
|
|
||||||
Вер.1.8.0:
|
|
||||||
+ добавлены скроллбары в конфигурационный интерфейс
|
|
||||||
+ добавлена настройка значений AC
|
|
||||||
+ добавлены теги $hddmbN, $hddgbN
|
|
||||||
+ добавлена поддержка ps (теги $ps, $pscount, $pstotal)
|
|
||||||
+ добавлена поддержка пакетных менеджеров (теги $pkgcountN)
|
|
||||||
* рефакторинг DataEngine
|
|
||||||
|
|
||||||
Вер.1.7.4:
|
|
||||||
+ добавлена поддержка более чем 10 тэгов в полях cpu, cpuclock, hdd, hddtemp, temp
|
|
||||||
- фиксы в форматах
|
|
||||||
* изменения в кастомном формате аптайма
|
|
||||||
|
|
||||||
Вер.1.7.3:
|
|
||||||
+ добавлены тэги $memgb, $swapgb
|
|
||||||
+ добавлена директория readme
|
|
||||||
+ добавлен французский перевод (@Mermouy)
|
|
||||||
- фикс подсказки для кастомного формата аптайма
|
|
||||||
- фикс #12
|
|
||||||
* больше рефакторинга богу рефакторинга
|
|
||||||
* интервал обновления сетевого интерфейса теперь 30*interval
|
|
||||||
* тэги $swap, $swapmb и $swapgb теперь работают одновременно (тэги $mem* тоже)
|
|
||||||
* player_name теперь имеет тип str
|
|
||||||
|
|
||||||
Вер.1.7.2:
|
|
||||||
+ добавлены тэги $dd, $d, $hh, $h, $mm, $m в кастомный формат аптайма
|
|
||||||
+ добавлено масштабирование в тултипы
|
|
||||||
+ добавлена конфигурация DE из виджета
|
|
||||||
+ добавлена кастомная команда в DE
|
|
||||||
- удалена кастомная команда из виджета
|
|
||||||
- удалены тэги $ds, $hs, $ms
|
|
||||||
|
|
||||||
Вер.1.7.1:
|
|
||||||
- удалено поле с ошибкой
|
|
||||||
* пофикшен баг с нулевым значением в тултипе
|
|
||||||
|
|
||||||
Вер.1.7.0:
|
|
||||||
+ добавлена поддержка нескольких тэгов в поле температуры
|
|
||||||
+ добавлены тэги $cpuN, $cpuclN, $hddN, $tempN, $hddtempN, $up, $down
|
|
||||||
+ добавлено поле с кастомной командой
|
|
||||||
+ добавлены тултипы для полей CPU, частоты CPU, памяти, swap и сеть
|
|
||||||
- удалены тэги @@...@@, $temp, $ccpu, $ccpucl, $net
|
|
||||||
* изменения в настройках
|
|
||||||
* виджет не требует больше net-tools
|
|
||||||
* рефакторинг
|
|
||||||
|
|
||||||
Вер.1.6.1:
|
|
||||||
+ добавлена поддержка нескольких девайсов в поле hddtemp
|
|
||||||
- фикс #6
|
|
||||||
|
|
||||||
Вер.1.6.0:
|
|
||||||
+ добавлен тэг $custom в поля time и uptime (#8)
|
|
||||||
+ русский перевод
|
|
||||||
- фикс #6, #10
|
|
||||||
* лицензия изменена на GPLv3
|
|
||||||
* изменения в сборке проекта
|
|
||||||
|
|
||||||
Вер.1.5.3:
|
|
||||||
+ добавлены тэги $album, $progress и $time tags в поле плеера (#7)
|
|
||||||
- фикс бага с нулевым свопом
|
|
||||||
|
|
||||||
Вер.1.5.2:
|
|
||||||
+ добавлены тэги $isotime, $shorttime и $longtime в поле time
|
|
||||||
|
|
||||||
Вер.1.5.1:
|
|
||||||
+ добавлено поле time
|
|
||||||
|
|
||||||
Вер.1.5.0:
|
|
||||||
+ добавлено поле player
|
|
||||||
|
|
||||||
Вер.1.4.0:
|
|
||||||
+ добавлены уведомления
|
|
||||||
|
|
||||||
Вер.1.3.6:
|
|
||||||
- фикс #1, #2
|
|
||||||
|
|
||||||
Вер.1.3.5:
|
|
||||||
- фикс бага с определением сетевого устройства
|
|
||||||
|
|
||||||
Вер.1.3.4:
|
|
||||||
+ добавлено событие по двойному щелчку
|
|
||||||
+ добавлен автовыбор сетевого устройства
|
|
||||||
- фикс еще одного падения Плазмы
|
|
||||||
|
|
||||||
Вер.1.3.3:
|
|
||||||
* редактирование чтения температурного устройства
|
|
||||||
|
|
||||||
Вер.1.3.2b:
|
|
||||||
- фикс падения Плазмы
|
|
||||||
|
|
||||||
Вер.1.3.2:
|
|
||||||
+ добавлены поля GPU, GPU temp, HDD и HDD temp
|
|
||||||
+ добавлены тэги $ccpu и $ccpucl
|
|
||||||
- фикс некоторых багов
|
|
||||||
* оптимизация и рефакторинг
|
|
||||||
|
|
||||||
Вер.1.2.2:
|
|
||||||
+ добавлен тултип в строки
|
|
||||||
|
|
||||||
Вер.1.2.1:
|
|
||||||
* если батарея не существует, возвращает off
|
|
||||||
* если AC не существует, возвращает '(?)'
|
|
||||||
|
|
||||||
Вер.1.2.0:
|
|
||||||
+ добавлен тэг $ac в поле battery
|
|
||||||
+ добавлена настройка устройств батареи и AC
|
|
||||||
+ добавлена проверка ошибок
|
|
||||||
* тэг $bat теперь читается из /sys/*
|
|
||||||
|
|
||||||
Вер.1.1.4:
|
|
||||||
* изменения в парсинге acpi (поле battery)
|
|
||||||
|
|
||||||
Вер.1.1.3:
|
|
||||||
+ добавлена настройка ширины шрифта
|
|
||||||
- небольшие фиксы
|
|
||||||
* отредактирована настройка шрифта. Теперь настройки для шрифта работают нормально
|
|
||||||
|
|
||||||
Вер.1.1.2:
|
|
||||||
+ добавлено поле CPU clock
|
|
||||||
+ добавлена функция для обновления сетевого интерфейса (100*time_interval)
|
|
||||||
* изменено обновление слайдеров
|
|
||||||
|
|
||||||
Вер.1.1.1:
|
|
||||||
+ добавлены тэги $swapmb, $memmb, $netdev, @@netdev=...@@
|
|
||||||
- небольшие фиксы
|
|
||||||
* виджет теперь состоит из нескольких полей
|
|
||||||
* отредактирован конфигурационный интерфейс
|
|
||||||
|
|
||||||
Вер.1.0:
|
|
||||||
Первый релиз
|
|
@ -1,6 +1,9 @@
|
|||||||
awesome-widgets (ex-pytextmonitor)
|
awesome-widgets (ex-pytextmonitor)
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
[](https://travis-ci.org/arcan1s/awesome-widgets)
|
||||||
|
[](https://scan.coverity.com/projects/awesome-widgets)
|
||||||
|
|
||||||
Information
|
Information
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ git submodule update --init --recursive
|
|||||||
|
|
||||||
# build widget
|
# build widget
|
||||||
ARCHIVE="awesome-widgets"
|
ARCHIVE="awesome-widgets"
|
||||||
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING packages patches"
|
FILES="AUTHORS CHANGELOG COPYING packages patches"
|
||||||
IGNORELIST="build usr .kdev4 *.kdev4 .idea packages/*src.tar.xz"
|
IGNORELIST="build usr .kdev4 *.kdev4 .idea packages/*src.tar.xz"
|
||||||
# create archive
|
# create archive
|
||||||
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pkgname=plasma5-applet-awesome-widgets
|
pkgname=plasma5-applet-awesome-widgets
|
||||||
_pkgname=awesome-widgets
|
_pkgname=awesome-widgets
|
||||||
pkgver=3.1.1
|
pkgver=3.1.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
|
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
@ -14,10 +14,10 @@ optdepends=("catalyst: for GPU monitor"
|
|||||||
"smartmontools: for HDD temperature monitor"
|
"smartmontools: for HDD temperature monitor"
|
||||||
"mpd: for music player monitor"
|
"mpd: for music player monitor"
|
||||||
"nvidia-utils: for GPU monitor")
|
"nvidia-utils: for GPU monitor")
|
||||||
makedepends=('cmake' 'extra-cmake-modules')
|
makedepends=('cmake' 'extra-cmake-modules' 'python')
|
||||||
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
md5sums=('1a4dc1d912b663dfd24d00712ab68f07')
|
md5sums=('99514bf6d1a5ca8660dd0210ee58af28')
|
||||||
backup=('etc/xdg/plasma-dataengine-extsysmon.conf')
|
backup=('etc/xdg/plasma-dataengine-extsysmon.conf')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
|
|
||||||
index eee61e1..9da8dad 100644
|
|
||||||
--- a/sources/awdebug.cpp
|
|
||||||
+++ b/sources/awdebug.cpp
|
|
||||||
@@ -20,13 +20,10 @@
|
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
-Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
|
|
||||||
- QtMsgType::QtWarningMsg)
|
|
||||||
-Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel",
|
|
||||||
- QtMsgType::QtWarningMsg)
|
|
||||||
-Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
|
|
||||||
-Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets",
|
|
||||||
- QtMsgType::QtWarningMsg)
|
|
||||||
+Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget")
|
|
||||||
+Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel")
|
|
||||||
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon")
|
|
||||||
+Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets")
|
|
||||||
|
|
||||||
|
|
||||||
const QStringList getBuildData()
|
|
||||||
diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
|
|
||||||
index e5b9861..eb73073 100644
|
|
||||||
--- a/sources/awesome-widget/plugin/awkeys.cpp
|
|
||||||
+++ b/sources/awesome-widget/plugin/awkeys.cpp
|
|
||||||
@@ -439,4 +439,4 @@ void AWKeys::dataUpdated(const QString &sourceName,
|
|
||||||
|
|
||||||
// run concurrent data update
|
|
||||||
- QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
|
|
||||||
+ QtConcurrent::run(this, &AWKeys::setDataBySource, sourceName,
|
|
||||||
data);
|
|
||||||
diff --git a/sources/libraries.cmake b/sources/libraries.cmake
|
|
||||||
index 33192f7..46e2b1e 100644
|
|
||||||
--- a/sources/libraries.cmake
|
|
||||||
+++ b/sources/libraries.cmake
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
find_package(Gettext REQUIRED)
|
|
||||||
|
|
||||||
# main qt libraries
|
|
||||||
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
|
||||||
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
|
||||||
add_definitions(
|
|
||||||
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
|
||||||
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
|
@ -352,3 +352,48 @@ index a8300f1..8edc3bd 100644
|
|||||||
// values
|
// values
|
||||||
Q_INVOKABLE QString infoByKey(QString key) const;
|
Q_INVOKABLE QString infoByKey(QString key) const;
|
||||||
Q_INVOKABLE QString valueByKey(QString key) const;
|
Q_INVOKABLE QString valueByKey(QString key) const;
|
||||||
|
diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
|
||||||
|
index eee61e1..9da8dad 100644
|
||||||
|
--- a/sources/awdebug.cpp
|
||||||
|
+++ b/sources/awdebug.cpp
|
||||||
|
@@ -20,13 +20,10 @@
|
||||||
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
|
||||||
|
-Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
|
||||||
|
- QtMsgType::QtWarningMsg)
|
||||||
|
-Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel",
|
||||||
|
- QtMsgType::QtWarningMsg)
|
||||||
|
-Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
|
||||||
|
-Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets",
|
||||||
|
- QtMsgType::QtWarningMsg)
|
||||||
|
+Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget")
|
||||||
|
+Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel")
|
||||||
|
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon")
|
||||||
|
+Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets")
|
||||||
|
|
||||||
|
|
||||||
|
const QStringList getBuildData()
|
||||||
|
diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
|
||||||
|
index e5b9861..eb73073 100644
|
||||||
|
--- a/sources/awesome-widget/plugin/awkeys.cpp
|
||||||
|
+++ b/sources/awesome-widget/plugin/awkeys.cpp
|
||||||
|
@@ -439,4 +439,4 @@ void AWKeys::dataUpdated(const QString &sourceName,
|
||||||
|
{
|
||||||
|
// run concurrent data update
|
||||||
|
- QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
|
||||||
|
+ QtConcurrent::run(this, &AWKeys::setDataBySource, sourceName,
|
||||||
|
data);
|
||||||
|
diff --git a/sources/libraries.cmake b/sources/libraries.cmake
|
||||||
|
index 33192f7..46e2b1e 100644
|
||||||
|
--- a/sources/libraries.cmake
|
||||||
|
+++ b/sources/libraries.cmake
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
find_package(Gettext REQUIRED)
|
||||||
|
|
||||||
|
# main qt libraries
|
||||||
|
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||||
|
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||||
|
add_definitions(
|
||||||
|
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||||
|
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
@ -16,7 +16,7 @@ index 43944ce..c679281 100644
|
|||||||
+++ b/sources/awdebug.h
|
+++ b/sources/awdebug.h
|
||||||
@@ -21,9 +21,13 @@
|
@@ -21,9 +21,13 @@
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include "version.h"
|
||||||
|
|
||||||
+#ifndef qCInfo
|
+#ifndef qCInfo
|
||||||
+#define qCInfo qCDebug
|
+#define qCInfo qCDebug
|
||||||
|
@ -11,7 +11,7 @@ index 3698602..42871c8 100644
|
|||||||
m_genericConfig = QString("%1/awesomewidgets/general.ini")
|
m_genericConfig = QString("%1/awesomewidgets/general.ini")
|
||||||
.arg(QStandardPaths::writableLocation(
|
.arg(QStandardPaths::writableLocation(
|
||||||
QStandardPaths::GenericDataLocation));
|
QStandardPaths::GenericDataLocation));
|
||||||
@@ -69,14 +69,14 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway)
|
@@ -69,15 +69,15 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway)
|
||||||
bool AWUpdateHelper::checkVersion()
|
bool AWUpdateHelper::checkVersion()
|
||||||
{
|
{
|
||||||
QSettings settings(m_genericConfig, QSettings::IniFormat);
|
QSettings settings(m_genericConfig, QSettings::IniFormat);
|
||||||
@ -22,10 +22,11 @@ index 3698602..42871c8 100644
|
|||||||
// update version
|
// update version
|
||||||
settings.setValue(QString("Version"), QString(VERSION));
|
settings.setValue(QString("Version"), QString(VERSION));
|
||||||
settings.sync();
|
settings.sync();
|
||||||
|
qCInfo(LOG_AW) << "Found version" << version << "actual one is"
|
||||||
|
<< m_foundVersion;
|
||||||
|
|
||||||
qCInfo(LOG_AW) << "Found version" << version << "actual one is" << VERSION;
|
- if ((version != m_foundVersion) && (!QString(CHANGELOG).isEmpty())) {
|
||||||
- if (version != QVersionNumber::fromString(VERSION)) {
|
+ if ((version != QString(VERSION)) && (!QString(CHANGELOG).isEmpty())) {
|
||||||
+ if (version != QString(VERSION)) {
|
|
||||||
genMessageBox(i18n("Changelog of %1", QString(VERSION)),
|
genMessageBox(i18n("Changelog of %1", QString(VERSION)),
|
||||||
QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
|
QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
|
||||||
QMessageBox::Ok)
|
QMessageBox::Ok)
|
||||||
@ -65,12 +66,12 @@ index 3698602..42871c8 100644
|
|||||||
@@ -128,8 +127,7 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
|
@@ -128,8 +127,7 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case QMessageBox::Ok:
|
case QMessageBox::AcceptRole:
|
||||||
- QDesktopServices::openUrl(QString(RELEASES)
|
- QDesktopServices::openUrl(QString(RELEASES)
|
||||||
- + m_foundVersion.toString());
|
- + m_foundVersion.toString());
|
||||||
+ QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion);
|
+ QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion);
|
||||||
break;
|
break;
|
||||||
case QMessageBox::Cancel:
|
case QMessageBox::RejectRole:
|
||||||
default:
|
default:
|
||||||
@@ -157,14 +155,23 @@ void AWUpdateHelper::versionReplyRecieved(QNetworkReply *reply,
|
@@ -157,14 +155,23 @@ void AWUpdateHelper::versionReplyRecieved(QNetworkReply *reply,
|
||||||
QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap();
|
QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap();
|
||||||
@ -132,3 +133,16 @@ index 359cdb2..9c6a42d 100644
|
|||||||
QString m_genericConfig;
|
QString m_genericConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
diff --git a/sources/libraries.cmake b/sources/libraries.cmake
|
||||||
|
index 33192f7..339bb58 100644
|
||||||
|
--- a/sources/libraries.cmake
|
||||||
|
+++ b/sources/libraries.cmake
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
find_package(Gettext REQUIRED)
|
||||||
|
|
||||||
|
# main qt libraries
|
||||||
|
-find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||||
|
+find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||||
|
add_definitions(
|
||||||
|
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||||
|
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
||||||
|
2
sources/3rdparty/fontdialog
vendored
2
sources/3rdparty/fontdialog
vendored
Submodule sources/3rdparty/fontdialog updated: ef47b1146e...e7bcf8ee85
@ -15,7 +15,7 @@ set(PROJECT_CONTACT "esalexeev@gmail.com")
|
|||||||
set(PROJECT_LICENSE "GPL3")
|
set(PROJECT_LICENSE "GPL3")
|
||||||
set(PROJECT_VERSION_MAJOR "3")
|
set(PROJECT_VERSION_MAJOR "3")
|
||||||
set(PROJECT_VERSION_MINOR "1")
|
set(PROJECT_VERSION_MINOR "1")
|
||||||
set(PROJECT_VERSION_PATCH "1")
|
set(PROJECT_VERSION_PATCH "2")
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||||
# append git version if any
|
# append git version if any
|
||||||
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")
|
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")
|
||||||
@ -35,9 +35,6 @@ option(BUILD_RPM_PACKAGE "Build rpm package" OFF)
|
|||||||
# build details
|
# build details
|
||||||
option(BUILD_FUTURE "Build with the features which will be marked as stable later" OFF)
|
option(BUILD_FUTURE "Build with the features which will be marked as stable later" OFF)
|
||||||
option(BUILD_TESTING "Build with additional test abilities" OFF)
|
option(BUILD_TESTING "Build with additional test abilities" OFF)
|
||||||
# some additional targets
|
|
||||||
set(CLANGFORMAT_EXECUTABLE "/usr/bin/clang-format" CACHE STRING "Path to clang-format executable")
|
|
||||||
set(CPPCHECK_EXECUTABLE "/usr/bin/cppcheck" CACHE STRING "Path to cppcheck executable")
|
|
||||||
|
|
||||||
# generate changelog
|
# generate changelog
|
||||||
set(PROJECT_CHANGELOG "Changelog" CACHE INTERNAL "")
|
set(PROJECT_CHANGELOG "Changelog" CACHE INTERNAL "")
|
||||||
@ -45,14 +42,14 @@ include(changelog.cmake)
|
|||||||
|
|
||||||
# flags
|
# flags
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -Wno-cpp -std=c++14")
|
set(CMAKE_CXX_FLAGS "-Wall -Wno-cpp -std=c++11")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_OPTIMIZATION "-Ofast -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_OPTIMIZATION "-Ofast -DNDEBUG")
|
||||||
# avoid newer gcc warnings
|
# avoid newer gcc warnings
|
||||||
add_definitions(-D_DEFAULT_SOURCE)
|
add_definitions(-D_DEFAULT_SOURCE)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -std=c++14 -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_OPTIMIZATION "-Ofast -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_OPTIMIZATION "-Ofast -DNDEBUG")
|
||||||
@ -72,6 +69,7 @@ set(PROJECT_LIBRARY awesomewidgets)
|
|||||||
include(libraries.cmake)
|
include(libraries.cmake)
|
||||||
include(clang-format.cmake)
|
include(clang-format.cmake)
|
||||||
include(cppcheck.cmake)
|
include(cppcheck.cmake)
|
||||||
|
include(coverity.cmake)
|
||||||
|
|
||||||
get_directory_property(CMAKE_DEFINITIONS COMPILE_DEFINITIONS)
|
get_directory_property(CMAKE_DEFINITIONS COMPILE_DEFINITIONS)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
|
Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
|
||||||
@ -46,6 +45,7 @@ const QStringList getBuildData()
|
|||||||
metadata.append(QString(" AWEUAPI: %1").arg(AWEUAPI));
|
metadata.append(QString(" AWEUAPI: %1").arg(AWEUAPI));
|
||||||
metadata.append(QString(" AWEWAPI: %1").arg(AWEWAPI));
|
metadata.append(QString(" AWEWAPI: %1").arg(AWEWAPI));
|
||||||
metadata.append(QString(" TIME_KEYS: %1").arg(TIME_KEYS));
|
metadata.append(QString(" TIME_KEYS: %1").arg(TIME_KEYS));
|
||||||
|
metadata.append(QString(" STATIC_KEYS: %1").arg(STATIC_KEYS));
|
||||||
// cmake properties
|
// cmake properties
|
||||||
metadata.append(QString("cmake properties:"));
|
metadata.append(QString("cmake properties:"));
|
||||||
metadata.append(QString(" CMAKE_BUILD_TYPE: %1").arg(CMAKE_BUILD_TYPE));
|
metadata.append(QString(" CMAKE_BUILD_TYPE: %1").arg(CMAKE_BUILD_TYPE));
|
||||||
@ -68,6 +68,7 @@ const QStringList getBuildData()
|
|||||||
.arg(CMAKE_SHARED_LINKER_FLAGS));
|
.arg(CMAKE_SHARED_LINKER_FLAGS));
|
||||||
// components
|
// components
|
||||||
metadata.append(QString("Components data:"));
|
metadata.append(QString("Components data:"));
|
||||||
|
metadata.append(QString(" BUILD_COVERAGE: %1").arg(BUILD_COVERAGE));
|
||||||
metadata.append(QString(" BUILD_PLASMOIDS: %1").arg(BUILD_PLASMOIDS));
|
metadata.append(QString(" BUILD_PLASMOIDS: %1").arg(BUILD_PLASMOIDS));
|
||||||
metadata.append(
|
metadata.append(
|
||||||
QString(" BUILD_DEB_PACKAGE: %1").arg(BUILD_DEB_PACKAGE));
|
QString(" BUILD_DEB_PACKAGE: %1").arg(BUILD_DEB_PACKAGE));
|
||||||
@ -75,8 +76,16 @@ const QStringList getBuildData()
|
|||||||
QString(" BUILD_RPM_PACKAGE: %1").arg(BUILD_RPM_PACKAGE));
|
QString(" BUILD_RPM_PACKAGE: %1").arg(BUILD_RPM_PACKAGE));
|
||||||
metadata.append(
|
metadata.append(
|
||||||
QString(" CLANGFORMAT_EXECUTABLE: %1").arg(CLANGFORMAT_EXECUTABLE));
|
QString(" CLANGFORMAT_EXECUTABLE: %1").arg(CLANGFORMAT_EXECUTABLE));
|
||||||
|
metadata.append(QString(" COVERITY_COMMENT: %1").arg(COVERITY_COMMENT));
|
||||||
|
metadata.append(
|
||||||
|
QString(" COVERITY_DIRECTORY: %1").arg(COVERITY_DIRECTORY));
|
||||||
|
metadata.append(QString(" COVERITY_EMAIL: %1").arg(COVERITY_EMAIL));
|
||||||
|
metadata.append(
|
||||||
|
QString(" COVERITY_EXECUTABLE: %1").arg(COVERITY_EXECUTABLE));
|
||||||
|
metadata.append(QString(" COVERITY_URL: %1").arg(COVERITY_URL));
|
||||||
metadata.append(
|
metadata.append(
|
||||||
QString(" CPPCHECK_EXECUTABLE: %1").arg(CPPCHECK_EXECUTABLE));
|
QString(" CPPCHECK_EXECUTABLE: %1").arg(CPPCHECK_EXECUTABLE));
|
||||||
|
// additional functions
|
||||||
metadata.append(QString(" PROP_FUTURE: %1").arg(PROP_FUTURE));
|
metadata.append(QString(" PROP_FUTURE: %1").arg(PROP_FUTURE));
|
||||||
metadata.append(QString(" PROP_TEST: %1").arg(PROP_TEST));
|
metadata.append(QString(" PROP_TEST: %1").arg(PROP_TEST));
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#ifndef LOG_FORMAT
|
#ifndef LOG_FORMAT
|
||||||
#define LOG_FORMAT \
|
#define LOG_FORMAT \
|
||||||
"[%{time process}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-" \
|
"[%{time process}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-" \
|
||||||
|
@ -84,7 +84,7 @@ Item {
|
|||||||
// ui
|
// ui
|
||||||
Text {
|
Text {
|
||||||
id: text
|
id: text
|
||||||
anchors.fill: parent
|
anchors.fill: Plasmoid.Layout
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
wrapMode: plasmoid.configuration.wrapText ? Text.WordWrap : Text.NoWrap
|
wrapMode: plasmoid.configuration.wrapText ? Text.WordWrap : Text.NoWrap
|
||||||
|
@ -61,7 +61,24 @@ Item {
|
|||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width * 3 / 12
|
width: parent.width * 3 / 15
|
||||||
|
text: i18n("Bgcolor")
|
||||||
|
|
||||||
|
onClicked: backgroundDialog.visible = true
|
||||||
|
|
||||||
|
QtDialogs.ColorDialog {
|
||||||
|
id: backgroundDialog
|
||||||
|
title: i18n("Select a color")
|
||||||
|
onAccepted: {
|
||||||
|
var text = textPattern.text
|
||||||
|
textPattern.text = "<body bgcolor=\"" +
|
||||||
|
backgroundDialog.color + "\">" +
|
||||||
|
text + "</body>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QtControls.Button {
|
||||||
|
width: parent.width * 3 / 15
|
||||||
text: i18n("Font")
|
text: i18n("Font")
|
||||||
iconName: "font"
|
iconName: "font"
|
||||||
|
|
||||||
@ -73,123 +90,119 @@ Item {
|
|||||||
"size": plasmoid.configuration.fontSize
|
"size": plasmoid.configuration.fontSize
|
||||||
}
|
}
|
||||||
var font = awActions.getFont(defaultFont)
|
var font = awActions.getFont(defaultFont)
|
||||||
var pos = textPattern.cursorPosition
|
if (font.applied != 1) {
|
||||||
|
if (debug) console.debug("No font selected")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<span style=\"color:" + font.color +
|
textPattern.insert(textPattern.cursorPosition,
|
||||||
"; font-family:'" + font.family +
|
"<span style=\"color:" + font.color +
|
||||||
"'; font-size:" + font.size + "pt;\">" +
|
"; font-family:'" + font.family +
|
||||||
selected + "</span>")
|
"'; font-size:" + font.size + "pt;\">" +
|
||||||
|
selected + "</span>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-indent-more"
|
iconName: "format-indent-more"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Indent button")
|
if (debug) console.debug("Indent button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, selected + "<br>\n")
|
textPattern.insert(textPattern.cursorPosition, selected + "<br>\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-bold"
|
iconName: "format-text-bold"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Bold button")
|
if (debug) console.debug("Bold button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<b>" + selected + "</b>")
|
textPattern.insert(textPattern.cursorPosition, "<b>" + selected + "</b>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-italic"
|
iconName: "format-text-italic"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Italic button")
|
if (debug) console.debug("Italic button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<i>" + selected + "</i>")
|
textPattern.insert(textPattern.cursorPosition, "<i>" + selected + "</i>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-underline"
|
iconName: "format-text-underline"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Underline button")
|
if (debug) console.debug("Underline button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<u>" + selected + "</u>")
|
textPattern.insert(textPattern.cursorPosition, "<u>" + selected + "</u>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-strikethrough"
|
iconName: "format-text-strikethrough"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Strike button")
|
if (debug) console.debug("Strike button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<s>" + selected + "</s>")
|
textPattern.insert(textPattern.cursorPosition, "<s>" + selected + "</s>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-left"
|
iconName: "format-justify-left"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Left button")
|
if (debug) console.debug("Left button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"left\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"left\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-center"
|
iconName: "format-justify-center"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Center button")
|
if (debug) console.debug("Center button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"center\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"center\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-right"
|
iconName: "format-justify-right"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Right button")
|
if (debug) console.debug("Right button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"right\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"right\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-fill"
|
iconName: "format-justify-fill"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Justify button")
|
if (debug) console.debug("Justify button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"justify\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"justify\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -281,10 +294,9 @@ Item {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
if (!tags.currentText) return
|
if (!tags.currentText) return
|
||||||
if (debug) console.debug("Add tag button")
|
if (debug) console.debug("Add tag button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, selected + "$" + tags.currentText)
|
textPattern.insert(textPattern.cursorPosition, selected + "$" + tags.currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
@ -319,7 +331,6 @@ Item {
|
|||||||
lock = false
|
lock = false
|
||||||
awKeys.initKeys(textPattern.text, plasmoid.configuration.interval,
|
awKeys.initKeys(textPattern.text, plasmoid.configuration.interval,
|
||||||
plasmoid.configuration.queueLimit, false)
|
plasmoid.configuration.queueLimit, false)
|
||||||
awKeys.needToBeUpdated()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ X-Plasma-RemoteLocation=
|
|||||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||||
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
|
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
|
||||||
X-KDE-PluginInfo-Version=3.1.0
|
X-KDE-PluginInfo-Version=3.1.2
|
||||||
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
||||||
X-KDE-PluginInfo-Category=System Information
|
X-KDE-PluginInfo-Category=System Information
|
||||||
X-KDE-PluginInfo-Depends=
|
X-KDE-PluginInfo-Depends=
|
||||||
|
@ -15,24 +15,23 @@
|
|||||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef UPDATESOURCE_H
|
#ifndef AWABSTRACTFORMATTER_H
|
||||||
#define UPDATESOURCE_H
|
#define AWABSTRACTFORMATTER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QVariant>
|
||||||
#include "abstractextsysmonsource.h"
|
|
||||||
|
|
||||||
|
|
||||||
class UpdateSource : public AbstractExtSysMonSource
|
class AWAbstractFormatter : public QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit UpdateSource(QObject *parent, const QStringList args);
|
explicit AWAbstractFormatter(QObject *parent, const QString, const QString)
|
||||||
virtual ~UpdateSource();
|
: QObject(parent){};
|
||||||
QVariant data(QString source);
|
explicit AWAbstractFormatter(QObject *parent)
|
||||||
QVariantMap initialData(QString source) const;
|
: QObject(parent){};
|
||||||
void run(){};
|
virtual ~AWAbstractFormatter(){};
|
||||||
QStringList sources() const;
|
virtual QString convert(const QVariant &value) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* UPDATESOURCE_H */
|
#endif /* AWABSTRACTFORMATTER_H */
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "awupdatehelper.h"
|
#include "awupdatehelper.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
AWActions::AWActions(QObject *parent)
|
AWActions::AWActions(QObject *parent)
|
||||||
@ -154,11 +153,14 @@ QVariantMap AWActions::getFont(const QVariantMap defaultFont) const
|
|||||||
qCDebug(LOG_AW) << "Default font is" << defaultFont;
|
qCDebug(LOG_AW) << "Default font is" << defaultFont;
|
||||||
|
|
||||||
QVariantMap fontMap;
|
QVariantMap fontMap;
|
||||||
|
int ret = 0;
|
||||||
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
|
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
|
||||||
defaultFont[QString("size")].toInt(), 400, false,
|
defaultFont[QString("size")].toInt(), 400, false,
|
||||||
defaultFont[QString("color")].toString());
|
defaultFont[QString("color")].toString());
|
||||||
CFont font
|
CFont font = CFontDialog::getFont(i18n("Select font"), defaultCFont, false,
|
||||||
= CFontDialog::getFont(i18n("Select font"), defaultCFont, false, false);
|
false, &ret);
|
||||||
|
|
||||||
|
fontMap[QString("applied")] = ret;
|
||||||
fontMap[QString("color")] = font.color().name();
|
fontMap[QString("color")] = font.color().name();
|
||||||
fontMap[QString("family")] = font.family();
|
fontMap[QString("family")] = font.family();
|
||||||
fontMap[QString("size")] = font.pointSize();
|
fontMap[QString("size")] = font.pointSize();
|
||||||
|
84
sources/awesome-widget/plugin/awdatetimeformatter.cpp
Normal file
84
sources/awesome-widget/plugin/awdatetimeformatter.cpp
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include "awdatetimeformatter.h"
|
||||||
|
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
|
||||||
|
AWDateTimeFormatter::AWDateTimeFormatter(QObject *parent,
|
||||||
|
const QString filename,
|
||||||
|
const QString section)
|
||||||
|
: AWAbstractFormatter(parent, filename, section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
init(filename, section);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWDateTimeFormatter::AWDateTimeFormatter(QObject *parent, const QString format)
|
||||||
|
: AWAbstractFormatter(parent)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
setFormat(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWDateTimeFormatter::~AWDateTimeFormatter()
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWDateTimeFormatter::convert(const QVariant &value) const
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Convert value" << value;
|
||||||
|
|
||||||
|
return value.toDateTime().toString(m_format);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWDateTimeFormatter::format() const
|
||||||
|
{
|
||||||
|
return m_format;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWDateTimeFormatter::setFormat(const QString _format)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set format" << _format;
|
||||||
|
|
||||||
|
m_format = _format;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWDateTimeFormatter::init(const QString filename, const QString section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
|
||||||
|
|
||||||
|
QSettings settings(filename, QSettings::IniFormat);
|
||||||
|
|
||||||
|
settings.beginGroup(section);
|
||||||
|
setFormat(settings.value(QString("Format"), QString()).toString());
|
||||||
|
settings.endGroup();
|
||||||
|
}
|
46
sources/awesome-widget/plugin/awdatetimeformatter.h
Normal file
46
sources/awesome-widget/plugin/awdatetimeformatter.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef AWDATETIMEFORMATTER_H
|
||||||
|
#define AWDATETIMEFORMATTER_H
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWDateTimeFormatter : public AWAbstractFormatter
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QString format READ format WRITE setFormat)
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit AWDateTimeFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section);
|
||||||
|
explicit AWDateTimeFormatter(QObject *parent, const QString format);
|
||||||
|
virtual ~AWDateTimeFormatter();
|
||||||
|
QString convert(const QVariant &value) const;
|
||||||
|
// properties
|
||||||
|
QString format() const;
|
||||||
|
void setFormat(const QString _format);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init(const QString filename, const QString section);
|
||||||
|
// properties
|
||||||
|
QString m_format;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AWDATETIMEFORMATTER_H */
|
176
sources/awesome-widget/plugin/awfloatformatter.cpp
Normal file
176
sources/awesome-widget/plugin/awfloatformatter.cpp
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include "awfloatformatter.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
|
||||||
|
AWFloatFormatter::AWFloatFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section)
|
||||||
|
: AWAbstractFormatter(parent, filename, section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
init(filename, section);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWFloatFormatter::AWFloatFormatter(QObject *parent, const QChar fillChar,
|
||||||
|
const char format, const double multiplier,
|
||||||
|
const int precision, const double summand,
|
||||||
|
const int width)
|
||||||
|
: AWAbstractFormatter(parent)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
setFillChar(fillChar);
|
||||||
|
setFormat(format);
|
||||||
|
setMultiplier(multiplier);
|
||||||
|
setPrecision(precision);
|
||||||
|
setSummand(summand);
|
||||||
|
setWidth(width);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWFloatFormatter::~AWFloatFormatter()
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWFloatFormatter::convert(const QVariant &value) const
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Convert value" << value;
|
||||||
|
|
||||||
|
return QString("%1").arg(value.toDouble() * m_multiplier + m_summand,
|
||||||
|
m_width, m_format, m_precision, m_fillChar);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QChar AWFloatFormatter::fillChar() const
|
||||||
|
{
|
||||||
|
return m_fillChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char AWFloatFormatter::format() const
|
||||||
|
{
|
||||||
|
return m_format;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double AWFloatFormatter::multiplier() const
|
||||||
|
{
|
||||||
|
return m_multiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int AWFloatFormatter::precision() const
|
||||||
|
{
|
||||||
|
return m_precision;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double AWFloatFormatter::summand() const
|
||||||
|
{
|
||||||
|
return m_summand;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int AWFloatFormatter::width() const
|
||||||
|
{
|
||||||
|
return m_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setFillChar(const QChar _fillChar)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set char" << _fillChar;
|
||||||
|
|
||||||
|
m_fillChar = _fillChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setFormat(char _format)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set format" << _format;
|
||||||
|
// http://doc.qt.io/qt-5/qstring.html#argument-formats
|
||||||
|
if ((_format != 'e') && (_format != 'E') && (_format != 'f')
|
||||||
|
&& (_format != 'g') && (_format != 'G')) {
|
||||||
|
qCWarning(LOG_AW) << "Invalid format" << _format;
|
||||||
|
_format = 'f';
|
||||||
|
}
|
||||||
|
|
||||||
|
m_format = _format;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setMultiplier(const double _multiplier)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set multiplier" << _multiplier;
|
||||||
|
|
||||||
|
m_multiplier = _multiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setPrecision(const int _precision)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set precision" << _precision;
|
||||||
|
|
||||||
|
m_precision = _precision;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setSummand(const double _summand)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set summand" << _summand;
|
||||||
|
|
||||||
|
m_summand = _summand;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::setWidth(const int _width)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set width" << _width;
|
||||||
|
|
||||||
|
m_width = _width;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFloatFormatter::init(const QString filename, const QString section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
|
||||||
|
|
||||||
|
QSettings settings(filename, QSettings::IniFormat);
|
||||||
|
|
||||||
|
settings.beginGroup(section);
|
||||||
|
setFillChar(
|
||||||
|
settings.value(QString("FillChar"), QString()).toString().at(0));
|
||||||
|
setFormat(settings.value(QString("Format"), QString("f"))
|
||||||
|
.toString()
|
||||||
|
.at(0)
|
||||||
|
.toLatin1());
|
||||||
|
setMultiplier(settings.value(QString("Multiplier"), 1.0).toDouble());
|
||||||
|
setPrecision(settings.value(QString("Precision"), -1).toInt());
|
||||||
|
setSummand(settings.value(QString("Summand"), 0.0).toDouble());
|
||||||
|
setWidth(settings.value(QString("Width"), 0).toInt());
|
||||||
|
settings.endGroup();
|
||||||
|
}
|
69
sources/awesome-widget/plugin/awfloatformatter.h
Normal file
69
sources/awesome-widget/plugin/awfloatformatter.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef AWFLOATFORMATTER_H
|
||||||
|
#define AWFLOATFORMATTER_H
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWFloatFormatter : public AWAbstractFormatter
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QChar fillChar READ fillChar WRITE setFillChar)
|
||||||
|
Q_PROPERTY(char format READ format WRITE setFormat)
|
||||||
|
Q_PROPERTY(double multiplier READ multiplier WRITE setMultiplier)
|
||||||
|
Q_PROPERTY(int precision READ precision WRITE setPrecision)
|
||||||
|
Q_PROPERTY(double summand READ summand WRITE setSummand)
|
||||||
|
Q_PROPERTY(int width READ width WRITE setWidth)
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit AWFloatFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section);
|
||||||
|
explicit AWFloatFormatter(QObject *parent, const QChar fillChar,
|
||||||
|
const char format, const double multiplier,
|
||||||
|
const int precision, const double summand,
|
||||||
|
const int width);
|
||||||
|
virtual ~AWFloatFormatter();
|
||||||
|
QString convert(const QVariant &value) const;
|
||||||
|
// properties
|
||||||
|
QChar fillChar() const;
|
||||||
|
char format() const;
|
||||||
|
double multiplier() const;
|
||||||
|
int precision() const;
|
||||||
|
double summand() const;
|
||||||
|
int width() const;
|
||||||
|
void setFillChar(const QChar _fillChar);
|
||||||
|
void setFormat(char _format);
|
||||||
|
void setMultiplier(const double _multiplier);
|
||||||
|
void setPrecision(const int _precision);
|
||||||
|
void setSummand(const double _summand);
|
||||||
|
void setWidth(const int _width);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init(const QString filename, const QString section);
|
||||||
|
// properties
|
||||||
|
QChar m_fillChar;
|
||||||
|
char m_format;
|
||||||
|
double m_multiplier;
|
||||||
|
int m_precision;
|
||||||
|
double m_summand;
|
||||||
|
int m_width;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AWFLOATFORMATTER_H */
|
125
sources/awesome-widget/plugin/awformatterhelper.cpp
Normal file
125
sources/awesome-widget/plugin/awformatterhelper.cpp
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "awformatterhelper.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
|
#include "awdebug.h"
|
||||||
|
#include "awdatetimeformatter.h"
|
||||||
|
#include "awfloatformatter.h"
|
||||||
|
#include "awnoformatter.h"
|
||||||
|
#include "awscriptformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
AWFormatterHelper::AWFormatterHelper(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
m_genericConfig = QString("%1/awesomewidgets/general.ini")
|
||||||
|
.arg(QStandardPaths::writableLocation(
|
||||||
|
QStandardPaths::GenericDataLocation));
|
||||||
|
#ifdef BUILD_FUTURE
|
||||||
|
init();
|
||||||
|
#endif /* BUILD_FUTURE */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWFormatterHelper::~AWFormatterHelper()
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
m_formatters.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWFormatterHelper::convert(const QVariant &value,
|
||||||
|
const QString name) const
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Convert value" << value << "for" << name;
|
||||||
|
|
||||||
|
return m_formatters.contains(name) ? m_formatters[name]->convert(value)
|
||||||
|
: value.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QStringList AWFormatterHelper::definedFormatters() const
|
||||||
|
{
|
||||||
|
return m_formatters.keys();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWFormatterHelper::FormatterClass
|
||||||
|
AWFormatterHelper::defineFormatterClass(const QString name) const
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Define formatter class for" << name;
|
||||||
|
|
||||||
|
QSettings settings(m_genericConfig, QSettings::IniFormat);
|
||||||
|
|
||||||
|
settings.beginGroup(name);
|
||||||
|
QString stringType
|
||||||
|
= settings.value(QString("Type"), QString("NoFormat")).toString();
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
|
FormatterClass formatter = FormatterClass::NoFormat;
|
||||||
|
if (stringType == QString("DateTime"))
|
||||||
|
formatter = FormatterClass::DateTime;
|
||||||
|
else if (stringType == QString("Float"))
|
||||||
|
formatter = FormatterClass::Float;
|
||||||
|
else if (stringType == QString("Script"))
|
||||||
|
formatter = FormatterClass::Script;
|
||||||
|
else
|
||||||
|
qCWarning(LOG_AW) << "Unknown formatter" << stringType;
|
||||||
|
|
||||||
|
return formatter;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWFormatterHelper::init()
|
||||||
|
{
|
||||||
|
QSettings settings(m_genericConfig, QSettings::IniFormat);
|
||||||
|
|
||||||
|
settings.beginGroup(QString("Formatters"));
|
||||||
|
QStringList keys = settings.childKeys();
|
||||||
|
for (auto key : keys) {
|
||||||
|
QString name = settings.value(key).toString();
|
||||||
|
FormatterClass formatter = defineFormatterClass(name);
|
||||||
|
qCInfo(LOG_AW) << "Found formatter" << name << "for key" << key
|
||||||
|
<< "defined as" << static_cast<int>(formatter);
|
||||||
|
|
||||||
|
switch (formatter) {
|
||||||
|
case FormatterClass::DateTime:
|
||||||
|
m_formatters[key]
|
||||||
|
= new AWDateTimeFormatter(this, m_genericConfig, name);
|
||||||
|
break;
|
||||||
|
case FormatterClass::Float:
|
||||||
|
m_formatters[key]
|
||||||
|
= new AWFloatFormatter(this, m_genericConfig, name);
|
||||||
|
break;
|
||||||
|
case FormatterClass::Script:
|
||||||
|
m_formatters[key]
|
||||||
|
= new AWScriptFormatter(this, m_genericConfig, name);
|
||||||
|
break;
|
||||||
|
case FormatterClass::NoFormat:
|
||||||
|
m_formatters[key] = new AWNoFormatter(this, m_genericConfig, name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
settings.endGroup();
|
||||||
|
}
|
49
sources/awesome-widget/plugin/awformatterhelper.h
Normal file
49
sources/awesome-widget/plugin/awformatterhelper.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef AWFORMATTERHELPER_H
|
||||||
|
#define AWFORMATTERHELPER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWFormatterHelper : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum class FormatterClass { DateTime, Float, Script, NoFormat };
|
||||||
|
|
||||||
|
explicit AWFormatterHelper(QObject *parent = nullptr);
|
||||||
|
virtual ~AWFormatterHelper();
|
||||||
|
QString convert(const QVariant &value, const QString name) const;
|
||||||
|
QStringList definedFormatters() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
AWFormatterHelper::FormatterClass
|
||||||
|
defineFormatterClass(const QString name) const;
|
||||||
|
void init();
|
||||||
|
// properties
|
||||||
|
QString m_genericConfig;
|
||||||
|
QHash<QString, AWAbstractFormatter *> m_formatters;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AWFORMATTERHELPER_H */
|
@ -138,10 +138,12 @@ QStringList AWKeyCache::getRequiredKeys(const QStringList &keys,
|
|||||||
if (used.contains(QString("swaptotgb")))
|
if (used.contains(QString("swaptotgb")))
|
||||||
used << QString("swapgb") << QString("swapfreegb");
|
used << QString("swapgb") << QString("swapfreegb");
|
||||||
// network keys
|
// network keys
|
||||||
QStringList netKeys(QStringList() << QString("up") << QString("upkb")
|
QStringList netKeys(QStringList()
|
||||||
<< QString("upunits") << QString("down")
|
<< QString("up") << QString("upkb")
|
||||||
<< QString("downkb")
|
<< QString("uptotal") << QString("uptotalkb")
|
||||||
<< QString("downunits"));
|
<< QString("upunits") << QString("down")
|
||||||
|
<< QString("downkb") << QString("downtotal")
|
||||||
|
<< QString("downtotalkb") << QString("downunits"));
|
||||||
for (auto key : netKeys) {
|
for (auto key : netKeys) {
|
||||||
if (!used.contains(key))
|
if (!used.contains(key))
|
||||||
continue;
|
continue;
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "awkeycache.h"
|
#include "awkeycache.h"
|
||||||
#include "awpatternfunctions.h"
|
#include "awpatternfunctions.h"
|
||||||
#include "version.h"
|
|
||||||
// extensions
|
// extensions
|
||||||
#include "extquotes.h"
|
#include "extquotes.h"
|
||||||
#include "extscript.h"
|
#include "extscript.h"
|
||||||
@ -124,8 +123,12 @@ QStringList AWKeyOperations::dictKeys() const
|
|||||||
for (int i = m_devices[QString("net")].count() - 1; i >= 0; i--) {
|
for (int i = m_devices[QString("net")].count() - 1; i >= 0; i--) {
|
||||||
allKeys.append(QString("downunits%1").arg(i));
|
allKeys.append(QString("downunits%1").arg(i));
|
||||||
allKeys.append(QString("upunits%1").arg(i));
|
allKeys.append(QString("upunits%1").arg(i));
|
||||||
|
allKeys.append(QString("downtotalkb%1").arg(i));
|
||||||
|
allKeys.append(QString("downtotal%1").arg(i));
|
||||||
allKeys.append(QString("downkb%1").arg(i));
|
allKeys.append(QString("downkb%1").arg(i));
|
||||||
allKeys.append(QString("down%1").arg(i));
|
allKeys.append(QString("down%1").arg(i));
|
||||||
|
allKeys.append(QString("uptotalkb%1").arg(i));
|
||||||
|
allKeys.append(QString("uptotal%1").arg(i));
|
||||||
allKeys.append(QString("upkb%1").arg(i));
|
allKeys.append(QString("upkb%1").arg(i));
|
||||||
allKeys.append(QString("up%1").arg(i));
|
allKeys.append(QString("up%1").arg(i));
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <QJSEngine>
|
#include <QJSEngine>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include "awdataaggregator.h"
|
#include "awdataaggregator.h"
|
||||||
#include "awdataengineaggregator.h"
|
#include "awdataengineaggregator.h"
|
||||||
@ -30,7 +31,6 @@
|
|||||||
#include "awkeysaggregator.h"
|
#include "awkeysaggregator.h"
|
||||||
#include "awpatternfunctions.h"
|
#include "awpatternfunctions.h"
|
||||||
#include "graphicalitem.h"
|
#include "graphicalitem.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
AWKeys::AWKeys(QObject *parent)
|
AWKeys::AWKeys(QObject *parent)
|
||||||
@ -49,13 +49,16 @@ AWKeys::AWKeys(QObject *parent)
|
|||||||
dataEngineAggregator = new AWDataEngineAggregator(this);
|
dataEngineAggregator = new AWDataEngineAggregator(this);
|
||||||
keyOperator = new AWKeyOperations(this);
|
keyOperator = new AWKeyOperations(this);
|
||||||
|
|
||||||
|
m_timer = new QTimer(this);
|
||||||
|
m_timer->setSingleShot(false);
|
||||||
|
|
||||||
// update key data if required
|
// update key data if required
|
||||||
connect(keyOperator, SIGNAL(updateKeys(QStringList)), this,
|
connect(keyOperator, SIGNAL(updateKeys(QStringList)), this,
|
||||||
SLOT(reinitKeys(QStringList)));
|
SLOT(reinitKeys(QStringList)));
|
||||||
|
connect(m_timer, SIGNAL(timeout()), this, SLOT(updateTextData()));
|
||||||
// transfer signal from AWDataAggregator object to QML ui
|
// transfer signal from AWDataAggregator object to QML ui
|
||||||
connect(dataAggregator, SIGNAL(toolTipPainted(const QString)), this,
|
connect(dataAggregator, SIGNAL(toolTipPainted(const QString)), this,
|
||||||
SIGNAL(needToolTipToBeUpdated(const QString)));
|
SIGNAL(needToolTipToBeUpdated(const QString)));
|
||||||
connect(this, SIGNAL(needToBeUpdated()), this, SLOT(updateTextData()));
|
|
||||||
connect(this, SIGNAL(dropSourceFromDataengine(QString)),
|
connect(this, SIGNAL(dropSourceFromDataengine(QString)),
|
||||||
dataEngineAggregator, SLOT(dropSource(QString)));
|
dataEngineAggregator, SLOT(dropSource(QString)));
|
||||||
// transfer signal from dataengine to update source list
|
// transfer signal from dataengine to update source list
|
||||||
@ -68,6 +71,9 @@ AWKeys::~AWKeys()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
m_timer->stop();
|
||||||
|
delete m_timer;
|
||||||
|
|
||||||
// core
|
// core
|
||||||
delete dataEngineAggregator;
|
delete dataEngineAggregator;
|
||||||
delete m_threadPool;
|
delete m_threadPool;
|
||||||
@ -103,7 +109,11 @@ void AWKeys::initKeys(const QString currentPattern, const int interval,
|
|||||||
keyOperator->updateCache();
|
keyOperator->updateCache();
|
||||||
dataEngineAggregator->clear();
|
dataEngineAggregator->clear();
|
||||||
|
|
||||||
return dataEngineAggregator->initDataEngines(interval);
|
dataEngineAggregator->initDataEngines(interval);
|
||||||
|
|
||||||
|
// timer
|
||||||
|
m_timer->setInterval(interval);
|
||||||
|
m_timer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -168,7 +178,7 @@ QString AWKeys::valueByKey(QString key) const
|
|||||||
qCDebug(LOG_AW) << "Requested value for key" << key;
|
qCDebug(LOG_AW) << "Requested value for key" << key;
|
||||||
|
|
||||||
key.remove(QRegExp(QString("^bar[0-9]{1,}")));
|
key.remove(QRegExp(QString("^bar[0-9]{1,}")));
|
||||||
return aggregator->formater(values[key], key);
|
return aggregator->formatter(values[key], key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -183,12 +193,6 @@ void AWKeys::editItem(const QString type)
|
|||||||
void AWKeys::dataUpdated(const QString &sourceName,
|
void AWKeys::dataUpdated(const QString &sourceName,
|
||||||
const Plasma::DataEngine::Data &data)
|
const Plasma::DataEngine::Data &data)
|
||||||
{
|
{
|
||||||
// do not log these parameters
|
|
||||||
if (sourceName == QString("update")) {
|
|
||||||
qCInfo(LOG_AW) << "Update data";
|
|
||||||
return emit(needToBeUpdated());
|
|
||||||
}
|
|
||||||
|
|
||||||
// run concurrent data update
|
// run concurrent data update
|
||||||
QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
|
QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
|
||||||
data);
|
data);
|
||||||
@ -268,9 +272,14 @@ void AWKeys::calculateValues()
|
|||||||
.indexOf(values[QString("netdev")].toString());
|
.indexOf(values[QString("netdev")].toString());
|
||||||
values[QString("down")] = values[QString("down%1").arg(netIndex)];
|
values[QString("down")] = values[QString("down%1").arg(netIndex)];
|
||||||
values[QString("downkb")] = values[QString("downkb%1").arg(netIndex)];
|
values[QString("downkb")] = values[QString("downkb%1").arg(netIndex)];
|
||||||
|
values[QString("downtotal")] = values[QString("downtotal%1").arg(netIndex)];
|
||||||
|
values[QString("downtotalkb")]
|
||||||
|
= values[QString("downtotalkb%1").arg(netIndex)];
|
||||||
values[QString("downunits")] = values[QString("downunits%1").arg(netIndex)];
|
values[QString("downunits")] = values[QString("downunits%1").arg(netIndex)];
|
||||||
values[QString("up")] = values[QString("up%1").arg(netIndex)];
|
values[QString("up")] = values[QString("up%1").arg(netIndex)];
|
||||||
values[QString("upkb")] = values[QString("upkb%1").arg(netIndex)];
|
values[QString("upkb")] = values[QString("upkb%1").arg(netIndex)];
|
||||||
|
values[QString("uptotal")] = values[QString("uptotal%1").arg(netIndex)];
|
||||||
|
values[QString("uptotalkb")] = values[QString("uptotalkb%1").arg(netIndex)];
|
||||||
values[QString("upunits")] = values[QString("upunits%1").arg(netIndex)];
|
values[QString("upunits")] = values[QString("upunits%1").arg(netIndex)];
|
||||||
|
|
||||||
// swaptot*
|
// swaptot*
|
||||||
@ -302,7 +311,7 @@ QString AWKeys::parsePattern(QString pattern) const
|
|||||||
for (auto key : m_foundKeys)
|
for (auto key : m_foundKeys)
|
||||||
pattern.replace(QString("$%1").arg(key), [this](const QString &tag,
|
pattern.replace(QString("$%1").arg(key), [this](const QString &tag,
|
||||||
const QVariant &value) {
|
const QVariant &value) {
|
||||||
QString strValue = aggregator->formater(value, tag);
|
QString strValue = aggregator->formatter(value, tag);
|
||||||
if ((!tag.startsWith(QString("custom")))
|
if ((!tag.startsWith(QString("custom")))
|
||||||
&& (!tag.startsWith(QString("weather"))))
|
&& (!tag.startsWith(QString("weather"))))
|
||||||
strValue.replace(QString(" "), QString(" "));
|
strValue.replace(QString(" "), QString(" "));
|
||||||
@ -312,14 +321,12 @@ QString AWKeys::parsePattern(QString pattern) const
|
|||||||
// bars
|
// bars
|
||||||
for (auto bar : m_foundBars) {
|
for (auto bar : m_foundBars) {
|
||||||
GraphicalItem *item = keyOperator->giByKey(bar);
|
GraphicalItem *item = keyOperator->giByKey(bar);
|
||||||
if (item->isCustom())
|
QString image
|
||||||
pattern.replace(
|
= item->isCustom()
|
||||||
QString("$%1").arg(bar),
|
? item->image(AWPatternFunctions::expandLambdas(
|
||||||
item->image(AWPatternFunctions::expandLambdas(
|
item->bar(), aggregator, values, item->usedKeys()))
|
||||||
item->bar(), aggregator, values, item->usedKeys())));
|
: item->image(values[item->bar()]);
|
||||||
else
|
pattern.replace(QString("$%1").arg(bar), image);
|
||||||
pattern.replace(QString("$%1").arg(bar),
|
|
||||||
item->image(values[item->bar()]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepare strings
|
// prepare strings
|
||||||
|
@ -30,6 +30,7 @@ class AWDataEngineAggregator;
|
|||||||
class AWKeyOperations;
|
class AWKeyOperations;
|
||||||
class AWKeysAggregator;
|
class AWKeysAggregator;
|
||||||
class QThreadPool;
|
class QThreadPool;
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
class AWKeys : public QObject
|
class AWKeys : public QObject
|
||||||
{
|
{
|
||||||
@ -67,7 +68,6 @@ signals:
|
|||||||
void dropSourceFromDataengine(const QString source);
|
void dropSourceFromDataengine(const QString source);
|
||||||
void needTextToBeUpdated(const QString newText) const;
|
void needTextToBeUpdated(const QString newText) const;
|
||||||
void needToolTipToBeUpdated(const QString newText) const;
|
void needToolTipToBeUpdated(const QString newText) const;
|
||||||
void needToBeUpdated();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void reinitKeys(const QStringList currentKeys);
|
void reinitKeys(const QStringList currentKeys);
|
||||||
@ -83,6 +83,7 @@ private:
|
|||||||
AWDataEngineAggregator *dataEngineAggregator = nullptr;
|
AWDataEngineAggregator *dataEngineAggregator = nullptr;
|
||||||
AWKeysAggregator *aggregator = nullptr;
|
AWKeysAggregator *aggregator = nullptr;
|
||||||
AWKeyOperations *keyOperator = nullptr;
|
AWKeyOperations *keyOperator = nullptr;
|
||||||
|
QTimer *m_timer = nullptr;
|
||||||
// variables
|
// variables
|
||||||
QVariantMap m_tooltipParams;
|
QVariantMap m_tooltipParams;
|
||||||
QStringList m_foundBars, m_foundKeys, m_foundLambdas, m_requiredKeys;
|
QStringList m_foundBars, m_foundKeys, m_foundLambdas, m_requiredKeys;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
#include "awformatterhelper.h"
|
||||||
|
|
||||||
|
|
||||||
AWKeysAggregator::AWKeysAggregator(QObject *parent)
|
AWKeysAggregator::AWKeysAggregator(QObject *parent)
|
||||||
@ -31,69 +32,73 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent)
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
// default formaters
|
// default formatters
|
||||||
// memory
|
// memory
|
||||||
m_formater[QString("mem")] = Float;
|
m_formatter[QString("mem")] = FormatterType::Float;
|
||||||
m_formater[QString("memtotmb")] = IntegerFive;
|
m_formatter[QString("memtotmb")] = FormatterType::MemMBFormat;
|
||||||
m_formater[QString("memtotgb")] = Float;
|
m_formatter[QString("memtotgb")] = FormatterType::MemGBFormat;
|
||||||
// network
|
// network
|
||||||
m_formater[QString("down")] = NetSmartFormat;
|
m_formatter[QString("down")] = FormatterType::NetSmartFormat;
|
||||||
m_formater[QString("downkb")] = Integer;
|
m_formatter[QString("downkb")] = FormatterType::Integer;
|
||||||
m_formater[QString("downunits")] = NetSmartUnits;
|
m_formatter[QString("downunits")] = FormatterType::NetSmartUnits;
|
||||||
m_formater[QString("up")] = NetSmartFormat;
|
m_formatter[QString("up")] = FormatterType::NetSmartFormat;
|
||||||
m_formater[QString("upkb")] = Integer;
|
m_formatter[QString("upkb")] = FormatterType::Integer;
|
||||||
m_formater[QString("upunits")] = NetSmartUnits;
|
m_formatter[QString("upunits")] = FormatterType::NetSmartUnits;
|
||||||
// swap
|
// swap
|
||||||
m_formater[QString("swap")] = Float;
|
m_formatter[QString("swap")] = FormatterType::Float;
|
||||||
m_formater[QString("swaptotmb")] = IntegerFive;
|
m_formatter[QString("swaptotmb")] = FormatterType::MemMBFormat;
|
||||||
m_formater[QString("swaptotgb")] = Float;
|
m_formatter[QString("swaptotgb")] = FormatterType::MemGBFormat;
|
||||||
|
|
||||||
|
m_customFormatters = new AWFormatterHelper(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AWKeysAggregator::~AWKeysAggregator()
|
AWKeysAggregator::~AWKeysAggregator()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
delete m_customFormatters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString AWKeysAggregator::formater(const QVariant &data,
|
QString AWKeysAggregator::formatter(const QVariant &data,
|
||||||
const QString &key) const
|
const QString &key) const
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << "Data" << data << "for key" << key;
|
qCDebug(LOG_AW) << "Data" << data << "for key" << key;
|
||||||
|
|
||||||
QString output;
|
QString output;
|
||||||
QLocale loc = m_translate ? QLocale::system() : QLocale::c();
|
QLocale loc = m_translate ? QLocale::system() : QLocale::c();
|
||||||
// case block
|
// case block
|
||||||
switch (m_formater[key]) {
|
switch (m_formatter[key]) {
|
||||||
case Float:
|
case FormatterType::Float:
|
||||||
output = QString("%1").arg(data.toFloat(), 5, 'f', 1);
|
output = QString("%1").arg(data.toFloat(), 5, 'f', 1);
|
||||||
break;
|
break;
|
||||||
case FloatTwoSymbols:
|
case FormatterType::FloatTwoSymbols:
|
||||||
output = QString("%1").arg(data.toFloat(), 5, 'f', 2);
|
output = QString("%1").arg(data.toFloat(), 5, 'f', 2);
|
||||||
break;
|
break;
|
||||||
case Integer:
|
case FormatterType::Integer:
|
||||||
output = QString("%1").arg(data.toFloat(), 4, 'f', 0);
|
output = QString("%1").arg(data.toFloat(), 4, 'f', 0);
|
||||||
break;
|
break;
|
||||||
case IntegerFive:
|
case FormatterType::IntegerFive:
|
||||||
output = QString("%1").arg(data.toFloat(), 5, 'f', 0);
|
output = QString("%1").arg(data.toFloat(), 5, 'f', 0);
|
||||||
break;
|
break;
|
||||||
case IntegerThree:
|
case FormatterType::IntegerThree:
|
||||||
output = QString("%1").arg(data.toFloat(), 3, 'f', 0);
|
output = QString("%1").arg(data.toFloat(), 3, 'f', 0);
|
||||||
break;
|
break;
|
||||||
case List:
|
case FormatterType::List:
|
||||||
output = data.toStringList().join(QChar(','));
|
output = data.toStringList().join(QChar(','));
|
||||||
break;
|
break;
|
||||||
case ACFormat:
|
case FormatterType::ACFormat:
|
||||||
output = data.toBool() ? m_acOnline : m_acOffline;
|
output = data.toBool() ? m_acOnline : m_acOffline;
|
||||||
break;
|
break;
|
||||||
case MemGBFormat:
|
case FormatterType::MemGBFormat:
|
||||||
output
|
output
|
||||||
= QString("%1").arg(data.toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
|
= QString("%1").arg(data.toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
|
||||||
break;
|
break;
|
||||||
case MemMBFormat:
|
case FormatterType::MemMBFormat:
|
||||||
output = QString("%1").arg(data.toFloat() / 1024.0, 5, 'f', 0);
|
output = QString("%1").arg(data.toFloat() / 1024.0, 5, 'f', 0);
|
||||||
break;
|
break;
|
||||||
case NetSmartFormat:
|
case FormatterType::NetSmartFormat:
|
||||||
output = [](const float value) {
|
output = [](const float value) {
|
||||||
if (value > 1024.0)
|
if (value > 1024.0)
|
||||||
return QString("%1").arg(value / 1024.0, 4, 'f', 1);
|
return QString("%1").arg(value / 1024.0, 4, 'f', 1);
|
||||||
@ -101,41 +106,45 @@ QString AWKeysAggregator::formater(const QVariant &data,
|
|||||||
return QString("%1").arg(value, 4, 'f', 0);
|
return QString("%1").arg(value, 4, 'f', 0);
|
||||||
}(data.toFloat());
|
}(data.toFloat());
|
||||||
break;
|
break;
|
||||||
case NetSmartUnits:
|
case FormatterType::NetSmartUnits:
|
||||||
if (data.toFloat() > 1024.0)
|
if (data.toFloat() > 1024.0)
|
||||||
output = m_translate ? i18n("MB/s") : QString("MB/s");
|
output = m_translate ? i18n("MB/s") : QString("MB/s");
|
||||||
else
|
else
|
||||||
output = m_translate ? i18n("KB/s") : QString("KB/s");
|
output = m_translate ? i18n("KB/s") : QString("KB/s");
|
||||||
break;
|
break;
|
||||||
case Quotes:
|
case FormatterType::Quotes:
|
||||||
// first cast
|
// first cast
|
||||||
output = QString("%1").arg(data.toDouble(), 0, 'f');
|
output = QString("%1").arg(data.toDouble(), 0, 'f');
|
||||||
output = output.rightJustified(8, QLatin1Char(' '), true);
|
output = output.rightJustified(8, QLatin1Char(' '), true);
|
||||||
break;
|
break;
|
||||||
case Temperature:
|
case FormatterType::Temperature:
|
||||||
output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1);
|
output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1);
|
||||||
break;
|
break;
|
||||||
case Time:
|
case FormatterType::Time:
|
||||||
output = data.toDateTime().toString();
|
output = data.toDateTime().toString();
|
||||||
break;
|
break;
|
||||||
case TimeCustom:
|
case FormatterType::TimeCustom:
|
||||||
output = m_customTime;
|
output = m_customTime;
|
||||||
[&output, loc, this](const QDateTime dt) {
|
[&output, loc, this](const QDateTime dt) {
|
||||||
for (auto key : timeKeys)
|
for (auto key : timeKeys)
|
||||||
output.replace(QString("$%1").arg(key), loc.toString(dt, key));
|
output.replace(QString("$%1").arg(key), loc.toString(dt, key));
|
||||||
}(data.toDateTime());
|
}(data.toDateTime());
|
||||||
break;
|
break;
|
||||||
case TimeISO:
|
case FormatterType::TimeISO:
|
||||||
output = data.toDateTime().toString(Qt::ISODate);
|
output = data.toDateTime().toString(Qt::ISODate);
|
||||||
break;
|
break;
|
||||||
case TimeLong:
|
case FormatterType::TimeLong:
|
||||||
output = loc.toString(data.toDateTime(), QLocale::LongFormat);
|
output = loc.toString(data.toDateTime(), QLocale::LongFormat);
|
||||||
break;
|
break;
|
||||||
case TimeShort:
|
case FormatterType::TimeShort:
|
||||||
output = loc.toString(data.toDateTime(), QLocale::ShortFormat);
|
output = loc.toString(data.toDateTime(), QLocale::ShortFormat);
|
||||||
break;
|
break;
|
||||||
case Uptime:
|
case FormatterType::Timestamp:
|
||||||
case UptimeCustom:
|
output = QString("%1").arg(
|
||||||
|
data.toDateTime().toMSecsSinceEpoch() / 1000.0, 10, 'f', 0);
|
||||||
|
break;
|
||||||
|
case FormatterType::Uptime:
|
||||||
|
case FormatterType::UptimeCustom:
|
||||||
output =
|
output =
|
||||||
[](QString source, const int uptime) {
|
[](QString source, const int uptime) {
|
||||||
int seconds = uptime - uptime % 60;
|
int seconds = uptime - uptime % 60;
|
||||||
@ -152,15 +161,16 @@ QString AWKeysAggregator::formater(const QVariant &data,
|
|||||||
QString("%1").arg(minutes, 2, 10, QChar('0')));
|
QString("%1").arg(minutes, 2, 10, QChar('0')));
|
||||||
source.replace(QString("$m"), QString("%1").arg(minutes));
|
source.replace(QString("$m"), QString("%1").arg(minutes));
|
||||||
return source;
|
return source;
|
||||||
}(m_formater[key] == Uptime ? QString("$ddd$hhh$mmm")
|
}(m_formatter[key] == FormatterType::Uptime
|
||||||
: m_customUptime,
|
? QString("$ddd$hhh$mmm")
|
||||||
|
: m_customUptime,
|
||||||
static_cast<int>(data.toFloat()));
|
static_cast<int>(data.toFloat()));
|
||||||
break;
|
break;
|
||||||
case NoFormat:
|
case FormatterType::NoFormat:
|
||||||
output = data.toString();
|
output = data.toString();
|
||||||
break;
|
break;
|
||||||
default:
|
case FormatterType::Custom:
|
||||||
output = QString();
|
output = m_customFormatters->convert(data, key);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,56 +260,58 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
QRegExp mountUsedRegExp = QRegExp(QString("partitions/.*/usedspace"));
|
QRegExp mountUsedRegExp = QRegExp(QString("partitions/.*/usedspace"));
|
||||||
QRegExp netRegExp = QRegExp(
|
QRegExp netRegExp = QRegExp(
|
||||||
QString("network/interfaces/.*/(receiver|transmitter)/data$"));
|
QString("network/interfaces/.*/(receiver|transmitter)/data$"));
|
||||||
|
QRegExp netTotalRegExp = QRegExp(
|
||||||
|
QString("network/interfaces/.*/(receiver|transmitter)/dataTotal$"));
|
||||||
|
|
||||||
if (source == QString("battery/ac")) {
|
if (source == QString("battery/ac")) {
|
||||||
// AC
|
// AC
|
||||||
m_map[source] = QString("ac");
|
m_map[source] = QString("ac");
|
||||||
m_formater[QString("ac")] = ACFormat;
|
m_formatter[QString("ac")] = FormatterType::ACFormat;
|
||||||
} else if (source.startsWith(QString("battery/"))) {
|
} else if (source.startsWith(QString("battery/"))) {
|
||||||
// battery stats
|
// battery stats
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("battery/"));
|
key.remove(QString("battery/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = IntegerThree;
|
m_formatter[key] = FormatterType::IntegerThree;
|
||||||
} else if (source == QString("cpu/system/TotalLoad")) {
|
} else if (source == QString("cpu/system/TotalLoad")) {
|
||||||
// cpu
|
// cpu
|
||||||
m_map[source] = QString("cpu");
|
m_map[source] = QString("cpu");
|
||||||
m_formater[QString("cpu")] = Float;
|
m_formatter[QString("cpu")] = FormatterType::Float;
|
||||||
} else if (source.contains(cpuRegExp)) {
|
} else if (source.contains(cpuRegExp)) {
|
||||||
// cpus
|
// cpus
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("cpu/")).remove(QString("/TotalLoad"));
|
key.remove(QString("cpu/")).remove(QString("/TotalLoad"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Float;
|
m_formatter[key] = FormatterType::Float;
|
||||||
} else if (source == QString("cpu/system/AverageClock")) {
|
} else if (source == QString("cpu/system/AverageClock")) {
|
||||||
// cpucl
|
// cpucl
|
||||||
m_map[source] = QString("cpucl");
|
m_map[source] = QString("cpucl");
|
||||||
m_formater[QString("cpucl")] = Integer;
|
m_formatter[QString("cpucl")] = FormatterType::Integer;
|
||||||
} else if (source.contains(cpuclRegExp)) {
|
} else if (source.contains(cpuclRegExp)) {
|
||||||
// cpucls
|
// cpucls
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("cpu/cpu")).remove(QString("/clock"));
|
key.remove(QString("cpu/cpu")).remove(QString("/clock"));
|
||||||
key = QString("cpucl%1").arg(key);
|
key = QString("cpucl%1").arg(key);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Integer;
|
m_formatter[key] = FormatterType::Integer;
|
||||||
} else if (source.startsWith(QString("custom"))) {
|
} else if (source.startsWith(QString("custom"))) {
|
||||||
// custom
|
// custom
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("custom/"));
|
key.remove(QString("custom/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = NoFormat;
|
m_formatter[key] = FormatterType::NoFormat;
|
||||||
} else if (source == QString("desktop/current/name")) {
|
} else if (source == QString("desktop/current/name")) {
|
||||||
// current desktop name
|
// current desktop name
|
||||||
m_map[source] = QString("desktop");
|
m_map[source] = QString("desktop");
|
||||||
m_formater[QString("desktop")] = NoFormat;
|
m_formatter[QString("desktop")] = FormatterType::NoFormat;
|
||||||
} else if (source == QString("desktop/current/number")) {
|
} else if (source == QString("desktop/current/number")) {
|
||||||
// current desktop number
|
// current desktop number
|
||||||
m_map[source] = QString("ndesktop");
|
m_map[source] = QString("ndesktop");
|
||||||
m_formater[QString("ndesktop")] = NoFormat;
|
m_formatter[QString("ndesktop")] = FormatterType::NoFormat;
|
||||||
} else if (source == QString("desktop/total/number")) {
|
} else if (source == QString("desktop/total/number")) {
|
||||||
// desktop count
|
// desktop count
|
||||||
m_map[source] = QString("tdesktops");
|
m_map[source] = QString("tdesktops");
|
||||||
m_formater[QString("tdesktops")] = NoFormat;
|
m_formatter[QString("tdesktops")] = FormatterType::NoFormat;
|
||||||
} else if (source.contains(hddrRegExp)) {
|
} else if (source.contains(hddrRegExp)) {
|
||||||
// read speed
|
// read speed
|
||||||
QString device = source;
|
QString device = source;
|
||||||
@ -308,7 +320,7 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
QString key = QString("hddr%1").arg(index);
|
QString key = QString("hddr%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Integer;
|
m_formatter[key] = FormatterType::Integer;
|
||||||
}
|
}
|
||||||
} else if (source.contains(hddwRegExp)) {
|
} else if (source.contains(hddwRegExp)) {
|
||||||
// write speed
|
// write speed
|
||||||
@ -318,16 +330,16 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
QString key = QString("hddw%1").arg(index);
|
QString key = QString("hddw%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Integer;
|
m_formatter[key] = FormatterType::Integer;
|
||||||
}
|
}
|
||||||
} else if (source == QString("gpu/load")) {
|
} else if (source == QString("gpu/load")) {
|
||||||
// gpu load
|
// gpu load
|
||||||
m_map[source] = QString("gpu");
|
m_map[source] = QString("gpu");
|
||||||
m_formater[QString("gpu")] = Float;
|
m_formatter[QString("gpu")] = FormatterType::Float;
|
||||||
} else if (source == QString("gpu/temperature")) {
|
} else if (source == QString("gpu/temperature")) {
|
||||||
// gpu temperature
|
// gpu temperature
|
||||||
m_map[source] = QString("gputemp");
|
m_map[source] = QString("gputemp");
|
||||||
m_formater[QString("gputemp")] = Temperature;
|
m_formatter[QString("gputemp")] = FormatterType::Temperature;
|
||||||
} else if (source.contains(mountFillRegExp)) {
|
} else if (source.contains(mountFillRegExp)) {
|
||||||
// fill level
|
// fill level
|
||||||
QString device = source;
|
QString device = source;
|
||||||
@ -336,10 +348,12 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
QString key = QString("hdd%1").arg(index);
|
QString key = QString("hdd%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Float;
|
m_formatter[key] = FormatterType::Float;
|
||||||
// additional keys
|
// additional keys
|
||||||
m_formater[QString("hddtotmb%1").arg(index)] = IntegerFive;
|
m_formatter[QString("hddtotmb%1").arg(index)]
|
||||||
m_formater[QString("hddtotgb%1").arg(index)] = Float;
|
= FormatterType::MemMBFormat;
|
||||||
|
m_formatter[QString("hddtotgb%1").arg(index)]
|
||||||
|
= FormatterType::MemGBFormat;
|
||||||
}
|
}
|
||||||
} else if (source.contains(mountFreeRegExp)) {
|
} else if (source.contains(mountFreeRegExp)) {
|
||||||
// free space
|
// free space
|
||||||
@ -350,11 +364,11 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
// mb
|
// mb
|
||||||
QString key = QString("hddfreemb%1").arg(index);
|
QString key = QString("hddfreemb%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = MemMBFormat;
|
m_formatter[key] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
key = QString("hddfreegb%1").arg(index);
|
key = QString("hddfreegb%1").arg(index);
|
||||||
m_map.insertMulti(source, key);
|
m_map.insertMulti(source, key);
|
||||||
m_formater[key] = MemGBFormat;
|
m_formatter[key] = FormatterType::MemGBFormat;
|
||||||
}
|
}
|
||||||
} else if (source.contains(mountUsedRegExp)) {
|
} else if (source.contains(mountUsedRegExp)) {
|
||||||
// used
|
// used
|
||||||
@ -365,11 +379,11 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
// mb
|
// mb
|
||||||
QString key = QString("hddmb%1").arg(index);
|
QString key = QString("hddmb%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = MemMBFormat;
|
m_formatter[key] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
key = QString("hddgb%1").arg(index);
|
key = QString("hddgb%1").arg(index);
|
||||||
m_map.insertMulti(source, key);
|
m_map.insertMulti(source, key);
|
||||||
m_formater[key] = MemGBFormat;
|
m_formatter[key] = FormatterType::MemGBFormat;
|
||||||
}
|
}
|
||||||
} else if (source.startsWith(QString("hdd/temperature"))) {
|
} else if (source.startsWith(QString("hdd/temperature"))) {
|
||||||
// hdd temperature
|
// hdd temperature
|
||||||
@ -379,7 +393,7 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
QString key = QString("hddtemp%1").arg(index);
|
QString key = QString("hddtemp%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Temperature;
|
m_formatter[key] = FormatterType::Temperature;
|
||||||
}
|
}
|
||||||
} else if (source.startsWith(QString("cpu/system/loadavg"))) {
|
} else if (source.startsWith(QString("cpu/system/loadavg"))) {
|
||||||
// load average
|
// load average
|
||||||
@ -387,35 +401,35 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
time.remove(QString("cpu/system/loadavg"));
|
time.remove(QString("cpu/system/loadavg"));
|
||||||
QString key = QString("la%1").arg(time);
|
QString key = QString("la%1").arg(time);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = FloatTwoSymbols;
|
m_formatter[key] = FormatterType::FloatTwoSymbols;
|
||||||
} else if (source == QString("mem/physical/application")) {
|
} else if (source == QString("mem/physical/application")) {
|
||||||
// app memory
|
// app memory
|
||||||
// mb
|
// mb
|
||||||
m_map[source] = QString("memmb");
|
m_map[source] = QString("memmb");
|
||||||
m_formater[QString("memmb")] = MemMBFormat;
|
m_formatter[QString("memmb")] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
m_map.insertMulti(source, QString("memgb"));
|
m_map.insertMulti(source, QString("memgb"));
|
||||||
m_formater[QString("memgb")] = MemGBFormat;
|
m_formatter[QString("memgb")] = FormatterType::MemGBFormat;
|
||||||
} else if (source == QString("mem/physical/free")) {
|
} else if (source == QString("mem/physical/free")) {
|
||||||
// free memory
|
// free memory
|
||||||
// mb
|
// mb
|
||||||
m_map[source] = QString("memfreemb");
|
m_map[source] = QString("memfreemb");
|
||||||
m_formater[QString("memfreemb")] = MemMBFormat;
|
m_formatter[QString("memfreemb")] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
m_map.insertMulti(source, QString("memfreegb"));
|
m_map.insertMulti(source, QString("memfreegb"));
|
||||||
m_formater[QString("memfreegb")] = MemGBFormat;
|
m_formatter[QString("memfreegb")] = FormatterType::MemGBFormat;
|
||||||
} else if (source == QString("mem/physical/used")) {
|
} else if (source == QString("mem/physical/used")) {
|
||||||
// used memory
|
// used memory
|
||||||
// mb
|
// mb
|
||||||
m_map[source] = QString("memusedmb");
|
m_map[source] = QString("memusedmb");
|
||||||
m_formater[QString("memusedmb")] = MemMBFormat;
|
m_formatter[QString("memusedmb")] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
m_map.insertMulti(source, QString("memusedgb"));
|
m_map.insertMulti(source, QString("memusedgb"));
|
||||||
m_formater[QString("memusedgb")] = MemGBFormat;
|
m_formatter[QString("memusedgb")] = FormatterType::MemGBFormat;
|
||||||
} else if (source == QString("network/current/name")) {
|
} else if (source == QString("network/current/name")) {
|
||||||
// network device
|
// network device
|
||||||
m_map[source] = QString("netdev");
|
m_map[source] = QString("netdev");
|
||||||
m_formater[QString("netdev")] = NoFormat;
|
m_formatter[QString("netdev")] = FormatterType::NoFormat;
|
||||||
} else if (source.contains(netRegExp)) {
|
} else if (source.contains(netRegExp)) {
|
||||||
// network speed
|
// network speed
|
||||||
QString type = source.contains(QString("receiver")) ? QString("down")
|
QString type = source.contains(QString("receiver")) ? QString("down")
|
||||||
@ -426,62 +440,78 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
// kb
|
// kb
|
||||||
QString key = QString("%1kb%2").arg(type).arg(index);
|
QString key = QString("%1kb%2").arg(type).arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Integer;
|
m_formatter[key] = FormatterType::Integer;
|
||||||
// smart
|
// smart
|
||||||
key = QString("%1%2").arg(type).arg(index);
|
key = QString("%1%2").arg(type).arg(index);
|
||||||
m_map.insertMulti(source, key);
|
m_map.insertMulti(source, key);
|
||||||
m_formater[key] = NetSmartFormat;
|
m_formatter[key] = FormatterType::NetSmartFormat;
|
||||||
// units
|
// units
|
||||||
key = QString("%1units%2").arg(type).arg(index);
|
key = QString("%1units%2").arg(type).arg(index);
|
||||||
m_map.insertMulti(source, key);
|
m_map.insertMulti(source, key);
|
||||||
m_formater[key] = NetSmartUnits;
|
m_formatter[key] = FormatterType::NetSmartUnits;
|
||||||
|
}
|
||||||
|
} else if (source.contains(netTotalRegExp)) {
|
||||||
|
// network data total
|
||||||
|
QString type = source.contains(QString("receiver")) ? QString("down")
|
||||||
|
: QString("up");
|
||||||
|
int index
|
||||||
|
= m_devices[QString("net")].indexOf(source.split(QChar('/'))[2]);
|
||||||
|
if (index > -1) {
|
||||||
|
// kb
|
||||||
|
QString key = QString("%1totalkb%2").arg(type).arg(index);
|
||||||
|
m_map[source] = key;
|
||||||
|
m_formatter[key] = FormatterType::Integer;
|
||||||
|
// mb
|
||||||
|
key = QString("%1total%2").arg(type).arg(index);
|
||||||
|
m_map.insertMulti(source, key);
|
||||||
|
m_formatter[key] = FormatterType::MemMBFormat;
|
||||||
}
|
}
|
||||||
} else if (source.startsWith(QString("upgrade"))) {
|
} else if (source.startsWith(QString("upgrade"))) {
|
||||||
// package manager
|
// package manager
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("upgrade/"));
|
key.remove(QString("upgrade/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = IntegerThree;
|
m_formatter[key] = FormatterType::IntegerThree;
|
||||||
} else if (source.startsWith(QString("player"))) {
|
} else if (source.startsWith(QString("player"))) {
|
||||||
// player
|
// player
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("player/"));
|
key.remove(QString("player/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = NoFormat;
|
m_formatter[key] = FormatterType::NoFormat;
|
||||||
} else if (source == QString("ps/running/count")) {
|
} else if (source == QString("ps/running/count")) {
|
||||||
// running processes count
|
// running processes count
|
||||||
m_map[source] = QString("pscount");
|
m_map[source] = QString("pscount");
|
||||||
m_formater[QString("pscount")] = NoFormat;
|
m_formatter[QString("pscount")] = FormatterType::NoFormat;
|
||||||
} else if (source == QString("ps/running/list")) {
|
} else if (source == QString("ps/running/list")) {
|
||||||
// list of running processes
|
// list of running processes
|
||||||
m_map[source] = QString("ps");
|
m_map[source] = QString("ps");
|
||||||
m_formater[QString("ps")] = List;
|
m_formatter[QString("ps")] = FormatterType::List;
|
||||||
} else if (source == QString("ps/total/count")) {
|
} else if (source == QString("ps/total/count")) {
|
||||||
// total processes count
|
// total processes count
|
||||||
m_map[source] = QString("pstotal");
|
m_map[source] = QString("pstotal");
|
||||||
m_formater[QString("pstotal")] = NoFormat;
|
m_formatter[QString("pstotal")] = FormatterType::NoFormat;
|
||||||
} else if (source.startsWith(QString("quotes"))) {
|
} else if (source.startsWith(QString("quotes"))) {
|
||||||
// quotes
|
// quotes
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("quotes/"));
|
key.remove(QString("quotes/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Quotes;
|
m_formatter[key] = FormatterType::Quotes;
|
||||||
} else if (source == QString("mem/swap/free")) {
|
} else if (source == QString("mem/swap/free")) {
|
||||||
// free swap
|
// free swap
|
||||||
// mb
|
// mb
|
||||||
m_map[source] = QString("swapfreemb");
|
m_map[source] = QString("swapfreemb");
|
||||||
m_formater[QString("swapfreemb")] = MemMBFormat;
|
m_formatter[QString("swapfreemb")] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
m_map.insertMulti(source, QString("swapfreegb"));
|
m_map.insertMulti(source, QString("swapfreegb"));
|
||||||
m_formater[QString("swapfreegb")] = MemGBFormat;
|
m_formatter[QString("swapfreegb")] = FormatterType::MemGBFormat;
|
||||||
} else if (source == QString("mem/swap/used")) {
|
} else if (source == QString("mem/swap/used")) {
|
||||||
// used swap
|
// used swap
|
||||||
// mb
|
// mb
|
||||||
m_map[source] = QString("swapmb");
|
m_map[source] = QString("swapmb");
|
||||||
m_formater[QString("swapmb")] = MemMBFormat;
|
m_formatter[QString("swapmb")] = FormatterType::MemMBFormat;
|
||||||
// gb
|
// gb
|
||||||
m_map.insertMulti(source, QString("swapgb"));
|
m_map.insertMulti(source, QString("swapgb"));
|
||||||
m_formater[QString("swapgb")] = MemGBFormat;
|
m_formatter[QString("swapgb")] = FormatterType::MemGBFormat;
|
||||||
} else if (source.startsWith(QString("lmsensors/"))) {
|
} else if (source.startsWith(QString("lmsensors/"))) {
|
||||||
// temperature
|
// temperature
|
||||||
int index = m_devices[QString("temp")].indexOf(source);
|
int index = m_devices[QString("temp")].indexOf(source);
|
||||||
@ -491,63 +521,80 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
QString key = QString("temp%1").arg(index);
|
QString key = QString("temp%1").arg(index);
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = units == QString("°C") ? Temperature : Integer;
|
m_formatter[key] = units == QString("°C")
|
||||||
|
? FormatterType::Temperature
|
||||||
|
: FormatterType::Integer;
|
||||||
}
|
}
|
||||||
} else if (source == QString("Local")) {
|
} else if (source == QString("Local")) {
|
||||||
// time
|
// time
|
||||||
m_map[source] = QString("time");
|
m_map[source] = QString("time");
|
||||||
m_formater[QString("time")] = Time;
|
m_formatter[QString("time")] = FormatterType::Time;
|
||||||
// custom time
|
// custom time
|
||||||
m_map.insertMulti(source, QString("ctime"));
|
m_map.insertMulti(source, QString("ctime"));
|
||||||
m_formater[QString("ctime")] = TimeCustom;
|
m_formatter[QString("ctime")] = FormatterType::TimeCustom;
|
||||||
// ISO time
|
// ISO time
|
||||||
m_map.insertMulti(source, QString("isotime"));
|
m_map.insertMulti(source, QString("isotime"));
|
||||||
m_formater[QString("isotime")] = TimeISO;
|
m_formatter[QString("isotime")] = FormatterType::TimeISO;
|
||||||
// long time
|
// long time
|
||||||
m_map.insertMulti(source, QString("longtime"));
|
m_map.insertMulti(source, QString("longtime"));
|
||||||
m_formater[QString("longtime")] = TimeLong;
|
m_formatter[QString("longtime")] = FormatterType::TimeLong;
|
||||||
// short time
|
// short time
|
||||||
m_map.insertMulti(source, QString("shorttime"));
|
m_map.insertMulti(source, QString("shorttime"));
|
||||||
m_formater[QString("shorttime")] = TimeShort;
|
m_formatter[QString("shorttime")] = FormatterType::TimeShort;
|
||||||
|
// timestamp
|
||||||
|
m_map.insertMulti(source, QString("tstime"));
|
||||||
|
m_formatter[QString("tstime")] = FormatterType::Timestamp;
|
||||||
} else if (source == QString("system/uptime")) {
|
} else if (source == QString("system/uptime")) {
|
||||||
// uptime
|
// uptime
|
||||||
m_map[source] = QString("uptime");
|
m_map[source] = QString("uptime");
|
||||||
m_formater[QString("uptime")] = Uptime;
|
m_formatter[QString("uptime")] = FormatterType::Uptime;
|
||||||
// custom uptime
|
// custom uptime
|
||||||
m_map.insertMulti(source, QString("cuptime"));
|
m_map.insertMulti(source, QString("cuptime"));
|
||||||
m_formater[QString("cuptime")] = UptimeCustom;
|
m_formatter[QString("cuptime")] = FormatterType::UptimeCustom;
|
||||||
} else if (source.startsWith(QString("weather/temperature"))) {
|
} else if (source.startsWith(QString("weather/temperature"))) {
|
||||||
// temperature
|
// temperature
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("weather/"));
|
key.remove(QString("weather/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Temperature;
|
m_formatter[key] = FormatterType::Temperature;
|
||||||
} else if (source.startsWith(QString("weather/"))) {
|
} else if (source.startsWith(QString("weather/"))) {
|
||||||
// other weather
|
// other weather
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("weather/"));
|
key.remove(QString("weather/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = NoFormat;
|
m_formatter[key] = FormatterType::NoFormat;
|
||||||
} else if (source.startsWith(QString("load/load"))) {
|
} else if (source.startsWith(QString("load/load"))) {
|
||||||
// load source
|
// load source
|
||||||
QString key = source;
|
QString key = source;
|
||||||
key.remove(QString("load/"));
|
key.remove(QString("load/"));
|
||||||
m_map[source] = key;
|
m_map[source] = key;
|
||||||
m_formater[key] = Temperature;
|
m_formatter[key] = FormatterType::Temperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList foundKeys = keysFromSource(source);
|
||||||
|
|
||||||
|
// rewrite formatters for custom ones
|
||||||
|
QStringList customFormattersKeys = m_customFormatters->definedFormatters();
|
||||||
|
qCInfo(LOG_AW) << "Looking for fprmatters" << foundKeys << "in"
|
||||||
|
<< customFormattersKeys;
|
||||||
|
for (auto key : foundKeys) {
|
||||||
|
if (!customFormattersKeys.contains(key))
|
||||||
|
continue;
|
||||||
|
m_formatter[key] = FormatterType::Custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
// drop key from dictionary if no one user requested key required it
|
// drop key from dictionary if no one user requested key required it
|
||||||
QStringList foundKeys = keysFromSource(source);
|
|
||||||
qCInfo(LOG_AW) << "Looking for keys" << foundKeys << "in" << keys;
|
qCInfo(LOG_AW) << "Looking for keys" << foundKeys << "in" << keys;
|
||||||
// this source is required if list is empty (which means skip checking)
|
|
||||||
// or if key in required key list
|
|
||||||
bool required
|
bool required
|
||||||
= keys.isEmpty() || std::any_of(foundKeys.cbegin(), foundKeys.cend(),
|
= keys.isEmpty() || std::any_of(foundKeys.cbegin(), foundKeys.cend(),
|
||||||
[&keys](const QString &key) {
|
[&keys](const QString &key) {
|
||||||
return keys.contains(key);
|
return keys.contains(key);
|
||||||
});
|
});
|
||||||
if (!required)
|
if (!required) {
|
||||||
m_map.remove(source);
|
m_map.remove(source);
|
||||||
|
for (auto key : foundKeys)
|
||||||
|
m_formatter.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
return keysFromSource(source);
|
return keysFromSource(source);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWFormatterHelper;
|
||||||
|
|
||||||
class AWKeysAggregator : public QObject
|
class AWKeysAggregator : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -36,16 +38,17 @@ class AWKeysAggregator : public QObject
|
|||||||
Q_PROPERTY(QString tempUnits MEMBER m_tempUnits WRITE setTempUnits);
|
Q_PROPERTY(QString tempUnits MEMBER m_tempUnits WRITE setTempUnits);
|
||||||
Q_PROPERTY(bool translate MEMBER m_translate WRITE setTranslate);
|
Q_PROPERTY(bool translate MEMBER m_translate WRITE setTranslate);
|
||||||
|
|
||||||
enum FormaterType {
|
enum class FormatterType {
|
||||||
// general formaters
|
// general formatters
|
||||||
NoFormat = 0,
|
Custom,
|
||||||
|
NoFormat,
|
||||||
Float,
|
Float,
|
||||||
FloatTwoSymbols,
|
FloatTwoSymbols,
|
||||||
Integer,
|
Integer,
|
||||||
IntegerFive,
|
IntegerFive,
|
||||||
IntegerThree,
|
IntegerThree,
|
||||||
List,
|
List,
|
||||||
// unit specific formaters
|
// unit specific formatters
|
||||||
ACFormat,
|
ACFormat,
|
||||||
MemGBFormat,
|
MemGBFormat,
|
||||||
MemMBFormat,
|
MemMBFormat,
|
||||||
@ -58,6 +61,7 @@ class AWKeysAggregator : public QObject
|
|||||||
TimeISO,
|
TimeISO,
|
||||||
TimeLong,
|
TimeLong,
|
||||||
TimeShort,
|
TimeShort,
|
||||||
|
Timestamp,
|
||||||
Uptime,
|
Uptime,
|
||||||
UptimeCustom
|
UptimeCustom
|
||||||
};
|
};
|
||||||
@ -66,7 +70,7 @@ public:
|
|||||||
explicit AWKeysAggregator(QObject *parent = nullptr);
|
explicit AWKeysAggregator(QObject *parent = nullptr);
|
||||||
virtual ~AWKeysAggregator();
|
virtual ~AWKeysAggregator();
|
||||||
// get methods
|
// get methods
|
||||||
QString formater(const QVariant &data, const QString &key) const;
|
QString formatter(const QVariant &data, const QString &key) const;
|
||||||
QStringList keysFromSource(const QString &source) const;
|
QStringList keysFromSource(const QString &source) const;
|
||||||
// set methods
|
// set methods
|
||||||
void setAcOffline(const QString inactive);
|
void setAcOffline(const QString inactive);
|
||||||
@ -83,6 +87,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
float temperature(const float temp) const;
|
float temperature(const float temp) const;
|
||||||
|
AWFormatterHelper *m_customFormatters = nullptr;
|
||||||
QStringList timeKeys = QString(TIME_KEYS).split(QChar(','));
|
QStringList timeKeys = QString(TIME_KEYS).split(QChar(','));
|
||||||
// variables
|
// variables
|
||||||
QString m_acOffline;
|
QString m_acOffline;
|
||||||
@ -90,7 +95,7 @@ private:
|
|||||||
QString m_customTime;
|
QString m_customTime;
|
||||||
QString m_customUptime;
|
QString m_customUptime;
|
||||||
QHash<QString, QStringList> m_devices;
|
QHash<QString, QStringList> m_devices;
|
||||||
QHash<QString, FormaterType> m_formater;
|
QHash<QString, FormatterType> m_formatter;
|
||||||
QHash<QString, QString> m_map;
|
QHash<QString, QString> m_map;
|
||||||
QString m_tempUnits;
|
QString m_tempUnits;
|
||||||
bool m_translate = false;
|
bool m_translate = false;
|
||||||
|
@ -16,54 +16,44 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include "updatesource.h"
|
#include "awnoformatter.h"
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
|
||||||
UpdateSource::UpdateSource(QObject *parent, const QStringList args)
|
AWNoFormatter::AWNoFormatter(QObject *parent, const QString filename,
|
||||||
: AbstractExtSysMonSource(parent, args)
|
const QString section)
|
||||||
|
: AWAbstractFormatter(parent, filename, section)
|
||||||
{
|
{
|
||||||
Q_ASSERT(args.count() == 0);
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
|
||||||
|
init(filename, section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UpdateSource::~UpdateSource()
|
AWNoFormatter::AWNoFormatter(QObject *parent)
|
||||||
|
: AWAbstractFormatter(parent)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QVariant UpdateSource::data(QString source)
|
AWNoFormatter::~AWNoFormatter()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESM) << "Source" << source;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QVariantMap UpdateSource::initialData(QString source) const
|
QString AWNoFormatter::convert(const QVariant &value) const
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESM) << "Source" << source;
|
qCDebug(LOG_AW) << "Convert value" << value;
|
||||||
|
|
||||||
QVariantMap data;
|
return value.toString();
|
||||||
if (source == QString("update")) {
|
|
||||||
data[QString("min")] = true;
|
|
||||||
data[QString("max")] = true;
|
|
||||||
data[QString("name")] = QString("Simple value which is always true");
|
|
||||||
data[QString("type")] = QString("bool");
|
|
||||||
data[QString("units")] = QString("");
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList UpdateSource::sources() const
|
void AWNoFormatter::init(const QString filename, const QString section)
|
||||||
{
|
{
|
||||||
QStringList sources;
|
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
|
||||||
sources.append(QString("update"));
|
// dummy method for future references
|
||||||
|
|
||||||
return sources;
|
|
||||||
}
|
}
|
41
sources/awesome-widget/plugin/awnoformatter.h
Normal file
41
sources/awesome-widget/plugin/awnoformatter.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef AWNOFORMATTER_H
|
||||||
|
#define AWNOFORMATTER_H
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWNoFormatter : public AWAbstractFormatter
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit AWNoFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section);
|
||||||
|
explicit AWNoFormatter(QObject *parent);
|
||||||
|
virtual ~AWNoFormatter();
|
||||||
|
QString convert(const QVariant &value) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init(const QString filename, const QString section);
|
||||||
|
// properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AWNOFORMATTER_H */
|
@ -37,7 +37,7 @@ QString AWPatternFunctions::expandLambdas(QString code,
|
|||||||
// parsed values
|
// parsed values
|
||||||
for (auto lambdaKey : usedKeys)
|
for (auto lambdaKey : usedKeys)
|
||||||
code.replace(QString("$%1").arg(lambdaKey),
|
code.replace(QString("$%1").arg(lambdaKey),
|
||||||
aggregator->formater(metadata[lambdaKey], lambdaKey));
|
aggregator->formatter(metadata[lambdaKey], lambdaKey));
|
||||||
qCInfo(LOG_AW) << "Expression" << code;
|
qCInfo(LOG_AW) << "Expression" << code;
|
||||||
QJSValue result = engine.evaluate(code);
|
QJSValue result = engine.evaluate(code);
|
||||||
if (result.isError()) {
|
if (result.isError()) {
|
||||||
|
151
sources/awesome-widget/plugin/awscriptformatter.cpp
Normal file
151
sources/awesome-widget/plugin/awscriptformatter.cpp
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include "awscriptformatter.h"
|
||||||
|
|
||||||
|
#include <QJSEngine>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
|
||||||
|
AWScriptFormatter::AWScriptFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section)
|
||||||
|
: AWAbstractFormatter(parent, filename, section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
init(filename, section);
|
||||||
|
initProgram();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWScriptFormatter::AWScriptFormatter(QObject *parent, const bool appendCode,
|
||||||
|
const QString code, const bool hasReturn)
|
||||||
|
: AWAbstractFormatter(parent)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
setAppendCode(appendCode);
|
||||||
|
setCode(code);
|
||||||
|
setHasReturn(hasReturn);
|
||||||
|
initProgram();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AWScriptFormatter::~AWScriptFormatter()
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWScriptFormatter::convert(const QVariant &value) const
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Convert value" << value;
|
||||||
|
|
||||||
|
// init engine
|
||||||
|
QJSEngine engine;
|
||||||
|
QJSValue fn = engine.evaluate(m_program);
|
||||||
|
QJSValueList args = QJSValueList() << value.toString();
|
||||||
|
QJSValue result = fn.call(args);
|
||||||
|
|
||||||
|
if (result.isError()) {
|
||||||
|
qCWarning(LOG_AW) << "Uncaught exception at line"
|
||||||
|
<< result.property("lineNumber").toInt() << ":"
|
||||||
|
<< result.toString();
|
||||||
|
return QString();
|
||||||
|
} else {
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool AWScriptFormatter::appendCode() const
|
||||||
|
{
|
||||||
|
return m_appendCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWScriptFormatter::code() const
|
||||||
|
{
|
||||||
|
return m_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool AWScriptFormatter::hasReturn() const
|
||||||
|
{
|
||||||
|
return m_hasReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString AWScriptFormatter::program() const
|
||||||
|
{
|
||||||
|
return m_program;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWScriptFormatter::setAppendCode(const bool _appendCode)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set append code" << _appendCode;
|
||||||
|
|
||||||
|
m_appendCode = _appendCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWScriptFormatter::setCode(const QString _code)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set code" << _code;
|
||||||
|
|
||||||
|
m_code = _code;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWScriptFormatter::setHasReturn(const bool _hasReturn)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Set has return" << _hasReturn;
|
||||||
|
|
||||||
|
m_hasReturn = _hasReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWScriptFormatter::init(const QString filename, const QString section)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
|
||||||
|
|
||||||
|
QSettings settings(filename, QSettings::IniFormat);
|
||||||
|
|
||||||
|
settings.beginGroup(section);
|
||||||
|
setAppendCode(settings.value(QString("AppendCode"), true).toBool());
|
||||||
|
setCode(settings.value(QString("Code"), QString()).toString());
|
||||||
|
setHasReturn(settings.value(QString("HasReturn"), false).toBool());
|
||||||
|
settings.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AWScriptFormatter::initProgram()
|
||||||
|
{
|
||||||
|
if (m_appendCode)
|
||||||
|
m_program
|
||||||
|
= QString("(function(value) { %1%2 })")
|
||||||
|
.arg(m_code)
|
||||||
|
.arg(m_hasReturn ? QString("") : QString("; return output;"));
|
||||||
|
else
|
||||||
|
m_program = m_code;
|
||||||
|
|
||||||
|
qCInfo(LOG_AW) << "Create JS engine with code" << m_program;
|
||||||
|
}
|
59
sources/awesome-widget/plugin/awscriptformatter.h
Normal file
59
sources/awesome-widget/plugin/awscriptformatter.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of awesome-widgets *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef AWSCRIPTFORMATTER_H
|
||||||
|
#define AWSCRIPTFORMATTER_H
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AWScriptFormatter : public AWAbstractFormatter
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(bool appendCode READ appendCode WRITE setAppendCode)
|
||||||
|
Q_PROPERTY(QString code READ code WRITE setCode)
|
||||||
|
Q_PROPERTY(bool hasReturn READ hasReturn WRITE setHasReturn)
|
||||||
|
Q_PROPERTY(QString program READ program)
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit AWScriptFormatter(QObject *parent, const QString filename,
|
||||||
|
const QString section);
|
||||||
|
explicit AWScriptFormatter(QObject *parent, const bool appendCode,
|
||||||
|
const QString code, const bool hasReturn);
|
||||||
|
virtual ~AWScriptFormatter();
|
||||||
|
QString convert(const QVariant &value) const;
|
||||||
|
// properties
|
||||||
|
bool appendCode() const;
|
||||||
|
QString code() const;
|
||||||
|
bool hasReturn() const;
|
||||||
|
QString program() const;
|
||||||
|
void setAppendCode(const bool _appendCode);
|
||||||
|
void setCode(const QString _code);
|
||||||
|
void setHasReturn(const bool _hasReturn);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init(const QString filename, const QString section);
|
||||||
|
void initProgram();
|
||||||
|
// properties
|
||||||
|
bool m_appendCode;
|
||||||
|
QString m_code;
|
||||||
|
bool m_hasReturn;
|
||||||
|
QString m_program;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AWSCRIPTFORMATTER_H */
|
@ -29,7 +29,6 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
AWUpdateHelper::AWUpdateHelper(QObject *parent)
|
AWUpdateHelper::AWUpdateHelper(QObject *parent)
|
||||||
@ -74,14 +73,18 @@ bool AWUpdateHelper::checkVersion()
|
|||||||
// update version
|
// update version
|
||||||
settings.setValue(QString("Version"), QString(VERSION));
|
settings.setValue(QString("Version"), QString(VERSION));
|
||||||
settings.sync();
|
settings.sync();
|
||||||
|
qCInfo(LOG_AW) << "Found version" << version << "actual one is"
|
||||||
|
<< m_foundVersion;
|
||||||
|
|
||||||
qCInfo(LOG_AW) << "Found version" << version << "actual one is" << VERSION;
|
if ((version != m_foundVersion) && (!QString(CHANGELOG).isEmpty())) {
|
||||||
if (version != QVersionNumber::fromString(VERSION)) {
|
|
||||||
genMessageBox(i18n("Changelog of %1", QString(VERSION)),
|
genMessageBox(i18n("Changelog of %1", QString(VERSION)),
|
||||||
QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
|
QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
|
||||||
QMessageBox::Ok)
|
QMessageBox::Ok)
|
||||||
->open();
|
->open();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (version != m_foundVersion) {
|
||||||
|
qCWarning(LOG_AW) << "No changelog information provided";
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
qCInfo(LOG_AW) << "No need to update version";
|
qCInfo(LOG_AW) << "No need to update version";
|
||||||
}
|
}
|
||||||
@ -123,15 +126,16 @@ void AWUpdateHelper::showUpdates(const QVersionNumber version)
|
|||||||
|
|
||||||
void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
|
void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
|
||||||
{
|
{
|
||||||
int ret = static_cast<QMessageBox *>(sender())->buttonRole(button);
|
QMessageBox::ButtonRole ret
|
||||||
|
= static_cast<QMessageBox *>(sender())->buttonRole(button);
|
||||||
qCInfo(LOG_AW) << "User select" << ret;
|
qCInfo(LOG_AW) << "User select" << ret;
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case QMessageBox::Ok:
|
case QMessageBox::AcceptRole:
|
||||||
QDesktopServices::openUrl(QString(RELEASES)
|
QDesktopServices::openUrl(QString(RELEASES)
|
||||||
+ m_foundVersion.toString());
|
+ m_foundVersion.toString());
|
||||||
break;
|
break;
|
||||||
case QMessageBox::Cancel:
|
case QMessageBox::RejectRole:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
#include "abstractextitemaggregator.h"
|
#include "abstractextitemaggregator.h"
|
||||||
|
|
||||||
|
|
||||||
|
134
sources/awesomewidgets/configs/aw-example-standalonerc
Normal file
134
sources/awesomewidgets/configs/aw-example-standalonerc
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
[desktops]
|
||||||
|
cpu-bar.desktop\Comment=Example cpu bar
|
||||||
|
cpu-bar.desktop\Encoding=UTF-8
|
||||||
|
cpu-bar.desktop\Name=cpu-bar.desktop
|
||||||
|
cpu-bar.desktop\X-AW-Active=true
|
||||||
|
cpu-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
|
||||||
|
cpu-bar.desktop\X-AW-ApiVersion=5
|
||||||
|
cpu-bar.desktop\X-AW-Count=100
|
||||||
|
cpu-bar.desktop\X-AW-Custom=false
|
||||||
|
cpu-bar.desktop\X-AW-Direction=LeftToRight
|
||||||
|
cpu-bar.desktop\X-AW-Height=10
|
||||||
|
cpu-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
|
||||||
|
cpu-bar.desktop\X-AW-Interval=1
|
||||||
|
cpu-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
|
||||||
|
cpu-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
|
||||||
|
cpu-bar.desktop\X-AW-Number=7
|
||||||
|
cpu-bar.desktop\X-AW-Type=Horizontal
|
||||||
|
cpu-bar.desktop\X-AW-Value=cpu
|
||||||
|
cpu-bar.desktop\X-AW-Width=200
|
||||||
|
down-graph.desktop\Comment=Example download speed graph
|
||||||
|
down-graph.desktop\Encoding=UTF-8
|
||||||
|
down-graph.desktop\Name=down-graph.desktop
|
||||||
|
down-graph.desktop\X-AW-Active=true
|
||||||
|
down-graph.desktop\X-AW-ActiveColor="color://0,170,0,255"
|
||||||
|
down-graph.desktop\X-AW-ApiVersion=5
|
||||||
|
down-graph.desktop\X-AW-Count=100
|
||||||
|
down-graph.desktop\X-AW-Custom=true
|
||||||
|
down-graph.desktop\X-AW-Direction=LeftToRight
|
||||||
|
down-graph.desktop\X-AW-Height=25
|
||||||
|
down-graph.desktop\X-AW-InactiveColor="color://0,0,0,255"
|
||||||
|
down-graph.desktop\X-AW-Interval=1
|
||||||
|
down-graph.desktop\X-AW-Max=100.0
|
||||||
|
down-graph.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
|
||||||
|
down-graph.desktop\X-AW-Number=8
|
||||||
|
down-graph.desktop\X-AW-Type=Bars
|
||||||
|
down-graph.desktop\X-AW-Value=$downkb
|
||||||
|
down-graph.desktop\X-AW-Width=300
|
||||||
|
ram-bar.desktop\Comment=Example RAM bar
|
||||||
|
ram-bar.desktop\Encoding=UTF-8
|
||||||
|
ram-bar.desktop\Name=ram-bar.desktop
|
||||||
|
ram-bar.desktop\X-AW-Active=true
|
||||||
|
ram-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
|
||||||
|
ram-bar.desktop\X-AW-ApiVersion=5
|
||||||
|
ram-bar.desktop\X-AW-Count=100
|
||||||
|
ram-bar.desktop\X-AW-Custom=false
|
||||||
|
ram-bar.desktop\X-AW-Direction=LeftToRight
|
||||||
|
ram-bar.desktop\X-AW-Height=10
|
||||||
|
ram-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
|
||||||
|
ram-bar.desktop\X-AW-Interval=1
|
||||||
|
ram-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
|
||||||
|
ram-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
|
||||||
|
ram-bar.desktop\X-AW-Number=5
|
||||||
|
ram-bar.desktop\X-AW-Type=Horizontal
|
||||||
|
ram-bar.desktop\X-AW-Value=mem
|
||||||
|
ram-bar.desktop\X-AW-Width=200
|
||||||
|
swap-bar.desktop\Comment=Example swap bar
|
||||||
|
swap-bar.desktop\Encoding=UTF-8
|
||||||
|
swap-bar.desktop\Name=swap-bar.desktop
|
||||||
|
swap-bar.desktop\X-AW-Active=true
|
||||||
|
swap-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
|
||||||
|
swap-bar.desktop\X-AW-ApiVersion=5
|
||||||
|
swap-bar.desktop\X-AW-Count=100
|
||||||
|
swap-bar.desktop\X-AW-Custom=false
|
||||||
|
swap-bar.desktop\X-AW-Direction=LeftToRight
|
||||||
|
swap-bar.desktop\X-AW-Height=10
|
||||||
|
swap-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
|
||||||
|
swap-bar.desktop\X-AW-Interval=1
|
||||||
|
swap-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
|
||||||
|
swap-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
|
||||||
|
swap-bar.desktop\X-AW-Number=6
|
||||||
|
swap-bar.desktop\X-AW-Type=Horizontal
|
||||||
|
swap-bar.desktop\X-AW-Value=swap
|
||||||
|
swap-bar.desktop\X-AW-Width=200
|
||||||
|
up-graph.desktop\Comment=Example upload speed graph
|
||||||
|
up-graph.desktop\Encoding=UTF-8
|
||||||
|
up-graph.desktop\Name=upload-graph.desktop
|
||||||
|
up-graph.desktop\X-AW-Active=true
|
||||||
|
up-graph.desktop\X-AW-ActiveColor="color://0,170,0,255"
|
||||||
|
up-graph.desktop\X-AW-ApiVersion=5
|
||||||
|
up-graph.desktop\X-AW-Count=100
|
||||||
|
up-graph.desktop\X-AW-Custom=true
|
||||||
|
up-graph.desktop\X-AW-Direction=LeftToRight
|
||||||
|
up-graph.desktop\X-AW-Height=25
|
||||||
|
up-graph.desktop\X-AW-InactiveColor="color://0,0,0,255"
|
||||||
|
up-graph.desktop\X-AW-Interval=1
|
||||||
|
up-graph.desktop\X-AW-Max=100.0
|
||||||
|
up-graph.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
|
||||||
|
up-graph.desktop\X-AW-Number=9
|
||||||
|
up-graph.desktop\X-AW-Type=Bars
|
||||||
|
up-graph.desktop\X-AW-Value=$cpu
|
||||||
|
up-graph.desktop\X-AW-Width=300
|
||||||
|
|
||||||
|
[plasmoid]
|
||||||
|
acOffline=( )
|
||||||
|
acOnline=(*)
|
||||||
|
background=false
|
||||||
|
batInTooltipColor=#880000
|
||||||
|
batTooltip=true
|
||||||
|
batTooltipColor=#008800
|
||||||
|
checkUpdates=true
|
||||||
|
cpuTooltip=true
|
||||||
|
cpuTooltipColor=#ff0000
|
||||||
|
cpuclTooltip=true
|
||||||
|
cpuclTooltipColor=#00ff00
|
||||||
|
customTime=$hh:$mm
|
||||||
|
customUptime=$ddd $hhh $mmm
|
||||||
|
downkbTooltip=true
|
||||||
|
downkbTooltipColor=#00ffff
|
||||||
|
fontColor=#ffffff
|
||||||
|
fontFamily=Terminus
|
||||||
|
fontSize=12
|
||||||
|
fontStyle=normal
|
||||||
|
fontWeight=normal
|
||||||
|
height=400
|
||||||
|
interval=1000
|
||||||
|
memTooltip=true
|
||||||
|
memTooltipColor=#0000ff
|
||||||
|
notify=true
|
||||||
|
optimize=true
|
||||||
|
queueLimit=0
|
||||||
|
swapTooltip=true
|
||||||
|
swapTooltipColor=#ffff00
|
||||||
|
tempUnits=Celsius
|
||||||
|
text="<body bgcolor=\"#000000\">\n<p align=\"justify\">Uptime: $cuptime<br>\nRAM: $mem $bar5<br>\nSwap: $swap $bar6<br>\nCPU: $cpu $bar7<br>\nCPU Temp: $temp0°C<br>\nDown: $down$downunits $downtotal<br>\n$bar8<br>\nUp: $up$upunits $uptotal<br>\n$bar9<br></p>\n</body>\n"
|
||||||
|
textAlign=center
|
||||||
|
tooltipBackground=#ffffff
|
||||||
|
tooltipNumber=100
|
||||||
|
translateStrings=true
|
||||||
|
upkbTooltipColor=#ff00ff
|
||||||
|
useTooltipBackground=true
|
||||||
|
width=300
|
||||||
|
wrapNewLines=false
|
||||||
|
wrapText=false
|
||||||
|
|
@ -6,11 +6,11 @@ X-AW-Value=bat
|
|||||||
X-AW-Custom=false
|
X-AW-Custom=false
|
||||||
X-AW-Max=100.0
|
X-AW-Max=100.0
|
||||||
X-AW-Min=0.0
|
X-AW-Min=0.0
|
||||||
X-AW-ActiveColor="0,0,0,255"
|
X-AW-ActiveColor="color://0,0,0,255"
|
||||||
X-AW-InactiveColor="255,255,255,255"
|
X-AW-InactiveColor="color://255,255,255,255"
|
||||||
X-AW-Type=Horizontal
|
X-AW-Type=Horizontal
|
||||||
X-AW-Direction=LeftToRight
|
X-AW-Direction=LeftToRight
|
||||||
X-AW-Height=25
|
X-AW-Height=25
|
||||||
X-AW-Width=100
|
X-AW-Width=100
|
||||||
X-AW-ApiVersion=4
|
X-AW-ApiVersion=5
|
||||||
X-AW-Number=3
|
X-AW-Number=3
|
||||||
|
@ -6,11 +6,11 @@ X-AW-Value=cpu
|
|||||||
X-AW-Custom=false
|
X-AW-Custom=false
|
||||||
X-AW-Max=100.0
|
X-AW-Max=100.0
|
||||||
X-AW-Min=0.0
|
X-AW-Min=0.0
|
||||||
X-AW-ActiveColor="0,0,0,255"
|
X-AW-ActiveColor="color://0,0,0,255"
|
||||||
X-AW-InactiveColor="255,255,255,255"
|
X-AW-InactiveColor="color://255,255,255,255"
|
||||||
X-AW-Type=Horizontal
|
X-AW-Type=Horizontal
|
||||||
X-AW-Direction=LeftToRight
|
X-AW-Direction=LeftToRight
|
||||||
X-AW-Height=25
|
X-AW-Height=25
|
||||||
X-AW-Width=100
|
X-AW-Width=100
|
||||||
X-AW-ApiVersion=4
|
X-AW-ApiVersion=5
|
||||||
X-AW-Number=0
|
X-AW-Number=0
|
||||||
|
@ -6,11 +6,11 @@ X-AW-Value=mem
|
|||||||
X-AW-Custom=false
|
X-AW-Custom=false
|
||||||
X-AW-Max=100.0
|
X-AW-Max=100.0
|
||||||
X-AW-Min=0.0
|
X-AW-Min=0.0
|
||||||
X-AW-ActiveColor="0,0,0,255"
|
X-AW-ActiveColor="color://0,0,0,255"
|
||||||
X-AW-InactiveColor="255,255,255,255"
|
X-AW-InactiveColor="color://255,255,255,255"
|
||||||
X-AW-Type=Horizontal
|
X-AW-Type=Horizontal
|
||||||
X-AW-Direction=LeftToRight
|
X-AW-Direction=LeftToRight
|
||||||
X-AW-Height=25
|
X-AW-Height=25
|
||||||
X-AW-Width=100
|
X-AW-Width=100
|
||||||
X-AW-ApiVersion=4
|
X-AW-ApiVersion=5
|
||||||
X-AW-Number=1
|
X-AW-Number=1
|
||||||
|
@ -6,11 +6,11 @@ X-AW-Value=swap
|
|||||||
X-AW-Custom=false
|
X-AW-Custom=false
|
||||||
X-AW-Max=100.0
|
X-AW-Max=100.0
|
||||||
X-AW-Min=0.0
|
X-AW-Min=0.0
|
||||||
X-AW-ActiveColor="0,0,0,255"
|
X-AW-ActiveColor="color://0,0,0,255"
|
||||||
X-AW-InactiveColor="255,255,255,255"
|
X-AW-InactiveColor="color://255,255,255,255"
|
||||||
X-AW-Type=Horizontal
|
X-AW-Type=Horizontal
|
||||||
X-AW-Direction=LeftToRight
|
X-AW-Direction=LeftToRight
|
||||||
X-AW-Height=25
|
X-AW-Height=25
|
||||||
X-AW-Width=100
|
X-AW-Width=100
|
||||||
X-AW-ApiVersion=4
|
X-AW-ApiVersion=5
|
||||||
X-AW-Number=2
|
X-AW-Number=2
|
||||||
|
@ -26,11 +26,11 @@
|
|||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QUrlQuery>
|
||||||
|
|
||||||
#include <qreplytimeout/qreplytimeout.h>
|
#include <qreplytimeout/qreplytimeout.h>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,
|
ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,
|
||||||
@ -56,8 +56,8 @@ ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,
|
|||||||
|
|
||||||
// HACK declare as child of nullptr to avoid crash with plasmawindowed
|
// HACK declare as child of nullptr to avoid crash with plasmawindowed
|
||||||
// in the destructor
|
// in the destructor
|
||||||
manager = new QNetworkAccessManager(nullptr);
|
m_manager = new QNetworkAccessManager(nullptr);
|
||||||
connect(manager, SIGNAL(finished(QNetworkReply *)), this,
|
connect(m_manager, SIGNAL(finished(QNetworkReply *)), this,
|
||||||
SLOT(quotesReplyReceived(QNetworkReply *)));
|
SLOT(quotesReplyReceived(QNetworkReply *)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,10 +66,10 @@ ExtQuotes::~ExtQuotes()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
disconnect(manager, SIGNAL(finished(QNetworkReply *)), this,
|
disconnect(m_manager, SIGNAL(finished(QNetworkReply *)), this,
|
||||||
SLOT(quotesReplyReceived(QNetworkReply *)));
|
SLOT(quotesReplyReceived(QNetworkReply *)));
|
||||||
|
|
||||||
manager->deleteLater();
|
m_manager->deleteLater();
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,6 +134,16 @@ void ExtQuotes::readConfiguration()
|
|||||||
setApiVersion(AWEQAPI);
|
setApiVersion(AWEQAPI);
|
||||||
writeConfiguration();
|
writeConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// init query
|
||||||
|
m_url = QUrl(YAHOO_QUOTES_URL);
|
||||||
|
QUrlQuery params;
|
||||||
|
params.addQueryItem(QString("format"), QString("json"));
|
||||||
|
params.addQueryItem(QString("env"),
|
||||||
|
QString("store://datatables.org/alltableswithkeys"));
|
||||||
|
params.addQueryItem(QString("q"),
|
||||||
|
QString(YAHOO_QUOTES_QUERY).arg(m_ticker));
|
||||||
|
m_url.setQuery(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -145,7 +155,7 @@ QVariantHash ExtQuotes::run()
|
|||||||
if (times == 1) {
|
if (times == 1) {
|
||||||
qCInfo(LOG_LIB) << "Send request";
|
qCInfo(LOG_LIB) << "Send request";
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url())));
|
QNetworkReply *reply = m_manager->get(QNetworkRequest(m_url));
|
||||||
new QReplyTimeout(reply, REQUEST_TIMEOUT);
|
new QReplyTimeout(reply, REQUEST_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,12 +281,3 @@ get quotes for the instrument. Refer to <a href=\"http://finance.yahoo.com/\">\
|
|||||||
ui->checkBox_active->setText(i18n("Active"));
|
ui->checkBox_active->setText(i18n("Active"));
|
||||||
ui->label_interval->setText(i18n("Interval"));
|
ui->label_interval->setText(i18n("Interval"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString ExtQuotes::url() const
|
|
||||||
{
|
|
||||||
QString apiUrl = QString(YAHOO_QUOTES_URL).arg(m_ticker);
|
|
||||||
qCInfo(LOG_LIB) << "API url" << apiUrl;
|
|
||||||
|
|
||||||
return apiUrl;
|
|
||||||
}
|
|
||||||
|
@ -22,11 +22,9 @@
|
|||||||
|
|
||||||
#include "abstractextitem.h"
|
#include "abstractextitem.h"
|
||||||
|
|
||||||
#define YAHOO_QUOTES_URL \
|
#define YAHOO_QUOTES_URL "https://query.yahooapis.com/v1/public/yql"
|
||||||
"https://query.yahooapis.com/v1/public/yql?q=select * from " \
|
#define YAHOO_QUOTES_QUERY \
|
||||||
"yahoo.finance.quotes where " \
|
"select * from yahoo.finance.quotes where symbol='%1'"
|
||||||
"symbol=\"%1\"&env=store://datatables.org/" \
|
|
||||||
"alltableswithkeys&format=json"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
@ -61,11 +59,11 @@ private slots:
|
|||||||
void quotesReplyReceived(QNetworkReply *reply);
|
void quotesReplyReceived(QNetworkReply *reply);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QNetworkAccessManager *manager;
|
QNetworkAccessManager *m_manager;
|
||||||
|
QUrl m_url;
|
||||||
bool isRunning = false;
|
bool isRunning = false;
|
||||||
Ui::ExtQuotes *ui;
|
Ui::ExtQuotes *ui;
|
||||||
void translate();
|
void translate();
|
||||||
QString url() const;
|
|
||||||
// properties
|
// properties
|
||||||
QString m_ticker = QString("EURUSD=X");
|
QString m_ticker = QString("EURUSD=X");
|
||||||
// values
|
// values
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtScript::ExtScript(QWidget *parent, const QString scriptName,
|
ExtScript::ExtScript(QWidget *parent, const QString scriptName,
|
||||||
@ -112,17 +111,16 @@ QString ExtScript::strRedirect() const
|
|||||||
{
|
{
|
||||||
QString value;
|
QString value;
|
||||||
switch (m_redirect) {
|
switch (m_redirect) {
|
||||||
case stdout2stderr:
|
case Redirect::stdout2stderr:
|
||||||
value = QString("stdout2stderr");
|
value = QString("stdout2stderr");
|
||||||
break;
|
break;
|
||||||
case stderr2stdout:
|
case Redirect::stderr2stdout:
|
||||||
value = QString("stderr2stdout");
|
value = QString("stderr2stdout");
|
||||||
break;
|
break;
|
||||||
case swap:
|
case Redirect::swap:
|
||||||
value = QString("swap");
|
value = QString("swap");
|
||||||
break;
|
break;
|
||||||
case nothing:
|
case Redirect::nothing:
|
||||||
default:
|
|
||||||
value = QString("nothing");
|
value = QString("nothing");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -158,7 +156,7 @@ void ExtScript::setPrefix(const QString _prefix)
|
|||||||
|
|
||||||
void ExtScript::setRedirect(const Redirect _redirect)
|
void ExtScript::setRedirect(const Redirect _redirect)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Redirect" << _redirect;
|
qCDebug(LOG_LIB) << "Redirect" << static_cast<int>(_redirect);
|
||||||
|
|
||||||
m_redirect = _redirect;
|
m_redirect = _redirect;
|
||||||
}
|
}
|
||||||
@ -169,13 +167,13 @@ void ExtScript::setStrRedirect(const QString _redirect)
|
|||||||
qCDebug(LOG_LIB) << "Redirect" << _redirect;
|
qCDebug(LOG_LIB) << "Redirect" << _redirect;
|
||||||
|
|
||||||
if (_redirect == QString("stdout2sdterr"))
|
if (_redirect == QString("stdout2sdterr"))
|
||||||
m_redirect = stdout2stderr;
|
m_redirect = Redirect::stdout2stderr;
|
||||||
else if (_redirect == QString("stderr2sdtout"))
|
else if (_redirect == QString("stderr2sdtout"))
|
||||||
m_redirect = stderr2stdout;
|
m_redirect = Redirect::stderr2stdout;
|
||||||
else if (_redirect == QString("swap"))
|
else if (_redirect == QString("swap"))
|
||||||
m_redirect = swap;
|
m_redirect = Redirect::swap;
|
||||||
else
|
else
|
||||||
m_redirect = nothing;
|
m_redirect = Redirect::nothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -376,16 +374,15 @@ void ExtScript::updateValue()
|
|||||||
QString strValue;
|
QString strValue;
|
||||||
|
|
||||||
switch (m_redirect) {
|
switch (m_redirect) {
|
||||||
case stdout2stderr:
|
case Redirect::stdout2stderr:
|
||||||
break;
|
break;
|
||||||
case stderr2stdout:
|
case Redirect::stderr2stdout:
|
||||||
strValue = QString("%1\n%2").arg(qdebug).arg(qoutput);
|
strValue = QString("%1\n%2").arg(qdebug).arg(qoutput);
|
||||||
break;
|
break;
|
||||||
case swap:
|
case Redirect::swap:
|
||||||
strValue = qdebug;
|
strValue = qdebug;
|
||||||
break;
|
break;
|
||||||
case nothing:
|
case Redirect::nothing:
|
||||||
default:
|
|
||||||
strValue = qoutput;
|
strValue = qoutput;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ class ExtScript : public AbstractExtItem
|
|||||||
Q_PROPERTY(Redirect redirect READ redirect WRITE setRedirect)
|
Q_PROPERTY(Redirect redirect READ redirect WRITE setRedirect)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Redirect { stdout2stderr = 0, nothing, stderr2stdout, swap };
|
enum class Redirect { stdout2stderr, nothing, stderr2stdout, swap };
|
||||||
|
|
||||||
explicit ExtScript(QWidget *parent = nullptr,
|
explicit ExtScript(QWidget *parent = nullptr,
|
||||||
const QString scriptName = QString(),
|
const QString scriptName = QString(),
|
||||||
@ -56,7 +56,7 @@ public:
|
|||||||
void setExecutable(const QString _executable = QString("/usr/bin/true"));
|
void setExecutable(const QString _executable = QString("/usr/bin/true"));
|
||||||
void setFilters(const QStringList _filters = QStringList());
|
void setFilters(const QStringList _filters = QStringList());
|
||||||
void setPrefix(const QString _prefix = QString(""));
|
void setPrefix(const QString _prefix = QString(""));
|
||||||
void setRedirect(const Redirect _redirect = nothing);
|
void setRedirect(const Redirect _redirect = Redirect::nothing);
|
||||||
void setStrRedirect(const QString _redirect = QString("nothing"));
|
void setStrRedirect(const QString _redirect = QString("nothing"));
|
||||||
// filters
|
// filters
|
||||||
QString applyFilters(QString _value) const;
|
QString applyFilters(QString _value) const;
|
||||||
@ -80,7 +80,7 @@ private:
|
|||||||
QString m_executable = QString("/usr/bin/true");
|
QString m_executable = QString("/usr/bin/true");
|
||||||
QStringList m_filters = QStringList();
|
QStringList m_filters = QStringList();
|
||||||
QString m_prefix = QString("");
|
QString m_prefix = QString("");
|
||||||
Redirect m_redirect = nothing;
|
Redirect m_redirect = Redirect::nothing;
|
||||||
// internal properties
|
// internal properties
|
||||||
QVariantMap jsonFilters = QVariantMap();
|
QVariantMap jsonFilters = QVariantMap();
|
||||||
int times = 0;
|
int times = 0;
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName,
|
ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName,
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
#include <QUrlQuery>
|
||||||
|
|
||||||
#include <qreplytimeout/qreplytimeout.h>
|
#include <qreplytimeout/qreplytimeout.h>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,
|
ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,
|
||||||
@ -54,8 +54,8 @@ ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,
|
|||||||
|
|
||||||
// HACK declare as child of nullptr to avoid crash with plasmawindowed
|
// HACK declare as child of nullptr to avoid crash with plasmawindowed
|
||||||
// in the destructor
|
// in the destructor
|
||||||
manager = new QNetworkAccessManager(nullptr);
|
m_manager = new QNetworkAccessManager(nullptr);
|
||||||
connect(manager, SIGNAL(finished(QNetworkReply *)), this,
|
connect(m_manager, SIGNAL(finished(QNetworkReply *)), this,
|
||||||
SLOT(weatherReplyReceived(QNetworkReply *)));
|
SLOT(weatherReplyReceived(QNetworkReply *)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +64,10 @@ ExtWeather::~ExtWeather()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
disconnect(manager, SIGNAL(finished(QNetworkReply *)), this,
|
disconnect(m_manager, SIGNAL(finished(QNetworkReply *)), this,
|
||||||
SLOT(weatherReplyReceived(QNetworkReply *)));
|
SLOT(weatherReplyReceived(QNetworkReply *)));
|
||||||
|
|
||||||
manager->deleteLater();
|
m_manager->deleteLater();
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ QString ExtWeather::weatherFromInt(const int _id) const
|
|||||||
qCDebug(LOG_LIB) << "Weather ID" << _id;
|
qCDebug(LOG_LIB) << "Weather ID" << _id;
|
||||||
|
|
||||||
QVariantMap map
|
QVariantMap map
|
||||||
= jsonMap[m_image ? QString("image") : QString("text")].toMap();
|
= m_jsonMap[m_image ? QString("image") : QString("text")].toMap();
|
||||||
return map.value(QString::number(_id), map[QString("default")]).toString();
|
return map.value(QString::number(_id), map[QString("default")]).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,6 +193,16 @@ void ExtWeather::readConfiguration()
|
|||||||
setApiVersion(AWEWAPI);
|
setApiVersion(AWEWAPI);
|
||||||
writeConfiguration();
|
writeConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// init query
|
||||||
|
m_url = QUrl(YAHOO_WEATHER_URL);
|
||||||
|
QUrlQuery params;
|
||||||
|
params.addQueryItem(QString("format"), QString("json"));
|
||||||
|
params.addQueryItem(QString("env"),
|
||||||
|
QString("store://datatables.org/alltableswithkeys"));
|
||||||
|
params.addQueryItem(QString("q"),
|
||||||
|
QString(YAHOO_WEATHER_QUERY).arg(m_city, m_country));
|
||||||
|
m_url.setQuery(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,9 +226,9 @@ void ExtWeather::readJsonMap()
|
|||||||
qCWarning(LOG_LIB) << "Parse error" << error.errorString();
|
qCWarning(LOG_LIB) << "Parse error" << error.errorString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
jsonMap = jsonDoc.toVariant().toMap();
|
m_jsonMap = jsonDoc.toVariant().toMap();
|
||||||
|
|
||||||
qCInfo(LOG_LIB) << "Weather map" << jsonMap;
|
qCInfo(LOG_LIB) << "Weather map" << m_jsonMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -230,7 +240,7 @@ QVariantHash ExtWeather::run()
|
|||||||
if (times == 1) {
|
if (times == 1) {
|
||||||
qCInfo(LOG_LIB) << "Send request";
|
qCInfo(LOG_LIB) << "Send request";
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url())));
|
QNetworkReply *reply = m_manager->get(QNetworkRequest(m_url));
|
||||||
new QReplyTimeout(reply, REQUEST_TIMEOUT);
|
new QReplyTimeout(reply, REQUEST_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,13 +384,3 @@ void ExtWeather::translate()
|
|||||||
ui->checkBox_active->setText(i18n("Active"));
|
ui->checkBox_active->setText(i18n("Active"));
|
||||||
ui->label_interval->setText(i18n("Interval"));
|
ui->label_interval->setText(i18n("Interval"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString ExtWeather::url() const
|
|
||||||
{
|
|
||||||
|
|
||||||
QString apiUrl = QString(YAHOO_WEATHER_URL).arg(m_city).arg(m_country);
|
|
||||||
qCInfo(LOG_LIB) << "API url" << apiUrl;
|
|
||||||
|
|
||||||
return apiUrl;
|
|
||||||
}
|
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include "abstractextitem.h"
|
#include "abstractextitem.h"
|
||||||
|
|
||||||
#define YAHOO_WEATHER_URL \
|
#define YAHOO_WEATHER_URL "https://query.yahooapis.com/v1/public/yql"
|
||||||
"https://query.yahooapis.com/v1/public/yql?format=json&env=store://" \
|
#define YAHOO_WEATHER_QUERY \
|
||||||
"datatables.org/alltableswithkeys&q=select * from weather.forecast where " \
|
"select * from weather.forecast where u='c' and woeid in (select woeid " \
|
||||||
"u='c' and woeid in (select woeid from geo.places(1) where text='%1, %2')"
|
"from geo.places(1) where text='%1, %2')"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
@ -71,17 +71,17 @@ private slots:
|
|||||||
void weatherReplyReceived(QNetworkReply *reply);
|
void weatherReplyReceived(QNetworkReply *reply);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QNetworkAccessManager *manager;
|
QNetworkAccessManager *m_manager;
|
||||||
|
QUrl m_url;
|
||||||
bool isRunning = false;
|
bool isRunning = false;
|
||||||
Ui::ExtWeather *ui;
|
Ui::ExtWeather *ui;
|
||||||
void translate();
|
void translate();
|
||||||
QString url() const;
|
|
||||||
// properties
|
// properties
|
||||||
QString m_city = QString("London");
|
QString m_city = QString("London");
|
||||||
QString m_country = QString("uk");
|
QString m_country = QString("uk");
|
||||||
bool m_image = false;
|
bool m_image = false;
|
||||||
int m_ts = 0;
|
int m_ts = 0;
|
||||||
QVariantMap jsonMap = QVariantMap();
|
QVariantMap m_jsonMap = QVariantMap();
|
||||||
// values
|
// values
|
||||||
int times = 0;
|
int times = 0;
|
||||||
QVariantHash values;
|
QVariantHash values;
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "graphicalitemhelper.h"
|
#include "graphicalitemhelper.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
|
GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
|
||||||
@ -48,20 +47,12 @@ GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
|
|||||||
|
|
||||||
connect(ui->checkBox_custom, SIGNAL(stateChanged(int)), this,
|
connect(ui->checkBox_custom, SIGNAL(stateChanged(int)), this,
|
||||||
SLOT(changeValue(int)));
|
SLOT(changeValue(int)));
|
||||||
connect(ui->checkBox_activeCheck, SIGNAL(stateChanged(int)), this,
|
|
||||||
SLOT(changeColorState(int)));
|
|
||||||
connect(ui->checkBox_inactiveCheck, SIGNAL(stateChanged(int)), this,
|
|
||||||
SLOT(changeColorState(int)));
|
|
||||||
connect(ui->comboBox_type, SIGNAL(currentIndexChanged(int)), this,
|
connect(ui->comboBox_type, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(changeCountState(int)));
|
SLOT(changeCountState(int)));
|
||||||
connect(ui->pushButton_activeColor, SIGNAL(clicked()), this,
|
connect(ui->toolButton_activeColor, SIGNAL(clicked()), this,
|
||||||
SLOT(changeColor()));
|
SLOT(changeColor()));
|
||||||
connect(ui->pushButton_inactiveColor, SIGNAL(clicked()), this,
|
connect(ui->toolButton_inactiveColor, SIGNAL(clicked()), this,
|
||||||
SLOT(changeColor()));
|
SLOT(changeColor()));
|
||||||
connect(ui->pushButton_activeImage, SIGNAL(clicked()), this,
|
|
||||||
SLOT(changeImage()));
|
|
||||||
connect(ui->pushButton_inactiveImage, SIGNAL(clicked()), this,
|
|
||||||
SLOT(changeImage()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -110,22 +101,27 @@ QString GraphicalItem::image(const QVariant &value)
|
|||||||
|
|
||||||
// paint
|
// paint
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case Vertical:
|
case Type::Vertical:
|
||||||
m_helper->paintVertical(converted);
|
m_helper->paintVertical(converted);
|
||||||
// scale
|
// scale
|
||||||
scale[1] = -2 * static_cast<int>(m_direction) + 1;
|
scale[1] = -2 * static_cast<int>(m_direction) + 1;
|
||||||
break;
|
break;
|
||||||
case Circle:
|
case Type::Circle:
|
||||||
m_helper->paintCircle(converted);
|
m_helper->paintCircle(converted);
|
||||||
// scale
|
// scale
|
||||||
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
||||||
break;
|
break;
|
||||||
case Graph:
|
case Type::Graph:
|
||||||
m_helper->paintGraph(converted);
|
m_helper->paintGraph(converted);
|
||||||
// direction option is not recognized by this GI type
|
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
||||||
|
scale[1] = -1;
|
||||||
break;
|
break;
|
||||||
case Horizontal:
|
case Type::Bars:
|
||||||
default:
|
m_helper->paintBars(converted);
|
||||||
|
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
||||||
|
scale[1] = -1;
|
||||||
|
break;
|
||||||
|
case Type::Horizontal:
|
||||||
m_helper->paintHorizontal(converted);
|
m_helper->paintHorizontal(converted);
|
||||||
// scale
|
// scale
|
||||||
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
scale[0] = -2 * static_cast<int>(m_direction) + 1;
|
||||||
@ -197,17 +193,19 @@ QString GraphicalItem::strType() const
|
|||||||
{
|
{
|
||||||
QString value;
|
QString value;
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case Vertical:
|
case Type::Vertical:
|
||||||
value = QString("Vertical");
|
value = QString("Vertical");
|
||||||
break;
|
break;
|
||||||
case Circle:
|
case Type::Circle:
|
||||||
value = QString("Circle");
|
value = QString("Circle");
|
||||||
break;
|
break;
|
||||||
case Graph:
|
case Type::Graph:
|
||||||
value = QString("Graph");
|
value = QString("Graph");
|
||||||
break;
|
break;
|
||||||
case Horizontal:
|
case Type::Bars:
|
||||||
default:
|
value = QString("Bars");
|
||||||
|
break;
|
||||||
|
case Type::Horizontal:
|
||||||
value = QString("Horizontal");
|
value = QString("Horizontal");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -226,11 +224,10 @@ QString GraphicalItem::strDirection() const
|
|||||||
{
|
{
|
||||||
QString value;
|
QString value;
|
||||||
switch (m_direction) {
|
switch (m_direction) {
|
||||||
case RightToLeft:
|
case Direction::RightToLeft:
|
||||||
value = QString("RightToLeft");
|
value = QString("RightToLeft");
|
||||||
break;
|
break;
|
||||||
case LeftToRight:
|
case Direction::LeftToRight:
|
||||||
default:
|
|
||||||
value = QString("LeftToRight");
|
value = QString("LeftToRight");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -323,7 +320,7 @@ void GraphicalItem::setMinValue(const float _value)
|
|||||||
|
|
||||||
void GraphicalItem::setType(const Type _type)
|
void GraphicalItem::setType(const Type _type)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Type" << _type;
|
qCDebug(LOG_LIB) << "Type" << static_cast<int>(_type);
|
||||||
|
|
||||||
m_type = _type;
|
m_type = _type;
|
||||||
}
|
}
|
||||||
@ -334,19 +331,21 @@ void GraphicalItem::setStrType(const QString _type)
|
|||||||
qCDebug(LOG_LIB) << "Type" << _type;
|
qCDebug(LOG_LIB) << "Type" << _type;
|
||||||
|
|
||||||
if (_type == QString("Vertical"))
|
if (_type == QString("Vertical"))
|
||||||
setType(Vertical);
|
setType(Type::Vertical);
|
||||||
else if (_type == QString("Circle"))
|
else if (_type == QString("Circle"))
|
||||||
setType(Circle);
|
setType(Type::Circle);
|
||||||
else if (_type == QString("Graph"))
|
else if (_type == QString("Graph"))
|
||||||
setType(Graph);
|
setType(Type::Graph);
|
||||||
|
else if (_type == QString("Bars"))
|
||||||
|
setType(Type::Bars);
|
||||||
else
|
else
|
||||||
setType(Horizontal);
|
setType(Type::Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicalItem::setDirection(const Direction _direction)
|
void GraphicalItem::setDirection(const Direction _direction)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Direction" << _direction;
|
qCDebug(LOG_LIB) << "Direction" << static_cast<int>(_direction);
|
||||||
|
|
||||||
m_direction = _direction;
|
m_direction = _direction;
|
||||||
}
|
}
|
||||||
@ -357,9 +356,9 @@ void GraphicalItem::setStrDirection(const QString _direction)
|
|||||||
qCDebug(LOG_LIB) << "Direction" << _direction;
|
qCDebug(LOG_LIB) << "Direction" << _direction;
|
||||||
|
|
||||||
if (_direction == QString("RightToLeft"))
|
if (_direction == QString("RightToLeft"))
|
||||||
setDirection(RightToLeft);
|
setDirection(Direction::RightToLeft);
|
||||||
else
|
else
|
||||||
setDirection(LeftToRight);
|
setDirection(Direction::LeftToRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -378,7 +377,13 @@ void GraphicalItem::setUsedKeys(const QStringList _usedKeys)
|
|||||||
qCDebug(LOG_LIB) << "Used keys" << _usedKeys;
|
qCDebug(LOG_LIB) << "Used keys" << _usedKeys;
|
||||||
|
|
||||||
// remove dubs
|
// remove dubs
|
||||||
m_usedKeys = QSet<QString>::fromList(_usedKeys).toList();
|
// HACK converting to set may break order
|
||||||
|
m_usedKeys.clear();
|
||||||
|
for (auto key : _usedKeys) {
|
||||||
|
if (m_usedKeys.contains(key))
|
||||||
|
continue;
|
||||||
|
m_usedKeys.append(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -423,9 +428,18 @@ void GraphicalItem::readConfiguration()
|
|||||||
.toString());
|
.toString());
|
||||||
setHeight(settings.value(QString("X-AW-Height"), m_height).toInt());
|
setHeight(settings.value(QString("X-AW-Height"), m_height).toInt());
|
||||||
setWidth(settings.value(QString("X-AW-Width"), m_width).toInt());
|
setWidth(settings.value(QString("X-AW-Width"), m_width).toInt());
|
||||||
// api == 2
|
// api == 5
|
||||||
if (apiVersion() < 2)
|
if (apiVersion() < 5) {
|
||||||
setNumber(bar().remove(QString("bar")).toInt());
|
QString prefix;
|
||||||
|
prefix = m_activeColor.startsWith(QString("/"))
|
||||||
|
? QString("file://%1")
|
||||||
|
: QString("color://%1");
|
||||||
|
m_activeColor = prefix.arg(m_activeColor);
|
||||||
|
prefix = m_inactiveColor.startsWith(QString("/"))
|
||||||
|
? QString("file://%1")
|
||||||
|
: QString("color://%1");
|
||||||
|
m_inactiveColor = prefix.arg(m_inactiveColor);
|
||||||
|
}
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,6 +460,7 @@ int GraphicalItem::showConfiguration(const QVariant args)
|
|||||||
|
|
||||||
ui->lineEdit_name->setText(name());
|
ui->lineEdit_name->setText(name());
|
||||||
ui->lineEdit_comment->setText(comment());
|
ui->lineEdit_comment->setText(comment());
|
||||||
|
ui->label_numberValue->setText(QString("%1").arg(number()));
|
||||||
ui->checkBox_custom->setChecked(m_custom);
|
ui->checkBox_custom->setChecked(m_custom);
|
||||||
ui->comboBox_value->addItems(tags);
|
ui->comboBox_value->addItems(tags);
|
||||||
if (m_custom) {
|
if (m_custom) {
|
||||||
@ -457,16 +472,25 @@ int GraphicalItem::showConfiguration(const QVariant args)
|
|||||||
ui->doubleSpinBox_max->setValue(m_maxValue);
|
ui->doubleSpinBox_max->setValue(m_maxValue);
|
||||||
ui->doubleSpinBox_min->setValue(m_minValue);
|
ui->doubleSpinBox_min->setValue(m_minValue);
|
||||||
ui->spinBox_count->setValue(m_count);
|
ui->spinBox_count->setValue(m_count);
|
||||||
ui->pushButton_activeColor->setText(m_activeColor);
|
if (m_helper->isColor(m_activeColor))
|
||||||
ui->pushButton_inactiveColor->setText(m_inactiveColor);
|
ui->comboBox_activeImageType->setCurrentIndex(0);
|
||||||
|
else
|
||||||
|
ui->comboBox_activeImageType->setCurrentIndex(1);
|
||||||
|
ui->lineEdit_activeColor->setText(m_activeColor);
|
||||||
|
if (m_helper->isColor(m_inactiveColor))
|
||||||
|
ui->comboBox_inactiveImageType->setCurrentIndex(0);
|
||||||
|
else
|
||||||
|
ui->comboBox_inactiveImageType->setCurrentIndex(1);
|
||||||
|
ui->lineEdit_inactiveColor->setText(m_inactiveColor);
|
||||||
ui->comboBox_type->setCurrentIndex(static_cast<int>(m_type));
|
ui->comboBox_type->setCurrentIndex(static_cast<int>(m_type));
|
||||||
ui->comboBox_direction->setCurrentIndex(static_cast<int>(m_direction));
|
ui->comboBox_direction->setCurrentIndex(static_cast<int>(m_direction));
|
||||||
ui->spinBox_height->setValue(m_height);
|
ui->spinBox_height->setValue(m_height);
|
||||||
ui->spinBox_width->setValue(m_width);
|
ui->spinBox_width->setValue(m_width);
|
||||||
|
|
||||||
// update UI
|
// update UI
|
||||||
changeCountState(ui->comboBox_type->currentIndex());
|
emit(ui->comboBox_type->currentIndexChanged(
|
||||||
changeValue(ui->checkBox_custom->checkState());
|
ui->comboBox_type->currentIndex()));
|
||||||
|
emit(ui->checkBox_custom->stateChanged(ui->checkBox_custom->checkState()));
|
||||||
|
|
||||||
int ret = exec();
|
int ret = exec();
|
||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
@ -480,8 +504,8 @@ int GraphicalItem::showConfiguration(const QVariant args)
|
|||||||
: ui->comboBox_value->currentText());
|
: ui->comboBox_value->currentText());
|
||||||
setMaxValue(ui->doubleSpinBox_max->value());
|
setMaxValue(ui->doubleSpinBox_max->value());
|
||||||
setMinValue(ui->doubleSpinBox_min->value());
|
setMinValue(ui->doubleSpinBox_min->value());
|
||||||
setActiveColor(ui->pushButton_activeColor->text().remove(QChar('&')));
|
setActiveColor(ui->lineEdit_activeColor->text());
|
||||||
setInactiveColor(ui->pushButton_inactiveColor->text().remove(QChar('&')));
|
setInactiveColor(ui->lineEdit_inactiveColor->text());
|
||||||
setStrType(ui->comboBox_type->currentText());
|
setStrType(ui->comboBox_type->currentText());
|
||||||
setStrDirection(ui->comboBox_direction->currentText());
|
setStrDirection(ui->comboBox_direction->currentText());
|
||||||
setHeight(ui->spinBox_height->value());
|
setHeight(ui->spinBox_height->value());
|
||||||
@ -521,38 +545,49 @@ void GraphicalItem::writeConfiguration() const
|
|||||||
|
|
||||||
void GraphicalItem::changeColor()
|
void GraphicalItem::changeColor()
|
||||||
{
|
{
|
||||||
QColor color = m_helper->stringToColor(
|
QLineEdit *lineEdit;
|
||||||
(static_cast<QPushButton *>(sender()))->text());
|
int state;
|
||||||
QColor newColor = QColorDialog::getColor(color, this, tr("Select color"),
|
if (sender() == ui->toolButton_activeColor) {
|
||||||
QColorDialog::ShowAlphaChannel);
|
lineEdit = ui->lineEdit_activeColor;
|
||||||
if (!newColor.isValid())
|
state = ui->comboBox_activeImageType->currentIndex();
|
||||||
return;
|
} else {
|
||||||
qCInfo(LOG_LIB) << "Selected color" << newColor;
|
lineEdit = ui->lineEdit_inactiveColor;
|
||||||
|
state = ui->comboBox_inactiveImageType->currentIndex();
|
||||||
QStringList colorText;
|
|
||||||
colorText.append(QString("%1").arg(newColor.red()));
|
|
||||||
colorText.append(QString("%1").arg(newColor.green()));
|
|
||||||
colorText.append(QString("%1").arg(newColor.blue()));
|
|
||||||
colorText.append(QString("%1").arg(newColor.alpha()));
|
|
||||||
|
|
||||||
return static_cast<QPushButton *>(sender())
|
|
||||||
->setText(colorText.join(QChar(',')));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GraphicalItem::changeColorState(const int state)
|
|
||||||
{
|
|
||||||
qCDebug(LOG_LIB) << "Current color state is" << state;
|
|
||||||
|
|
||||||
if (sender() == ui->checkBox_activeCheck) {
|
|
||||||
qCInfo(LOG_LIB) << "Change active color state";
|
|
||||||
ui->widget_activeColor->setHidden(state == Qt::Unchecked);
|
|
||||||
ui->widget_activeImage->setHidden(state != Qt::Unchecked);
|
|
||||||
} else if (sender() == ui->checkBox_inactiveCheck) {
|
|
||||||
qCInfo(LOG_LIB) << "Change inactive color state";
|
|
||||||
ui->widget_inactiveColor->setHidden(state == Qt::Unchecked);
|
|
||||||
ui->widget_inactiveImage->setHidden(state != Qt::Unchecked);
|
|
||||||
}
|
}
|
||||||
|
qCInfo(LOG_LIB) << "Using state" << state << "and lineEdit" << lineEdit;
|
||||||
|
|
||||||
|
QString outputColor;
|
||||||
|
if (state == 0) {
|
||||||
|
QColor color = m_helper->stringToColor(lineEdit->text());
|
||||||
|
QColor newColor = QColorDialog::getColor(
|
||||||
|
color, this, tr("Select color"), QColorDialog::ShowAlphaChannel);
|
||||||
|
if (!newColor.isValid())
|
||||||
|
return;
|
||||||
|
qCInfo(LOG_LIB) << "Selected color" << newColor;
|
||||||
|
|
||||||
|
QStringList colorText;
|
||||||
|
colorText.append(QString("%1").arg(newColor.red()));
|
||||||
|
colorText.append(QString("%1").arg(newColor.green()));
|
||||||
|
colorText.append(QString("%1").arg(newColor.blue()));
|
||||||
|
colorText.append(QString("%1").arg(newColor.alpha()));
|
||||||
|
|
||||||
|
outputColor = QString("color://%1").arg(colorText.join(QChar(',')));
|
||||||
|
} else if (state == 1) {
|
||||||
|
QString path = lineEdit->text();
|
||||||
|
QString directory = QFileInfo(path).absolutePath();
|
||||||
|
outputColor = QFileDialog::getOpenFileUrl(
|
||||||
|
this, tr("Select path"), directory,
|
||||||
|
tr("Images (*.png *.bpm *.jpg);;All files (*.*)"))
|
||||||
|
.toString();
|
||||||
|
|
||||||
|
qCInfo(LOG_LIB) << "Selected path" << outputColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (outputColor.isEmpty()) {
|
||||||
|
qCWarning(LOG_LIB) << "Empty color selected, skipping";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return lineEdit->setText(outputColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -565,20 +600,6 @@ void GraphicalItem::changeCountState(const int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicalItem::changeImage()
|
|
||||||
{
|
|
||||||
QString path = static_cast<QPushButton *>(sender())->text();
|
|
||||||
QString directory = QFileInfo(path).absolutePath();
|
|
||||||
QString newPath = QFileDialog::getOpenFileName(
|
|
||||||
this, tr("Select path"), directory,
|
|
||||||
tr("Images (*.png *.bpm *.jpg);;All files (*.*)"));
|
|
||||||
|
|
||||||
qCInfo(LOG_LIB) << "Selected path" << newPath;
|
|
||||||
|
|
||||||
return static_cast<QPushButton *>(sender())->setText(newPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GraphicalItem::changeValue(const int state)
|
void GraphicalItem::changeValue(const int state)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Current state is" << state;
|
qCDebug(LOG_LIB) << "Current state is" << state;
|
||||||
@ -613,20 +634,24 @@ void GraphicalItem::translate()
|
|||||||
{
|
{
|
||||||
ui->label_name->setText(i18n("Name"));
|
ui->label_name->setText(i18n("Name"));
|
||||||
ui->label_comment->setText(i18n("Comment"));
|
ui->label_comment->setText(i18n("Comment"));
|
||||||
ui->label_count->setText(i18n("Points count"));
|
ui->label_number->setText(i18n("Tag"));
|
||||||
ui->checkBox_custom->setText(i18n("Use custom formula"));
|
ui->checkBox_custom->setText(i18n("Use custom formula"));
|
||||||
ui->label_value->setText(i18n("Value"));
|
ui->label_value->setText(i18n("Value"));
|
||||||
ui->label_customValue->setText(i18n("Value"));
|
ui->label_customValue->setText(i18n("Value"));
|
||||||
ui->label_max->setText(i18n("Max value"));
|
ui->label_max->setText(i18n("Max value"));
|
||||||
ui->label_min->setText(i18n("Min value"));
|
ui->label_min->setText(i18n("Min value"));
|
||||||
ui->checkBox_activeCheck->setText(i18n("Use image for active"));
|
ui->label_activeImageType->setText(i18n("Active filling type"));
|
||||||
ui->label_activeColor->setText(i18n("Active color"));
|
ui->label_inactiveImageType->setText(i18n("Inctive filling type"));
|
||||||
ui->label_activeImage->setText(i18n("Active image"));
|
|
||||||
ui->checkBox_inactiveCheck->setText(i18n("Use image for inactive"));
|
|
||||||
ui->label_inactiveColor->setText(i18n("Inactive color"));
|
|
||||||
ui->label_inactiveImage->setText(i18n("Inactive image"));
|
|
||||||
ui->label_type->setText(i18n("Type"));
|
ui->label_type->setText(i18n("Type"));
|
||||||
|
ui->label_count->setText(i18n("Points count"));
|
||||||
ui->label_direction->setText(i18n("Direction"));
|
ui->label_direction->setText(i18n("Direction"));
|
||||||
ui->label_height->setText(i18n("Height"));
|
ui->label_height->setText(i18n("Height"));
|
||||||
ui->label_width->setText(i18n("Width"));
|
ui->label_width->setText(i18n("Width"));
|
||||||
|
|
||||||
|
ui->comboBox_activeImageType->clear();
|
||||||
|
ui->comboBox_activeImageType->addItem(i18n("color"));
|
||||||
|
ui->comboBox_activeImageType->addItem(i18n("image"));
|
||||||
|
ui->comboBox_inactiveImageType->clear();
|
||||||
|
ui->comboBox_inactiveImageType->addItem(i18n("color"));
|
||||||
|
ui->comboBox_inactiveImageType->addItem(i18n("image"));
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ class GraphicalItem : public AbstractExtItem
|
|||||||
Q_PROPERTY(int width READ width WRITE setWidth)
|
Q_PROPERTY(int width READ width WRITE setWidth)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Direction { LeftToRight = 0, RightToLeft };
|
enum class Direction { LeftToRight = 0, RightToLeft = 1 };
|
||||||
enum Type { Horizontal = 0, Vertical, Circle, Graph };
|
enum class Type { Horizontal, Vertical, Circle, Graph, Bars };
|
||||||
|
|
||||||
explicit GraphicalItem(QWidget *parent = nullptr,
|
explicit GraphicalItem(QWidget *parent = nullptr,
|
||||||
const QString desktopName = QString(),
|
const QString desktopName = QString(),
|
||||||
@ -76,15 +76,16 @@ public:
|
|||||||
QString uniq() const;
|
QString uniq() const;
|
||||||
// set methods
|
// set methods
|
||||||
void setBar(const QString _bar = QString("cpu"));
|
void setBar(const QString _bar = QString("cpu"));
|
||||||
void setActiveColor(const QString _color = QString("0,0,0,130"));
|
void setActiveColor(const QString _color = QString("color://0,0,0,130"));
|
||||||
void setCount(const int _count = 100);
|
void setCount(const int _count = 100);
|
||||||
void setCustom(const bool _custom = false);
|
void setCustom(const bool _custom = false);
|
||||||
void setInactiveColor(const QString _color = QString("255,255,255,130"));
|
void setInactiveColor(const QString _color
|
||||||
|
= QString("color://255,255,255,130"));
|
||||||
void setMinValue(const float _value = 0.0);
|
void setMinValue(const float _value = 0.0);
|
||||||
void setMaxValue(const float _value = 100.0);
|
void setMaxValue(const float _value = 100.0);
|
||||||
void setType(const Type _type = Horizontal);
|
void setType(const Type _type = Type::Horizontal);
|
||||||
void setStrType(const QString _type = QString("Horizontal"));
|
void setStrType(const QString _type = QString("Horizontal"));
|
||||||
void setDirection(const Direction _direction = LeftToRight);
|
void setDirection(const Direction _direction = Direction::LeftToRight);
|
||||||
void setStrDirection(const QString _direction = QString("LeftToRight"));
|
void setStrDirection(const QString _direction = QString("LeftToRight"));
|
||||||
void setHeight(const int _height = 100);
|
void setHeight(const int _height = 100);
|
||||||
void setUsedKeys(const QStringList _usedKeys = QStringList());
|
void setUsedKeys(const QStringList _usedKeys = QStringList());
|
||||||
@ -98,9 +99,7 @@ public slots:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void changeColor();
|
void changeColor();
|
||||||
void changeColorState(const int state);
|
|
||||||
void changeCountState(const int state);
|
void changeCountState(const int state);
|
||||||
void changeImage();
|
|
||||||
void changeValue(const int state);
|
void changeValue(const int state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -114,12 +113,12 @@ private:
|
|||||||
QString m_bar = QString("cpu");
|
QString m_bar = QString("cpu");
|
||||||
int m_count = 100;
|
int m_count = 100;
|
||||||
bool m_custom = false;
|
bool m_custom = false;
|
||||||
QString m_activeColor;
|
QString m_activeColor = QString("color://0,0,0,130");
|
||||||
QString m_inactiveColor;
|
QString m_inactiveColor = QString("color://255,255,255,130");
|
||||||
float m_minValue = 0.0f;
|
float m_minValue = 0.0f;
|
||||||
float m_maxValue = 100.0f;
|
float m_maxValue = 100.0f;
|
||||||
Type m_type = Horizontal;
|
Type m_type = Type::Horizontal;
|
||||||
Direction m_direction = LeftToRight;
|
Direction m_direction = Direction::LeftToRight;
|
||||||
int m_height = 100;
|
int m_height = 100;
|
||||||
QStringList m_usedKeys;
|
QStringList m_usedKeys;
|
||||||
int m_width = 100;
|
int m_width = 100;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>416</width>
|
<width>416</width>
|
||||||
<height>606</height>
|
<height>569</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Name</string>
|
<string>Name</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Comment</string>
|
<string>Comment</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -60,6 +60,27 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="layout_number">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_number">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tag</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_numberValue">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_2">
|
<widget class="Line" name="line_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -100,22 +121,13 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_value" native="true">
|
<widget class="QWidget" name="widget_value" native="true">
|
||||||
<layout class="QHBoxLayout" name="layout_value">
|
<layout class="QHBoxLayout" name="layout_value">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_value">
|
<widget class="QLabel" name="label_value">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Value</string>
|
<string>Value</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -135,16 +147,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_customValue" native="true">
|
<widget class="QWidget" name="widget_customValue" native="true">
|
||||||
<layout class="QHBoxLayout" name="layout_customValue">
|
<layout class="QHBoxLayout" name="layout_customValue">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -156,7 +159,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Va&lue</string>
|
<string>Value</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -174,7 +177,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_max">
|
<widget class="QLabel" name="label_max">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Max value</string>
|
<string>Max value</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -195,7 +198,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_min">
|
<widget class="QLabel" name="label_min">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Min val&ue</string>
|
<string>Min value</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -211,44 +214,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_count" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="layout_count">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_count">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Points count</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="spinBox_count">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>2000</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>25</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -257,211 +222,81 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_activeCheck">
|
<layout class="QHBoxLayout" name="layout_activeImageType">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="spacer_activeCheck">
|
<widget class="QLabel" name="label_activeImageType">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Active filling type</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="alignment">
|
||||||
<size>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_activeCheck">
|
<widget class="QComboBox" name="comboBox_activeImageType"/>
|
||||||
<property name="sizePolicy">
|
</item>
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
</layout>
|
||||||
<horstretch>0</horstretch>
|
</item>
|
||||||
<verstretch>0</verstretch>
|
<item>
|
||||||
</sizepolicy>
|
<layout class="QHBoxLayout" name="layout_activeColorButton">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_activeColor">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButton_activeColor">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use image for active</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_activeColor" native="true">
|
<layout class="QHBoxLayout" name="layout_inactiveImageType">
|
||||||
<layout class="QHBoxLayout" name="layout_activeColor">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_activeColor">
|
|
||||||
<property name="text">
|
|
||||||
<string>Activ&e color</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_activeColor">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_activeImage" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="layout_activeImage">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_activeImage">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Active image</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_activeImage">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="layout_inactiveCheck">
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="spacer_inactiveCheck">
|
<widget class="QLabel" name="label_inactiveImageType">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_inactiveCheck">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use image for inactive</string>
|
<string>Inactive filling type</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox_inactiveImageType"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_inactiveColor" native="true">
|
<layout class="QHBoxLayout" name="layout_inactiveColorButton">
|
||||||
<layout class="QHBoxLayout" name="layout_inactiveColor">
|
<item>
|
||||||
<property name="leftMargin">
|
<widget class="QLineEdit" name="lineEdit_inactiveColor">
|
||||||
<number>0</number>
|
<property name="readOnly">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
<property name="topMargin">
|
</property>
|
||||||
<number>0</number>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="rightMargin">
|
<item>
|
||||||
<number>0</number>
|
<widget class="QToolButton" name="toolButton_inactiveColor">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="bottomMargin">
|
<string>...</string>
|
||||||
<number>0</number>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QLabel" name="label_inactiveColor">
|
</layout>
|
||||||
<property name="text">
|
|
||||||
<string>&Inactive color</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_inactiveColor">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_inactiveImage" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="layout_inactiveImage">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_inactiveImage">
|
|
||||||
<property name="text">
|
|
||||||
<string>Inactive image</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_inactiveImage">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_type">
|
<layout class="QHBoxLayout" name="layout_type">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_type">
|
<widget class="QLabel" name="label_type">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Type</string>
|
<string>Type</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -490,6 +325,11 @@
|
|||||||
<string notr="true">Graph</string>
|
<string notr="true">Graph</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Bars</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -499,7 +339,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_direction">
|
<widget class="QLabel" name="label_direction">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Direction</string>
|
<string>Direction</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -522,12 +362,41 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_count" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="layout_count">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_count">
|
||||||
|
<property name="text">
|
||||||
|
<string>Points count</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_count">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>25</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_height">
|
<layout class="QHBoxLayout" name="layout_height">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_height">
|
<widget class="QLabel" name="label_height">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Height</string>
|
<string>Height</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -551,7 +420,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_width">
|
<widget class="QLabel" name="label_width">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Width</string>
|
<string>Width</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QGraphicsEllipseItem>
|
#include <QGraphicsEllipseItem>
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -50,29 +51,29 @@ void GraphicalItemHelper::setParameters(const QString active,
|
|||||||
|
|
||||||
// put images to pens if any otherwise set pen colors
|
// put images to pens if any otherwise set pen colors
|
||||||
// Images resize to content here as well
|
// Images resize to content here as well
|
||||||
if (active.startsWith(QString("/"))) {
|
if (isColor(active)) {
|
||||||
|
m_activePen.setBrush(QBrush(stringToColor(active)));
|
||||||
|
} else {
|
||||||
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << active;
|
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << active;
|
||||||
QPixmap pixmap = QPixmap(active);
|
QPixmap pixmap = QPixmap(QUrl(active).toLocalFile());
|
||||||
if (pixmap.isNull()) {
|
if (pixmap.isNull()) {
|
||||||
qCInfo(LOG_LIB) << "Invalid pixmap found" << active;
|
qCWarning(LOG_LIB) << "Invalid pixmap found" << active;
|
||||||
m_activePen.setColor(QColor(0, 0, 0, 130));
|
m_activePen.setBrush(QBrush(QColor(0, 0, 0, 130)));
|
||||||
} else {
|
} else {
|
||||||
m_activePen.setBrush(QBrush(pixmap.scaled(width, height)));
|
m_activePen.setBrush(QBrush(pixmap.scaled(width, height)));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
m_activePen.setColor(stringToColor(active));
|
|
||||||
}
|
}
|
||||||
if (inactive.startsWith(QString("/"))) {
|
if (isColor(inactive)) {
|
||||||
|
m_inactivePen.setBrush(QBrush(stringToColor(inactive)));
|
||||||
|
} else {
|
||||||
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << inactive;
|
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << inactive;
|
||||||
QPixmap pixmap = QPixmap(inactive);
|
QPixmap pixmap = QPixmap(QUrl(inactive).toLocalFile());
|
||||||
if (pixmap.isNull()) {
|
if (pixmap.isNull()) {
|
||||||
qCInfo(LOG_LIB) << "Invalid pixmap found" << inactive;
|
qCWarning(LOG_LIB) << "Invalid pixmap found" << inactive;
|
||||||
m_inactivePen.setColor(QColor(255, 255, 255, 130));
|
m_inactivePen.setBrush(QBrush(QColor(255, 255, 255, 130)));
|
||||||
} else {
|
} else {
|
||||||
m_inactivePen.setBrush(QBrush(pixmap.scaled(width, height)));
|
m_inactivePen.setBrush(QBrush(pixmap.scaled(width, height)));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
m_inactivePen.setColor(stringToColor(inactive));
|
|
||||||
}
|
}
|
||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
@ -80,6 +81,30 @@ void GraphicalItemHelper::setParameters(const QString active,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GraphicalItemHelper::paintBars(const float &value)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_LIB) << "Paint with value" << value;
|
||||||
|
|
||||||
|
// refresh background image
|
||||||
|
m_scene->setBackgroundBrush(m_inactivePen.brush());
|
||||||
|
|
||||||
|
storeValue(value);
|
||||||
|
|
||||||
|
// default norms
|
||||||
|
float normX
|
||||||
|
= static_cast<float>(m_width) / static_cast<float>(m_values.count());
|
||||||
|
float normY = static_cast<float>(m_height - 1);
|
||||||
|
// paint graph
|
||||||
|
for (int i = 0; i < m_values.count(); i++) {
|
||||||
|
float x = i * normX;
|
||||||
|
float y = 0.5f;
|
||||||
|
float width = normX;
|
||||||
|
float height = m_values.at(i) * normY + 0.5f;
|
||||||
|
m_scene->addRect(x, y, width, height, m_activePen, m_activePen.brush());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicalItemHelper::paintCircle(const float &percent)
|
void GraphicalItemHelper::paintCircle(const float &percent)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Paint with percent" << percent;
|
qCDebug(LOG_LIB) << "Paint with percent" << percent;
|
||||||
@ -120,9 +145,9 @@ void GraphicalItemHelper::paintGraph(const float &value)
|
|||||||
for (int i = 0; i < m_values.count() - 1; i++) {
|
for (int i = 0; i < m_values.count() - 1; i++) {
|
||||||
// some magic here
|
// some magic here
|
||||||
float x1 = i * normX;
|
float x1 = i * normX;
|
||||||
float y1 = -fabs(m_values.at(i)) * normY + 0.5f;
|
float y1 = m_values.at(i) * normY + 0.5f;
|
||||||
float x2 = (i + 1) * normX;
|
float x2 = (i + 1) * normX;
|
||||||
float y2 = -fabs(m_values.at(i + 1)) * normY + 0.5f;
|
float y2 = m_values.at(i + 1) * normY + 0.5f;
|
||||||
m_scene->addLine(x1, y1, x2, y2, m_activePen);
|
m_scene->addLine(x1, y1, x2, y2, m_activePen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,14 +196,25 @@ float GraphicalItemHelper::getPercents(const float &value, const float &min,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool GraphicalItemHelper::isColor(const QString &input)
|
||||||
|
{
|
||||||
|
qCDebug(LOG_LIB) << "Define input type in" << input;
|
||||||
|
|
||||||
|
return input.startsWith(QString("color://"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QColor GraphicalItemHelper::stringToColor(const QString &color)
|
QColor GraphicalItemHelper::stringToColor(const QString &color)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << "Color" << color;
|
qCDebug(LOG_LIB) << "Color" << color;
|
||||||
|
|
||||||
QColor qColor;
|
|
||||||
QStringList listColor = color.split(QChar(','));
|
QStringList listColor = color.split(QChar(','));
|
||||||
while (listColor.count() < 4)
|
while (listColor.count() < 4)
|
||||||
listColor.append(QString("0"));
|
listColor.append(QString("0"));
|
||||||
|
// remove prefix
|
||||||
|
listColor[0].remove(QString("color://"));
|
||||||
|
// init color
|
||||||
|
QColor qColor;
|
||||||
qColor.setRed(listColor.at(0).toInt());
|
qColor.setRed(listColor.at(0).toInt());
|
||||||
qColor.setGreen(listColor.at(1).toInt());
|
qColor.setGreen(listColor.at(1).toInt());
|
||||||
qColor.setBlue(listColor.at(2).toInt());
|
qColor.setBlue(listColor.at(2).toInt());
|
||||||
|
@ -35,12 +35,14 @@ public:
|
|||||||
void setParameters(const QString active, const QString inactive,
|
void setParameters(const QString active, const QString inactive,
|
||||||
const int width, const int height, const int count);
|
const int width, const int height, const int count);
|
||||||
// paint methods
|
// paint methods
|
||||||
|
void paintBars(const float &value);
|
||||||
void paintCircle(const float &percent);
|
void paintCircle(const float &percent);
|
||||||
void paintGraph(const float &value);
|
void paintGraph(const float &value);
|
||||||
void paintHorizontal(const float &percent);
|
void paintHorizontal(const float &percent);
|
||||||
void paintVertical(const float &percent);
|
void paintVertical(const float &percent);
|
||||||
// additional conversion methods
|
// additional conversion methods
|
||||||
float getPercents(const float &value, const float &min, const float &max);
|
float getPercents(const float &value, const float &min, const float &max);
|
||||||
|
bool isColor(const QString &input);
|
||||||
QColor stringToColor(const QString &color);
|
QColor stringToColor(const QString &color);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
exec_program(
|
exec_program(
|
||||||
"sed -n '1,/^Ver/ p' CHANGELOG | grep -v '^Ver' | tr '\n' '@'"
|
"sed -n '1,/^Ver/ p' CHANGELOG 2> /dev/null | grep -v '^Ver' | tr '\n' '@'"
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE PROJECT_CHANGELOG
|
OUTPUT_VARIABLE PROJECT_CHANGELOG
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# additional target to perform clang-format run, requires clang-format
|
# additional target to perform clang-format run, requires clang-format
|
||||||
|
set(CLANGFORMAT_EXECUTABLE "/usr/bin/clang-format" CACHE STRING "Path to clang-format executable")
|
||||||
|
|
||||||
# get all project files
|
# get all project files
|
||||||
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h *.h.in)
|
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h *.h.in)
|
||||||
|
28
sources/coverity.cmake
Normal file
28
sources/coverity.cmake
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# additional target to perform cppcheck run, requires cppcheck
|
||||||
|
set(COVERITY_COMMENT "" CACHE STRING "Coverity build comment")
|
||||||
|
set(COVERITY_DIRECTORY "cov-int" CACHE STRING "Path to coverity integration directory")
|
||||||
|
set(COVERITY_EMAIL "" CACHE STRING "Coverity user email")
|
||||||
|
set(COVERITY_EXECUTABLE "cov-build" CACHE STRING "Path to coverity build tool")
|
||||||
|
set(COVERITY_TOKEN "" CACHE STRING "Coverity token")
|
||||||
|
set(COVERITY_URL "https://scan.coverity.com/builds?project=Awesome+Widgets" CACHE STRING "Coverity project url")
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
coverity
|
||||||
|
COMMAND ${COVERITY_EXECUTABLE}
|
||||||
|
--dir ${COVERITY_DIRECTORY}
|
||||||
|
make
|
||||||
|
COMMAND zip
|
||||||
|
-r ${PROJECT_NAME}.zip
|
||||||
|
${COVERITY_DIRECTORY}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
coverity-upload
|
||||||
|
COMMAND curl
|
||||||
|
--form token=${COVERITY_TOKEN}
|
||||||
|
--form email=${COVERITY_EMAIL}
|
||||||
|
--form file=@${PROJECT_NAME}.zip
|
||||||
|
--form version=${PROJECT_VERSION}-${PROJECT_COMMIT_SHA}
|
||||||
|
--form description=${COVERITY_COMMENT}
|
||||||
|
${COVERITY_URL}
|
||||||
|
)
|
@ -1,4 +1,5 @@
|
|||||||
# additional target to perform cppcheck run, requires cppcheck
|
# additional target to perform cppcheck run, requires cppcheck
|
||||||
|
set(CPPCHECK_EXECUTABLE "/usr/bin/cppcheck" CACHE STRING "Path to cppcheck executable")
|
||||||
|
|
||||||
# get all project files
|
# get all project files
|
||||||
# HACK this workaround is required to avoid qml files checking ^_^
|
# HACK this workaround is required to avoid qml files checking ^_^
|
||||||
@ -15,6 +16,7 @@ add_custom_target(
|
|||||||
COMMAND ${CPPCHECK_EXECUTABLE}
|
COMMAND ${CPPCHECK_EXECUTABLE}
|
||||||
--enable=warning,performance,portability,information,missingInclude
|
--enable=warning,performance,portability,information,missingInclude
|
||||||
--std=c++11
|
--std=c++11
|
||||||
|
--language=c++
|
||||||
--library=qt.cfg
|
--library=qt.cfg
|
||||||
--template="[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)"
|
--template="[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)"
|
||||||
--verbose
|
--verbose
|
||||||
|
@ -57,7 +57,7 @@ Item {
|
|||||||
|
|
||||||
// ui
|
// ui
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: Plasmoid.Layout
|
||||||
columns: plasmoid.configuration.verticalLayout ? 1 : dpAdds.numberOfDesktops()
|
columns: plasmoid.configuration.verticalLayout ? 1 : dpAdds.numberOfDesktops()
|
||||||
rows: plasmoid.configuration.verticalLayout ? dpAdds.numberOfDesktops() : 1
|
rows: plasmoid.configuration.verticalLayout ? dpAdds.numberOfDesktops() : 1
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 1.3 as QtControls
|
import QtQuick.Controls 1.3 as QtControls
|
||||||
|
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||||
|
|
||||||
import org.kde.plasma.private.desktoppanel 1.0
|
import org.kde.plasma.private.desktoppanel 1.0
|
||||||
|
|
||||||
@ -54,7 +55,24 @@ Item {
|
|||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width * 3 / 12
|
width: parent.width * 3 / 15
|
||||||
|
text: i18n("Bgcolor")
|
||||||
|
|
||||||
|
onClicked: backgroundDialog.visible = true
|
||||||
|
|
||||||
|
QtDialogs.ColorDialog {
|
||||||
|
id: backgroundDialog
|
||||||
|
title: i18n("Select a color")
|
||||||
|
onAccepted: {
|
||||||
|
var text = textPattern.text
|
||||||
|
textPattern.text = "<body bgcolor=\"" +
|
||||||
|
backgroundDialog.color + "\">" +
|
||||||
|
text + "</body>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QtControls.Button {
|
||||||
|
width: parent.width * 3 / 15
|
||||||
text: i18n("Font")
|
text: i18n("Font")
|
||||||
iconName: "font"
|
iconName: "font"
|
||||||
|
|
||||||
@ -66,123 +84,119 @@ Item {
|
|||||||
"size": plasmoid.configuration.fontSize
|
"size": plasmoid.configuration.fontSize
|
||||||
}
|
}
|
||||||
var font = dpAdds.getFont(defaultFont)
|
var font = dpAdds.getFont(defaultFont)
|
||||||
var pos = textPattern.cursorPosition
|
if (font.applied != 1) {
|
||||||
|
if (debug) console.debug("No font selected")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<span style=\"color:" + font.color +
|
textPattern.insert(textPattern.cursorPosition,
|
||||||
"; font-family:'" + font.family +
|
"<span style=\"color:" + font.color +
|
||||||
"'; font-size:" + font.size + "pt;\">" +
|
"; font-family:'" + font.family +
|
||||||
selected + "</span>")
|
"'; font-size:" + font.size + "pt;\">" +
|
||||||
|
selected + "</span>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-indent-more"
|
iconName: "format-indent-more"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Indent button")
|
if (debug) console.debug("Indent button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, selected + "<br>\n")
|
textPattern.insert(textPattern.cursorPosition, selected + "<br>\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-bold"
|
iconName: "format-text-bold"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Bold button")
|
if (debug) console.debug("Bold button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<b>" + selected + "</b>")
|
textPattern.insert(textPattern.cursorPosition, "<b>" + selected + "</b>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-italic"
|
iconName: "format-text-italic"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Italic button")
|
if (debug) console.debug("Italic button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<i>" + selected + "</i>")
|
textPattern.insert(textPattern.cursorPosition, "<i>" + selected + "</i>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-underline"
|
iconName: "format-text-underline"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Underline button")
|
if (debug) console.debug("Underline button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<u>" + selected + "</u>")
|
textPattern.insert(textPattern.cursorPosition, "<u>" + selected + "</u>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-text-strikethrough"
|
iconName: "format-text-strikethrough"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Strike button")
|
if (debug) console.debug("Strike button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<s>" + selected + "</s>")
|
textPattern.insert(textPattern.cursorPosition, "<s>" + selected + "</s>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-left"
|
iconName: "format-justify-left"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Left button")
|
if (debug) console.debug("Left button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"left\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"left\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-center"
|
iconName: "format-justify-center"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Center button")
|
if (debug) console.debug("Center button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"center\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"center\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-right"
|
iconName: "format-justify-right"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Right button")
|
if (debug) console.debug("Right button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"right\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"right\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width / 12
|
width: parent.width / 15
|
||||||
iconName: "format-justify-fill"
|
iconName: "format-justify-fill"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Justify button")
|
if (debug) console.debug("Justify button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, "<p align=\"justify\">" + selected + "</p>")
|
textPattern.insert(textPattern.cursorPosition, "<p align=\"justify\">" + selected + "</p>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,10 +215,9 @@ Item {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (debug) console.debug("Add tag button")
|
if (debug) console.debug("Add tag button")
|
||||||
var pos = textPattern.cursorPosition
|
|
||||||
var selected = textPattern.selectedText
|
var selected = textPattern.selectedText
|
||||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||||
textPattern.insert(pos, selected + "$" + tags.currentText)
|
textPattern.insert(textPattern.cursorPosition, selected + "$" + tags.currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
|
@ -20,7 +20,7 @@ X-Plasma-RemoteLocation=
|
|||||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||||
X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel
|
X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel
|
||||||
X-KDE-PluginInfo-Version=3.1.0
|
X-KDE-PluginInfo-Version=3.1.2
|
||||||
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
||||||
X-KDE-PluginInfo-Category=System Information
|
X-KDE-PluginInfo-Category=System Information
|
||||||
X-KDE-PluginInfo-Depends=
|
X-KDE-PluginInfo-Depends=
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <fontdialog/fontdialog.h>
|
#include <fontdialog/fontdialog.h>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
DPAdds::DPAdds(QObject *parent)
|
DPAdds::DPAdds(QObject *parent)
|
||||||
@ -318,11 +317,14 @@ QVariantMap DPAdds::getFont(const QVariantMap defaultFont) const
|
|||||||
qCDebug(LOG_DP) << "Default font is" << defaultFont;
|
qCDebug(LOG_DP) << "Default font is" << defaultFont;
|
||||||
|
|
||||||
QVariantMap fontMap;
|
QVariantMap fontMap;
|
||||||
|
int ret = 0;
|
||||||
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
|
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
|
||||||
defaultFont[QString("size")].toInt(), 400, false,
|
defaultFont[QString("size")].toInt(), 400, false,
|
||||||
defaultFont[QString("color")].toString());
|
defaultFont[QString("color")].toString());
|
||||||
CFont font
|
CFont font = CFontDialog::getFont(i18n("Select font"), defaultCFont, false,
|
||||||
= CFontDialog::getFont(i18n("Select font"), defaultCFont, false, false);
|
false, &ret);
|
||||||
|
|
||||||
|
fontMap[QString("applied")] = ret;
|
||||||
fontMap[QString("color")] = font.color().name();
|
fontMap[QString("color")] = font.color().name();
|
||||||
fontMap[QString("family")] = font.family();
|
fontMap[QString("family")] = font.family();
|
||||||
fontMap[QString("size")] = font.pointSize();
|
fontMap[QString("size")] = font.pointSize();
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "extsysmonaggregator.h"
|
#include "extsysmonaggregator.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
|
ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
|
||||||
|
@ -29,10 +29,8 @@
|
|||||||
#include "sources/playersource.h"
|
#include "sources/playersource.h"
|
||||||
#include "sources/processessource.h"
|
#include "sources/processessource.h"
|
||||||
#include "sources/quotessource.h"
|
#include "sources/quotessource.h"
|
||||||
#include "sources/updatesource.h"
|
|
||||||
#include "sources/upgradesource.h"
|
#include "sources/upgradesource.h"
|
||||||
#include "sources/weathersource.h"
|
#include "sources/weathersource.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent,
|
ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent,
|
||||||
@ -140,10 +138,6 @@ void ExtSysMonAggregator::init(const QHash<QString, QString> config)
|
|||||||
AbstractExtSysMonSource *quotesItem = new QuotesSource(this, QStringList());
|
AbstractExtSysMonSource *quotesItem = new QuotesSource(this, QStringList());
|
||||||
for (auto source : quotesItem->sources())
|
for (auto source : quotesItem->sources())
|
||||||
m_map[source] = quotesItem;
|
m_map[source] = quotesItem;
|
||||||
// update
|
|
||||||
AbstractExtSysMonSource *updateItem = new UpdateSource(this, QStringList());
|
|
||||||
for (auto source : updateItem->sources())
|
|
||||||
m_map[source] = updateItem;
|
|
||||||
// upgrade
|
// upgrade
|
||||||
AbstractExtSysMonSource *upgradeItem
|
AbstractExtSysMonSource *upgradeItem
|
||||||
= new UpgradeSource(this, QStringList());
|
= new UpgradeSource(this, QStringList());
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
find_package(Gettext REQUIRED)
|
find_package(Gettext REQUIRED)
|
||||||
|
|
||||||
# main qt libraries
|
# main qt libraries
|
||||||
find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||||
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -330,6 +330,9 @@ msgid ""
|
|||||||
"awesome-widgets/\">project homepage</a>"
|
"awesome-widgets/\">project homepage</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -547,9 +550,6 @@ msgstr ""
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -562,27 +562,18 @@ msgstr ""
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Use image for active"
|
msgid "Active filling type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Active color"
|
msgid "Inctive filling type"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -592,6 +583,12 @@ msgstr ""
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2016-04-06 14:40+0300\n"
|
"PO-Revision-Date: 2016-04-29 12:21+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: English <kde-russian@lists.kde.ru>\n"
|
"Language-Team: English <kde-russian@lists.kde.ru>\n"
|
||||||
"Language: ru\n"
|
"Language: ru\n"
|
||||||
@ -335,6 +335,9 @@ msgstr ""
|
|||||||
"Detailed information may be found on <a href=\"https://arcanis.me/projects/"
|
"Detailed information may be found on <a href=\"https://arcanis.me/projects/"
|
||||||
"awesome-widgets/\">project homepage</a>"
|
"awesome-widgets/\">project homepage</a>"
|
||||||
|
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Bgcolor"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "AC"
|
msgstr "AC"
|
||||||
|
|
||||||
@ -556,9 +559,6 @@ msgstr "Timestamp"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "Use images"
|
msgstr "Use images"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr "Points count"
|
|
||||||
|
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Use custom formula"
|
msgstr "Use custom formula"
|
||||||
|
|
||||||
@ -571,27 +571,18 @@ msgstr "Max value"
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Min value"
|
msgstr "Min value"
|
||||||
|
|
||||||
msgid "Use image for active"
|
msgid "Active filling type"
|
||||||
msgstr "Use image for active"
|
msgstr "Active filling type"
|
||||||
|
|
||||||
msgid "Active color"
|
msgid "Inctive filling type"
|
||||||
msgstr "Active color"
|
msgstr "Inctive filling type"
|
||||||
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "Active image"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr "Use image for inactive"
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Inactive color"
|
|
||||||
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Inactive image"
|
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Type"
|
msgstr "Type"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr "Points count"
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Direction"
|
msgstr "Direction"
|
||||||
|
|
||||||
@ -601,6 +592,12 @@ msgstr "Height"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Width"
|
msgstr "Width"
|
||||||
|
|
||||||
|
msgid "color"
|
||||||
|
msgstr "color"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr "image"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Active desktop"
|
msgstr "Active desktop"
|
||||||
|
|
||||||
@ -642,6 +639,18 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "esalexeev@gmail.com"
|
msgstr "esalexeev@gmail.com"
|
||||||
|
|
||||||
|
#~ msgid "Use image for active"
|
||||||
|
#~ msgstr "Use image for active"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Active color"
|
||||||
|
|
||||||
|
#~ msgid "Use image for inactive"
|
||||||
|
#~ msgstr "Use image for inactive"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Inactive color"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
#~ msgid "Add lambda"
|
||||||
#~ msgstr "Add lambda"
|
#~ msgstr "Add lambda"
|
||||||
|
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Ernesto Avilés Vázquez <whippiii@gmail.com>, 2014-2015
|
# Ernesto Avilés Vázquez <whippiii@gmail.com>, 2014-2016
|
||||||
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014-2015
|
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014-2015
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Awesome widgets\n"
|
"Project-Id-Version: Awesome widgets\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-09-26 22:07+0000\n"
|
"PO-Revision-Date: 2016-05-03 06:47+0000\n"
|
||||||
"Last-Translator: Ernesto Avilés Vázquez <whippiii@gmail.com>\n"
|
"Last-Translator: Ernesto Avilés Vázquez <whippiii@gmail.com>\n"
|
||||||
"Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/"
|
"Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/language/es/)\n"
|
||||||
"language/es/)\n"
|
|
||||||
"Language: es\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: es\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
msgid "Widget"
|
msgid "Widget"
|
||||||
@ -60,7 +59,7 @@ msgid "Check updates on startup"
|
|||||||
msgstr "Comprobar actualizaciones al inicio"
|
msgstr "Comprobar actualizaciones al inicio"
|
||||||
|
|
||||||
msgid "Optimize subscription"
|
msgid "Optimize subscription"
|
||||||
msgstr ""
|
msgstr "Optimizar suscripción"
|
||||||
|
|
||||||
msgid "Widget height, px"
|
msgid "Widget height, px"
|
||||||
msgstr "Alto del widget, px"
|
msgstr "Alto del widget, px"
|
||||||
@ -114,39 +113,37 @@ msgid "Drop key cache"
|
|||||||
msgstr "Borrar caché de claves"
|
msgstr "Borrar caché de claves"
|
||||||
|
|
||||||
msgid "Export configuration"
|
msgid "Export configuration"
|
||||||
msgstr ""
|
msgstr "Exportar configuración"
|
||||||
|
|
||||||
msgid "Export"
|
msgid "Export"
|
||||||
msgstr ""
|
msgstr "Exportar"
|
||||||
|
|
||||||
msgid "Success"
|
msgid "Success"
|
||||||
msgstr ""
|
msgstr "Realizado"
|
||||||
|
|
||||||
msgid "Please note that binary files were not copied"
|
msgid "Please note that binary files were not copied"
|
||||||
msgstr ""
|
msgstr "Por favor, note que los archivos binarios no fueron copiados"
|
||||||
|
|
||||||
msgid "Ooops..."
|
msgid "Ooops..."
|
||||||
msgstr ""
|
msgstr "Uy..."
|
||||||
|
|
||||||
msgid "Could not save configuration file"
|
msgid "Could not save configuration file"
|
||||||
msgstr ""
|
msgstr "No se pudo guardar el archivo de configuración"
|
||||||
|
|
||||||
msgid "Import configuration"
|
msgid "Import configuration"
|
||||||
msgstr ""
|
msgstr "Importar configuración"
|
||||||
|
|
||||||
msgid "Import"
|
msgid "Import"
|
||||||
msgstr ""
|
msgstr "Importar"
|
||||||
|
|
||||||
msgid "Import plasmoid settings"
|
msgid "Import plasmoid settings"
|
||||||
msgstr ""
|
msgstr "Importar configuraciones de plasmoide"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Import extensions"
|
msgid "Import extensions"
|
||||||
msgstr "Extensiones"
|
msgstr "Extensiones a importar"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Import additional files"
|
msgid "Import additional files"
|
||||||
msgstr "Filtros adicionales"
|
msgstr "Importar archivos adicionales"
|
||||||
|
|
||||||
msgid "Font"
|
msgid "Font"
|
||||||
msgstr "Tipo de letra"
|
msgstr "Tipo de letra"
|
||||||
@ -277,10 +274,7 @@ msgstr "Comprobar actualizaciones"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
|
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
|
||||||
"To enable them just make needed checkbox checked."
|
"To enable them just make needed checkbox checked."
|
||||||
msgstr ""
|
msgstr "Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas emergentes. Para habilitarlas, simplemente marca las casillas correspondientes."
|
||||||
"Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas "
|
|
||||||
"emergentes. Para habilitarlas, simplemente marca las casillas "
|
|
||||||
"correspondientes."
|
|
||||||
|
|
||||||
msgid "Number of values for tooltips"
|
msgid "Number of values for tooltips"
|
||||||
msgstr "Número de valores para las ventanas emergentes"
|
msgstr "Número de valores para las ventanas emergentes"
|
||||||
@ -334,11 +328,12 @@ msgid "Battery inactive color"
|
|||||||
msgstr "Color de la batería inactiva"
|
msgstr "Color de la batería inactiva"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Detailed information may be found on <a href=\"https://arcanis.me/projects/"
|
"Detailed information may be found on <a href=\"https://arcanis.me/projects"
|
||||||
"awesome-widgets/\">project homepage</a>"
|
"/awesome-widgets/\">project homepage</a>"
|
||||||
msgstr ""
|
msgstr "Puedes encontrar información detallada en el <a href=\"https://arcanis.me/projects/awesome-widgets/\">sitio del proyecto</a>"
|
||||||
"Puedes encontrar información detallada en el <a href=\"https://arcanis.me/"
|
|
||||||
"projects/awesome-widgets/\">sitio del proyecto</a>"
|
msgid "Bgcolor"
|
||||||
|
msgstr "Color de fondo"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "CA"
|
msgstr "CA"
|
||||||
@ -365,7 +360,7 @@ msgid "Weathers"
|
|||||||
msgstr "Tiempo"
|
msgstr "Tiempo"
|
||||||
|
|
||||||
msgid "Functions"
|
msgid "Functions"
|
||||||
msgstr ""
|
msgstr "Funciones"
|
||||||
|
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "Añadir"
|
msgstr "Añadir"
|
||||||
@ -419,7 +414,7 @@ msgid "This software uses: %1"
|
|||||||
msgstr "Este software usa: %1"
|
msgstr "Este software usa: %1"
|
||||||
|
|
||||||
msgid "Special thanks to %1"
|
msgid "Special thanks to %1"
|
||||||
msgstr ""
|
msgstr "Agradecimientos especiales a %1"
|
||||||
|
|
||||||
msgid "Select font"
|
msgid "Select font"
|
||||||
msgstr "Elegir tipo de letra"
|
msgstr "Elegir tipo de letra"
|
||||||
@ -452,7 +447,7 @@ msgid "KB/s"
|
|||||||
msgstr "KB/s"
|
msgstr "KB/s"
|
||||||
|
|
||||||
msgid "Changelog of %1"
|
msgid "Changelog of %1"
|
||||||
msgstr ""
|
msgstr "Cambios de %1"
|
||||||
|
|
||||||
msgid "You are using the actual version %1"
|
msgid "You are using the actual version %1"
|
||||||
msgstr "Estás usando al versión actual %1"
|
msgstr "Estás usando al versión actual %1"
|
||||||
@ -508,13 +503,9 @@ msgstr "Etiqueta"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
|
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
|
||||||
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
|
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
|
||||||
"text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</"
|
"text-decoration: underline; "
|
||||||
"span></a></p></body></html>"
|
"color:#0057ae;\">http://finance.yahoo.com/</span></a></p></body></html>"
|
||||||
msgstr ""
|
msgstr "<html><head/><body><p>Usa el tablero electrónico de YAHOO! para obtener la cotización del medio. Dirígete a <a href=\"http://finance.yahoo.com/\"><span style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</span></a></p></body></html>"
|
||||||
"<html><head/><body><p>Usa el tablero electrónico de YAHOO! para obtener la "
|
|
||||||
"cotización del medio. Dirígete a <a href=\"http://finance.yahoo.com/\"><span "
|
|
||||||
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
|
|
||||||
"com/</span></a></p></body></html>"
|
|
||||||
|
|
||||||
msgid "Ticker"
|
msgid "Ticker"
|
||||||
msgstr "Tablero"
|
msgstr "Tablero"
|
||||||
@ -561,48 +552,30 @@ msgstr "Marca de tiempo"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "Usar imágenes"
|
msgstr "Usar imágenes"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Formato personalizado de hora"
|
msgstr "Usar fórmula personalizada"
|
||||||
|
|
||||||
msgid "Value"
|
msgid "Value"
|
||||||
msgstr "Valor"
|
msgstr "Valor"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Max value"
|
msgid "Max value"
|
||||||
msgstr "Mostrar valor"
|
msgstr "Valor máximo"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Mostrar valor"
|
msgstr "Valor mínimo"
|
||||||
|
|
||||||
#, fuzzy
|
msgid "Active filling type"
|
||||||
msgid "Use image for active"
|
msgstr "Activar tipo de relleno"
|
||||||
msgstr "Usar imágenes"
|
|
||||||
|
|
||||||
msgid "Active color"
|
msgid "Inctive filling type"
|
||||||
msgstr "Color de activo"
|
msgstr "Inhabilitar tipo de relleno"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "Activo"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Color de inactivo"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Escritorio inactivo"
|
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Tipo"
|
msgstr "Tipo"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr "Conteo de puntos"
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Dirección"
|
msgstr "Dirección"
|
||||||
|
|
||||||
@ -612,6 +585,12 @@ msgstr "Alto"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Ancho"
|
msgstr "Ancho"
|
||||||
|
|
||||||
|
msgid "color"
|
||||||
|
msgstr "color"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr "imagen"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Escritorio activo"
|
msgstr "Escritorio activo"
|
||||||
|
|
||||||
@ -652,6 +631,3 @@ msgstr "Tu nombre"
|
|||||||
msgctxt "EMAIL OF TRANSLATORS"
|
msgctxt "EMAIL OF TRANSLATORS"
|
||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "Tu correo electrónico"
|
msgstr "Tu correo electrónico"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
|
||||||
#~ msgstr "Añadir lambda"
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-07-31 22:16+0300\n"
|
"PO-Revision-Date: 2015-07-31 22:16+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: French <kde-russian@lists.kde.ru>\n"
|
"Language-Team: French <kde-russian@lists.kde.ru>\n"
|
||||||
@ -346,6 +346,10 @@ msgstr ""
|
|||||||
"D'avantage d'informations se trouvent sur <a href=\"https://arcanis.me/"
|
"D'avantage d'informations se trouvent sur <a href=\"https://arcanis.me/"
|
||||||
"projects/awesome-widgets/\">la page du projet</a>"
|
"projects/awesome-widgets/\">la page du projet</a>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Couleur processeur"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -579,9 +583,6 @@ msgstr "Durée"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Format de l'heure personnalisé"
|
msgstr "Format de l'heure personnalisé"
|
||||||
@ -598,31 +599,20 @@ msgstr "Afficher la valeur"
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Afficher la valeur"
|
msgstr "Afficher la valeur"
|
||||||
|
|
||||||
msgid "Use image for active"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Active color"
|
msgid "Active filling type"
|
||||||
msgstr "Batterie"
|
msgstr "Batterie"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Active image"
|
msgid "Inctive filling type"
|
||||||
msgstr "Batterie"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Batterie"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Bureau inactif"
|
msgstr "Bureau inactif"
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -633,6 +623,13 @@ msgstr "léger"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "color"
|
||||||
|
msgstr "Couleur processeur"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Bureau actif"
|
msgstr "Bureau actif"
|
||||||
|
|
||||||
@ -674,6 +671,14 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "esalexeev@gmail.com mermouy@gmail.com"
|
msgstr "esalexeev@gmail.com mermouy@gmail.com"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Batterie"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Batterie"
|
||||||
|
|
||||||
#~ msgid "Free space on %1 less than 10%"
|
#~ msgid "Free space on %1 less than 10%"
|
||||||
#~ msgstr "Espace libre sur %1 inférieur à 10%"
|
#~ msgstr "Espace libre sur %1 inférieur à 10%"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Awesome widgets\n"
|
"Project-Id-Version: Awesome widgets\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-08-20 22:52+0300\n"
|
"PO-Revision-Date: 2015-08-20 22:52+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: Dutch <kde-i18n-nl@kde.org>\n"
|
"Language-Team: Dutch <kde-i18n-nl@kde.org>\n"
|
||||||
@ -350,6 +350,10 @@ msgstr ""
|
|||||||
"Gedetailleerde informatie kan worden gevonden op de <a href=\"http://arcanis."
|
"Gedetailleerde informatie kan worden gevonden op de <a href=\"http://arcanis."
|
||||||
"name/projects/awesome-widgets/\">projectwebsite</a>"
|
"name/projects/awesome-widgets/\">projectwebsite</a>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "CPU-kleur"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -579,9 +583,6 @@ msgstr ""
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Aangepaste tijdsopmaak"
|
msgstr "Aangepaste tijdsopmaak"
|
||||||
@ -597,29 +598,20 @@ msgstr "Waarde weergeven"
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Waarde weergeven"
|
msgstr "Waarde weergeven"
|
||||||
|
|
||||||
msgid "Use image for active"
|
#, fuzzy
|
||||||
msgstr ""
|
msgid "Active filling type"
|
||||||
|
|
||||||
msgid "Active color"
|
|
||||||
msgstr "Actieve kleur"
|
msgstr "Actieve kleur"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Active image"
|
msgid "Inctive filling type"
|
||||||
msgstr "Actieve kleur"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Inactieve kleur"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Inactieve kleur"
|
msgstr "Inactieve kleur"
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Type"
|
msgstr "Type"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Richting"
|
msgstr "Richting"
|
||||||
|
|
||||||
@ -629,6 +621,13 @@ msgstr "Hoogte"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Breedte"
|
msgstr "Breedte"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "color"
|
||||||
|
msgstr "CPU-kleur"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Actieve kleur"
|
msgstr "Actieve kleur"
|
||||||
@ -673,6 +672,12 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "vistausss@outlook.com"
|
msgstr "vistausss@outlook.com"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Actieve kleur"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Inactieve kleur"
|
||||||
|
|
||||||
#~ msgid "Free space on %1 less than 10%"
|
#~ msgid "Free space on %1 less than 10%"
|
||||||
#~ msgstr "De vrije ruimte op %1 is minder dan 10%"
|
#~ msgstr "De vrije ruimte op %1 is minder dan 10%"
|
||||||
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -335,6 +335,10 @@ msgstr ""
|
|||||||
"Szczegóły znajdziesz na <a href=\"http://arcanis.name/projects/awesome-"
|
"Szczegóły znajdziesz na <a href=\"http://arcanis.name/projects/awesome-"
|
||||||
"widgets/\">stronie projektu</a>"
|
"widgets/\">stronie projektu</a>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Kolor procesora"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "Zasialnie zewnętrzne"
|
msgstr "Zasialnie zewnętrzne"
|
||||||
|
|
||||||
@ -555,9 +559,6 @@ msgstr "Znacznik czasu"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "Użyj obrazków"
|
msgstr "Użyj obrazków"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Twój format czasu"
|
msgstr "Twój format czasu"
|
||||||
@ -574,29 +575,19 @@ msgid "Min value"
|
|||||||
msgstr "Pokaż wartość"
|
msgstr "Pokaż wartość"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use image for active"
|
msgid "Active filling type"
|
||||||
msgstr "Użyj obrazków"
|
|
||||||
|
|
||||||
msgid "Active color"
|
|
||||||
msgstr "Kolor aktywnego"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "Aktywny"
|
msgstr "Aktywny"
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Kolor nieaktywnego"
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Inactive image"
|
msgid "Inctive filling type"
|
||||||
msgstr "Nie aktywny pulpit"
|
msgstr "Nie aktywny pulpit"
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Typ"
|
msgstr "Typ"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Kierunek"
|
msgstr "Kierunek"
|
||||||
|
|
||||||
@ -606,6 +597,14 @@ msgstr "Wysokość"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Szerokość"
|
msgstr "Szerokość"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "color"
|
||||||
|
msgstr "Kolor procesora"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "image"
|
||||||
|
msgstr "Użyj obrazków"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "AKtywny pulpit"
|
msgstr "AKtywny pulpit"
|
||||||
|
|
||||||
@ -647,5 +646,15 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "terminus@linux.pl"
|
msgstr "terminus@linux.pl"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Use image for active"
|
||||||
|
#~ msgstr "Użyj obrazków"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Kolor aktywnego"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Kolor nieaktywnego"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
#~ msgid "Add lambda"
|
||||||
#~ msgstr "Dodaj różnicę"
|
#~ msgstr "Dodaj różnicę"
|
||||||
|
@ -6,7 +6,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-07-31 22:21+0300\n"
|
"PO-Revision-Date: 2015-07-31 22:21+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
||||||
@ -347,6 +347,10 @@ msgstr ""
|
|||||||
"Informações detalhadas podem ser encontradas na <a href=\"http://arcanis."
|
"Informações detalhadas podem ser encontradas na <a href=\"http://arcanis."
|
||||||
"name/projects/awesome-widgets/\">página do projeto</a>"
|
"name/projects/awesome-widgets/\">página do projeto</a>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Cor da CPU"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -570,9 +574,6 @@ msgstr "Hora"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Formato de hora personalizado"
|
msgstr "Formato de hora personalizado"
|
||||||
@ -588,29 +589,20 @@ msgstr "Mostrar valor"
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Mostrar valor"
|
msgstr "Mostrar valor"
|
||||||
|
|
||||||
msgid "Use image for active"
|
#, fuzzy
|
||||||
msgstr ""
|
msgid "Active filling type"
|
||||||
|
|
||||||
msgid "Active color"
|
|
||||||
msgstr "Cor ativa"
|
msgstr "Cor ativa"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Active image"
|
msgid "Inctive filling type"
|
||||||
msgstr "Cor ativa"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Cor inativa"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Desktop inativo"
|
msgstr "Desktop inativo"
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Tipo"
|
msgstr "Tipo"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Direção"
|
msgstr "Direção"
|
||||||
|
|
||||||
@ -620,6 +612,13 @@ msgstr "Altura"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Largura"
|
msgstr "Largura"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "color"
|
||||||
|
msgstr "Cor da CPU"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Desktop ativo"
|
msgstr "Desktop ativo"
|
||||||
|
|
||||||
@ -661,6 +660,12 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "under@insicuri.net"
|
msgstr "under@insicuri.net"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Cor ativa"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Cor inativa"
|
||||||
|
|
||||||
#~ msgid "Free space on %1 less than 10%"
|
#~ msgid "Free space on %1 less than 10%"
|
||||||
#~ msgstr "O espaço livre em %1 é menor que 10%"
|
#~ msgstr "O espaço livre em %1 é menor que 10%"
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2016-04-06 14:41+0300\n"
|
"PO-Revision-Date: 2016-04-29 12:22+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
||||||
"Language: ru\n"
|
"Language: ru\n"
|
||||||
@ -335,6 +335,9 @@ msgstr ""
|
|||||||
"Подробная информация может быть найдена на <a href=\"https://arcanis.me/ru/"
|
"Подробная информация может быть найдена на <a href=\"https://arcanis.me/ru/"
|
||||||
"projects/awesome-widgets/\">домашней странице проекта</a>"
|
"projects/awesome-widgets/\">домашней странице проекта</a>"
|
||||||
|
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Цвет фона"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "Адаптор питания"
|
msgstr "Адаптор питания"
|
||||||
|
|
||||||
@ -556,9 +559,6 @@ msgstr "Таймштамп"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "Использовать изображения"
|
msgstr "Использовать изображения"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr "Количество точек"
|
|
||||||
|
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Использовать свою формулу"
|
msgstr "Использовать свою формулу"
|
||||||
|
|
||||||
@ -571,27 +571,18 @@ msgstr "Максимальное значение"
|
|||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Минимальное значение"
|
msgstr "Минимальное значение"
|
||||||
|
|
||||||
msgid "Use image for active"
|
msgid "Active filling type"
|
||||||
msgstr "Использовать изображения для активной части"
|
msgstr "Тип активного наполнения"
|
||||||
|
|
||||||
msgid "Active color"
|
msgid "Inctive filling type"
|
||||||
msgstr "Активный цвет"
|
msgstr "Тип неактивного наполнения"
|
||||||
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "Изображение активной части"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr "Использовать изображение для неактивной части"
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Неактивный цвет"
|
|
||||||
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Изображение неактивной части"
|
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Тип"
|
msgstr "Тип"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr "Количество точек"
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Направление"
|
msgstr "Направление"
|
||||||
|
|
||||||
@ -601,6 +592,12 @@ msgstr "Высота"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Ширина"
|
msgstr "Ширина"
|
||||||
|
|
||||||
|
msgid "color"
|
||||||
|
msgstr "цвет"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr "изображение"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Активный рабочий стол"
|
msgstr "Активный рабочий стол"
|
||||||
|
|
||||||
@ -642,6 +639,18 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "esalexeev@gmail.com"
|
msgstr "esalexeev@gmail.com"
|
||||||
|
|
||||||
|
#~ msgid "Use image for active"
|
||||||
|
#~ msgstr "Использовать изображения для активной части"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Активный цвет"
|
||||||
|
|
||||||
|
#~ msgid "Use image for inactive"
|
||||||
|
#~ msgstr "Использовать изображение для неактивной части"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Неактивный цвет"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
#~ msgid "Add lambda"
|
||||||
#~ msgstr "Добавить лямбду"
|
#~ msgstr "Добавить лямбду"
|
||||||
|
|
||||||
|
@ -6,17 +6,17 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-09-27 12:37+0300\n"
|
"PO-Revision-Date: 2016-05-05 17:18+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
|
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
|
||||||
"Language: ua\n"
|
"Language: uk\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||||
"X-Generator: Lokalize 2.0\n"
|
"X-Generator: Poedit 1.8.7.1\n"
|
||||||
|
|
||||||
msgid "Widget"
|
msgid "Widget"
|
||||||
msgstr "Віджет"
|
msgstr "Віджет"
|
||||||
@ -42,7 +42,6 @@ msgstr "Подяка"
|
|||||||
msgid "Enable background"
|
msgid "Enable background"
|
||||||
msgstr "Включити фон"
|
msgstr "Включити фон"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Translate strings"
|
msgid "Translate strings"
|
||||||
msgstr "Перекладати рядки"
|
msgstr "Перекладати рядки"
|
||||||
|
|
||||||
@ -55,12 +54,11 @@ msgstr "Включити перенос слів"
|
|||||||
msgid "Enable notifications"
|
msgid "Enable notifications"
|
||||||
msgstr "Включити повідомлення"
|
msgstr "Включити повідомлення"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Check updates on startup"
|
msgid "Check updates on startup"
|
||||||
msgstr "Перевіряти оновлення при запуску"
|
msgstr "Перевіряти оновлення при запуску"
|
||||||
|
|
||||||
msgid "Optimize subscription"
|
msgid "Optimize subscription"
|
||||||
msgstr ""
|
msgstr "Оптимізувати підписку"
|
||||||
|
|
||||||
msgid "Widget height, px"
|
msgid "Widget height, px"
|
||||||
msgstr "Висота віджету, пікселі"
|
msgstr "Висота віджету, пікселі"
|
||||||
@ -113,43 +111,38 @@ msgstr "AC відключений"
|
|||||||
msgid "Drop key cache"
|
msgid "Drop key cache"
|
||||||
msgstr "Скинути кеш ключів"
|
msgstr "Скинути кеш ключів"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Export configuration"
|
msgid "Export configuration"
|
||||||
msgstr "Налаштування"
|
msgstr "Експорт налаштувань"
|
||||||
|
|
||||||
msgid "Export"
|
msgid "Export"
|
||||||
msgstr ""
|
msgstr "Експорт"
|
||||||
|
|
||||||
msgid "Success"
|
msgid "Success"
|
||||||
msgstr ""
|
msgstr "Успішно"
|
||||||
|
|
||||||
msgid "Please note that binary files were not copied"
|
msgid "Please note that binary files were not copied"
|
||||||
msgstr ""
|
msgstr "Будь ласка, зверніть увагу, що бінарні файли не були скопійовані"
|
||||||
|
|
||||||
msgid "Ooops..."
|
msgid "Ooops..."
|
||||||
msgstr ""
|
msgstr "Ууупс..."
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Could not save configuration file"
|
msgid "Could not save configuration file"
|
||||||
msgstr "Налаштування"
|
msgstr "Не можу зберегти файл налаштувань"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Import configuration"
|
msgid "Import configuration"
|
||||||
msgstr "Налаштування"
|
msgstr "Імпорт налаштувань"
|
||||||
|
|
||||||
msgid "Import"
|
msgid "Import"
|
||||||
msgstr ""
|
msgstr "Імпорт"
|
||||||
|
|
||||||
msgid "Import plasmoid settings"
|
msgid "Import plasmoid settings"
|
||||||
msgstr ""
|
msgstr "Імпорт налаштувань плазмоїда"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Import extensions"
|
msgid "Import extensions"
|
||||||
msgstr "Розширення"
|
msgstr "Імпорт розширень"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Import additional files"
|
msgid "Import additional files"
|
||||||
msgstr "Додаткові фільтри"
|
msgstr "Імпорт додаткових файлів"
|
||||||
|
|
||||||
msgid "Font"
|
msgid "Font"
|
||||||
msgstr "Шрифт"
|
msgstr "Шрифт"
|
||||||
@ -190,9 +183,8 @@ msgstr "Оберіть колір"
|
|||||||
msgid "Select a font"
|
msgid "Select a font"
|
||||||
msgstr "Оберіть шрифт"
|
msgstr "Оберіть шрифт"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "ACPI"
|
msgid "ACPI"
|
||||||
msgstr "Шлях до ACPI"
|
msgstr "ACPI"
|
||||||
|
|
||||||
msgid "ACPI path"
|
msgid "ACPI path"
|
||||||
msgstr "Шлях до ACPI"
|
msgstr "Шлях до ACPI"
|
||||||
@ -203,7 +195,6 @@ msgstr "GPU"
|
|||||||
msgid "GPU device"
|
msgid "GPU device"
|
||||||
msgstr "Пристій GPU"
|
msgstr "Пристій GPU"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "HDD temperature"
|
msgid "HDD temperature"
|
||||||
msgstr "Температура HDD"
|
msgstr "Температура HDD"
|
||||||
|
|
||||||
@ -255,7 +246,6 @@ msgstr "Редагувати команду"
|
|||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "Погода"
|
msgstr "Погода"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Edit weather"
|
msgid "Edit weather"
|
||||||
msgstr "Редагувати погоду"
|
msgstr "Редагувати погоду"
|
||||||
|
|
||||||
@ -280,14 +270,13 @@ msgstr "Показати README"
|
|||||||
msgid "Check updates"
|
msgid "Check updates"
|
||||||
msgstr "Шукати оновлення"
|
msgstr "Шукати оновлення"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
|
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
|
||||||
"To enable them just make needed checkbox checked."
|
"To enable them just make needed checkbox checked."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" "
|
"Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" "
|
||||||
"підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні "
|
"підтримують графічні підказки. Щоб їх задіяти, просто виділіть необхідні "
|
||||||
"чекбокси повністю чекнутими."
|
"чекбокси."
|
||||||
|
|
||||||
msgid "Number of values for tooltips"
|
msgid "Number of values for tooltips"
|
||||||
msgstr "Кількість значень для підказки"
|
msgstr "Кількість значень для підказки"
|
||||||
@ -295,7 +284,6 @@ msgstr "Кількість значень для підказки"
|
|||||||
msgid "Background"
|
msgid "Background"
|
||||||
msgstr "Фон"
|
msgstr "Фон"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Background color"
|
msgid "Background color"
|
||||||
msgstr "Колір фону"
|
msgstr "Колір фону"
|
||||||
|
|
||||||
@ -305,7 +293,6 @@ msgstr "CPU"
|
|||||||
msgid "CPU color"
|
msgid "CPU color"
|
||||||
msgstr "Колір CPU"
|
msgstr "Колір CPU"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "CPU clock"
|
msgid "CPU clock"
|
||||||
msgstr "Частота CPU"
|
msgstr "Частота CPU"
|
||||||
|
|
||||||
@ -349,6 +336,9 @@ msgstr ""
|
|||||||
"Детальна інформація може бути знайдена на <a href=\"https://arcanis.me/"
|
"Детальна інформація може бути знайдена на <a href=\"https://arcanis.me/"
|
||||||
"projects/awesome-widgets/\">домашній сторінці проекту</a>"
|
"projects/awesome-widgets/\">домашній сторінці проекту</a>"
|
||||||
|
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "Колір фону"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "Адаптер живлення"
|
msgstr "Адаптер живлення"
|
||||||
|
|
||||||
@ -358,27 +348,23 @@ msgstr "Бари"
|
|||||||
msgid "Desktops"
|
msgid "Desktops"
|
||||||
msgstr "Робочі столи"
|
msgstr "Робочі столи"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Scripts"
|
msgid "Scripts"
|
||||||
msgstr "Скрипти"
|
msgstr "Скрипти"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Time"
|
msgid "Time"
|
||||||
msgstr "Час"
|
msgstr "Час"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Quotes"
|
msgid "Quotes"
|
||||||
msgstr "Котирування"
|
msgstr "Котирування"
|
||||||
|
|
||||||
msgid "Upgrades"
|
msgid "Upgrades"
|
||||||
msgstr "Оновлення"
|
msgstr "Оновлення"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Weathers"
|
msgid "Weathers"
|
||||||
msgstr "Погода"
|
msgstr "Погода"
|
||||||
|
|
||||||
msgid "Functions"
|
msgid "Functions"
|
||||||
msgstr ""
|
msgstr "Функції"
|
||||||
|
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "Додати"
|
msgstr "Додати"
|
||||||
@ -432,7 +418,7 @@ msgid "This software uses: %1"
|
|||||||
msgstr "Ця програма використовує: %1"
|
msgstr "Ця програма використовує: %1"
|
||||||
|
|
||||||
msgid "Special thanks to %1"
|
msgid "Special thanks to %1"
|
||||||
msgstr ""
|
msgstr "Особлива подяка %1"
|
||||||
|
|
||||||
msgid "Select font"
|
msgid "Select font"
|
||||||
msgstr "Оберіть шрифт"
|
msgstr "Оберіть шрифт"
|
||||||
@ -465,12 +451,11 @@ msgid "KB/s"
|
|||||||
msgstr "КБ/с"
|
msgstr "КБ/с"
|
||||||
|
|
||||||
msgid "Changelog of %1"
|
msgid "Changelog of %1"
|
||||||
msgstr ""
|
msgstr "Список змін %1"
|
||||||
|
|
||||||
msgid "You are using the actual version %1"
|
msgid "You are using the actual version %1"
|
||||||
msgstr "Ви використовуєте актуальну версію %1"
|
msgstr "Ви використовуєте актуальну версію %1"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "No new version found"
|
msgid "No new version found"
|
||||||
msgstr "Оновлень не знайдено"
|
msgstr "Оновлень не знайдено"
|
||||||
|
|
||||||
@ -507,7 +492,6 @@ msgstr "Ім’я: %1"
|
|||||||
msgid "Comment: %1"
|
msgid "Comment: %1"
|
||||||
msgstr "Коментар: %1"
|
msgstr "Коментар: %1"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Identity: %1"
|
msgid "Identity: %1"
|
||||||
msgstr "Ідентифікатор: %1"
|
msgstr "Ідентифікатор: %1"
|
||||||
|
|
||||||
@ -531,19 +515,15 @@ msgstr ""
|
|||||||
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
|
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
|
||||||
"com/</span></a></p></body></html>"
|
"com/</span></a></p></body></html>"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Ticker"
|
msgid "Ticker"
|
||||||
msgstr "Тікер: %1"
|
msgstr "Тікер"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Active"
|
msgid "Active"
|
||||||
msgstr "Активний"
|
msgstr "Активний"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Interval"
|
msgid "Interval"
|
||||||
msgstr "Інтервал"
|
msgstr "Інтервал"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Command"
|
msgid "Command"
|
||||||
msgstr "Команда"
|
msgstr "Команда"
|
||||||
|
|
||||||
@ -556,7 +536,6 @@ msgstr "Перенаправлення"
|
|||||||
msgid "Additional filters"
|
msgid "Additional filters"
|
||||||
msgstr "Додаткові фільтри"
|
msgstr "Додаткові фільтри"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Wrap colors"
|
msgid "Wrap colors"
|
||||||
msgstr "Обробити кольори"
|
msgstr "Обробити кольори"
|
||||||
|
|
||||||
@ -575,57 +554,36 @@ msgstr "Місто"
|
|||||||
msgid "Country"
|
msgid "Country"
|
||||||
msgstr "Країна"
|
msgstr "Країна"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Timestamp"
|
msgid "Timestamp"
|
||||||
msgstr "Відмітка часу"
|
msgstr "Відмітка часу"
|
||||||
|
|
||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "Використовувати зображення"
|
msgstr "Використовувати зображення"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "Свій формат часу"
|
msgstr "Використовувати свою формулу"
|
||||||
|
|
||||||
msgid "Value"
|
msgid "Value"
|
||||||
msgstr "Значення"
|
msgstr "Значення"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Max value"
|
msgid "Max value"
|
||||||
msgstr "Показати значення"
|
msgstr "Максимальне значення"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Min value"
|
msgid "Min value"
|
||||||
msgstr "Показати значення"
|
msgstr "Мінімальне значення"
|
||||||
|
|
||||||
#, fuzzy
|
msgid "Active filling type"
|
||||||
msgid "Use image for active"
|
msgstr "Тип активного заповнення"
|
||||||
msgstr "Використовувати зображення"
|
|
||||||
|
|
||||||
#, fuzzy
|
msgid "Inctive filling type"
|
||||||
msgid "Active color"
|
msgstr "Тип неактивного заповнення"
|
||||||
msgstr "Активний колір"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "Активний"
|
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "Неактивний колір"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Inactive image"
|
|
||||||
msgstr "Неактивний робочий стіл"
|
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Тип"
|
msgstr "Тип"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr "Кількість точок"
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "Напрямок"
|
msgstr "Напрямок"
|
||||||
|
|
||||||
@ -635,6 +593,12 @@ msgstr "Висота"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "Ширина"
|
msgstr "Ширина"
|
||||||
|
|
||||||
|
msgid "color"
|
||||||
|
msgstr "колір"
|
||||||
|
|
||||||
|
msgid "image"
|
||||||
|
msgstr "зображення"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "Активний робочий стіл"
|
msgstr "Активний робочий стіл"
|
||||||
|
|
||||||
@ -676,6 +640,18 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "sarumyan@i.ua"
|
msgstr "sarumyan@i.ua"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Use image for active"
|
||||||
|
#~ msgstr "Використовувати зображення"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "Активний колір"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "Неактивний колір"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
#~ msgid "Add lambda"
|
||||||
#~ msgstr "Додати лямбду"
|
#~ msgstr "Додати лямбду"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
|
||||||
"POT-Creation-Date: 2016-04-06 14:39+0300\n"
|
"POT-Creation-Date: 2016-04-29 12:21+0300\n"
|
||||||
"PO-Revision-Date: 2015-07-31 22:24+0300\n"
|
"PO-Revision-Date: 2015-07-31 22:24+0300\n"
|
||||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||||
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
|
||||||
@ -336,6 +336,10 @@ msgstr ""
|
|||||||
"详情请参照 <a href=\"http://arcanis.name/projects/ awesome-widgets/\">项目主"
|
"详情请参照 <a href=\"http://arcanis.name/projects/ awesome-widgets/\">项目主"
|
||||||
"页</a>"
|
"页</a>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Bgcolor"
|
||||||
|
msgstr "CPU 颜色"
|
||||||
|
|
||||||
msgid "AC"
|
msgid "AC"
|
||||||
msgstr "电源"
|
msgstr "电源"
|
||||||
|
|
||||||
@ -557,9 +561,6 @@ msgstr "时间"
|
|||||||
msgid "Use images"
|
msgid "Use images"
|
||||||
msgstr "使用图片"
|
msgstr "使用图片"
|
||||||
|
|
||||||
msgid "Points count"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use custom formula"
|
msgid "Use custom formula"
|
||||||
msgstr "自定义时间格式"
|
msgstr "自定义时间格式"
|
||||||
@ -576,29 +577,19 @@ msgid "Min value"
|
|||||||
msgstr "显示值"
|
msgstr "显示值"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Use image for active"
|
msgid "Active filling type"
|
||||||
msgstr "使用图片"
|
|
||||||
|
|
||||||
msgid "Active color"
|
|
||||||
msgstr "使用状态提示颜色"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Active image"
|
|
||||||
msgstr "使用"
|
msgstr "使用"
|
||||||
|
|
||||||
msgid "Use image for inactive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Inactive color"
|
|
||||||
msgstr "未使用状态提示颜色"
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Inactive image"
|
msgid "Inctive filling type"
|
||||||
msgstr "未激活桌面"
|
msgstr "未激活桌面"
|
||||||
|
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "类型"
|
msgstr "类型"
|
||||||
|
|
||||||
|
msgid "Points count"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr "方向"
|
msgstr "方向"
|
||||||
|
|
||||||
@ -608,6 +599,14 @@ msgstr "高度"
|
|||||||
msgid "Width"
|
msgid "Width"
|
||||||
msgstr "宽度"
|
msgstr "宽度"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "color"
|
||||||
|
msgstr "CPU 颜色"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "image"
|
||||||
|
msgstr "使用图片"
|
||||||
|
|
||||||
msgid "Active desktop"
|
msgid "Active desktop"
|
||||||
msgstr "当前激活桌面"
|
msgstr "当前激活桌面"
|
||||||
|
|
||||||
@ -649,6 +648,16 @@ msgctxt "EMAIL OF TRANSLATORS"
|
|||||||
msgid "Your emails"
|
msgid "Your emails"
|
||||||
msgstr "用户邮箱"
|
msgstr "用户邮箱"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Use image for active"
|
||||||
|
#~ msgstr "使用图片"
|
||||||
|
|
||||||
|
#~ msgid "Active color"
|
||||||
|
#~ msgstr "使用状态提示颜色"
|
||||||
|
|
||||||
|
#~ msgid "Inactive color"
|
||||||
|
#~ msgstr "未使用状态提示颜色"
|
||||||
|
|
||||||
#~ msgid "Add lambda"
|
#~ msgid "Add lambda"
|
||||||
#~ msgstr "添加 lambda"
|
#~ msgstr "添加 lambda"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define TRANSLATORS \
|
#define TRANSLATORS \
|
||||||
"Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian " \
|
"Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian " \
|
||||||
"Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese), Heimen " \
|
"Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese), Heimen " \
|
||||||
"Stoffels (Dutch)"
|
"Stoffels (Dutch), Mariusz Kocoń (Polish)"
|
||||||
#define EMAIL "@PROJECT_CONTACT@"
|
#define EMAIL "@PROJECT_CONTACT@"
|
||||||
#define LICENSE "@PROJECT_LICENSE@"
|
#define LICENSE "@PROJECT_LICENSE@"
|
||||||
#define TRDPARTY_LICENSE \
|
#define TRDPARTY_LICENSE \
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
// configuraion
|
// configuraion
|
||||||
// graphical items api version
|
// graphical items api version
|
||||||
#define AWGIAPI 4
|
#define AWGIAPI 5
|
||||||
// extquotes api version
|
// extquotes api version
|
||||||
#define AWEQAPI 3
|
#define AWEQAPI 3
|
||||||
// extscript api version
|
// extscript api version
|
||||||
@ -40,12 +40,13 @@
|
|||||||
"dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A"
|
"dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A"
|
||||||
// static keys
|
// static keys
|
||||||
#define STATIC_KEYS \
|
#define STATIC_KEYS \
|
||||||
"time,isotime,shorttime,longtime,ctime,uptime,cuptime,cpucl,cpu,gputemp," \
|
"time,isotime,shorttime,longtime,tstime,ctime,uptime,cuptime,cpucl,cpu," \
|
||||||
"gpu,memmb,memgb,memfreemb,memfreegb,memtotmb,memtotgb,memusedmb," \
|
"gputemp,gpu,memmb,memgb,memfreemb,memfreegb,memtotmb,memtotgb,memusedmb," \
|
||||||
"memusedgb,mem,swapmb,swapgb,swapfreemb,swapfreegb,swaptotmb,swaptotgb," \
|
"memusedgb,mem,swapmb,swapgb,swapfreemb,swapfreegb,swaptotmb,swaptotgb," \
|
||||||
"swap,downunits,upunits,downkb,down,upkb,up,netdev,ac,bat,album,artist," \
|
"swap,downunits,upunits,downkb,downtotalkb,downtotal,down,uptotalkb," \
|
||||||
"duration,progress,title,dalbum,dartist,dtitle,salbum,sartist,stitle," \
|
"uptotal,upkb,up,netdev,ac,bat,album,artist,duration,progress,title," \
|
||||||
"pscount,pstotal,ps,desktop,ndesktop,tdesktops,la15,la5,la1"
|
"dalbum,dartist,dtitle,salbum,sartist,stitle,pscount,pstotal,ps,desktop," \
|
||||||
|
"ndesktop,tdesktops,la15,la5,la1"
|
||||||
#cmakedefine BUILD_FUTURE
|
#cmakedefine BUILD_FUTURE
|
||||||
#cmakedefine BUILD_TESTING
|
#cmakedefine BUILD_TESTING
|
||||||
|
|
||||||
@ -77,10 +78,16 @@
|
|||||||
#define CMAKE_MODULE_LINKER_FLAGS "@CMAKE_MODULE_LINKER_FLAGS@"
|
#define CMAKE_MODULE_LINKER_FLAGS "@CMAKE_MODULE_LINKER_FLAGS@"
|
||||||
#define CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@"
|
#define CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@"
|
||||||
// components
|
// components
|
||||||
|
#define BUILD_COVERAGE "@BUILD_COVERAGE@"
|
||||||
#define BUILD_PLASMOIDS "@BUILD_PLASMOIDS@"
|
#define BUILD_PLASMOIDS "@BUILD_PLASMOIDS@"
|
||||||
#define BUILD_DEB_PACKAGE "@BUILD_DEB_PACKAGE@"
|
#define BUILD_DEB_PACKAGE "@BUILD_DEB_PACKAGE@"
|
||||||
#define BUILD_RPM_PACKAGE "@BUILD_RPM_PACKAGE@"
|
#define BUILD_RPM_PACKAGE "@BUILD_RPM_PACKAGE@"
|
||||||
#define CLANGFORMAT_EXECUTABLE "@CLANGFORMAT_EXECUTABLE@"
|
#define CLANGFORMAT_EXECUTABLE "@CLANGFORMAT_EXECUTABLE@"
|
||||||
|
#define COVERITY_COMMENT "@COVERITY_COMMENT@"
|
||||||
|
#define COVERITY_DIRECTORY "@COVERITY_DIRECTORY@"
|
||||||
|
#define COVERITY_EMAIL "@COVERITY_EMAIL@"
|
||||||
|
#define COVERITY_EXECUTABLE "@COVERITY_EXECUTABLE@"
|
||||||
|
#define COVERITY_URL "@COVERITY_URL@"
|
||||||
#define CPPCHECK_EXECUTABLE "@CPPCHECK_EXECUTABLE@"
|
#define CPPCHECK_EXECUTABLE "@CPPCHECK_EXECUTABLE@"
|
||||||
// additional functions
|
// additional functions
|
||||||
#define PROP_FUTURE "@BUILD_FUTURE@"
|
#define PROP_FUTURE "@BUILD_FUTURE@"
|
||||||
|
Reference in New Issue
Block a user