Commit graph

182 commits

Author SHA1 Message Date
Ivailo Monev
213163aa45 kdeui: simplify highlighter management of KTextEdit
instead of virtual method for creating one and a setter now there is only
a setter with ownership of the highlighter belonging to the parent (the
case for the default-created highlighter) or caller of
KTextEdit::setHighlighter()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 12:04:44 +03:00
Ivailo Monev
e774460cf3 kdeui: do not create KTextEdit spell checker based on focus and setup its language in all cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 18:29:44 +03:00
Ivailo Monev
d54681d5d2 kdeui: remove now unused internal NestedListHelper class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 12:00:51 +03:00
Ivailo Monev
259cf0c497 kdeui: minor KTextEdit painting optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 10:02:21 +03:00
Ivailo Monev
ba8ffa064b kdeui: remove redundant private KTextEdit methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 22:33:14 +03:00
Ivailo Monev
0cfa9cb2f3 kdeui: remove unused private KTextEdit methods and members
also initialized all members while at it, some could be used uninitialized

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 22:27:55 +03:00
Ivailo Monev
afd9c69c7b kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 22:21:26 +03:00
Ivailo Monev
4f55f6b021 kdeui: drop bogus WheelMouseZooms config option
no GUI interface to control that, kate also zooms (increases or decreases
the font size) with control modifier. for fast scrolling the shift modifier
is checked for by kate

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 21:49:09 +03:00
Ivailo Monev
3d311955ab kdeui: drop KRichTextEdit and KRichTextWidget
because KTextEdit inherits QTextEdit it is rich text-capable and the
actions that KRichTextEdit and KRichTextWidget provide are not used
anywhere (the actions require explicit setup)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 21:01:01 +03:00
Ivailo Monev
e6ae50ba6a kdeui: drop KTimeZoneWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 09:37:23 +03:00
Ivailo Monev
2916de09fb kdecore: rework time zones translation
there were some stale zone name comments marked for translation, the
scopping script (probably purposely) did not remove such

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-05 19:00:37 +03:00
Ivailo Monev
8fd775d217 kdeui: KTabWidget documentation update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-05 13:46:44 +03:00
Ivailo Monev
f7b6b9645f kdeui: remove bogus reimplementation
QPushButton::setText() is not even virtual method..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-05 13:11:09 +03:00
Ivailo Monev
f6661c5106 kdeui: remove combat bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-05 13:04:12 +03:00
Ivailo Monev
72daced852 kdeui: replace KColorDialog with QColorDialog
same reason as KFontDialog

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-03 10:44:38 +03:00
Ivailo Monev
8af06be32c kdeui: reject invalid minimum/maximum time from KTimeEdit setters
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-02 17:40:04 +03:00
Ivailo Monev
b92f3b6191 kdeui: handle arrows state and bound the input in KTimeEdit
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-02 17:35:20 +03:00
Ivailo Monev
49378a1e75 kdeui: remove now redundant hack
see the following commit in the Katie repo:
9a8258aed315cfc9eb50a903ecf997ce8f10a87c

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-31 14:26:35 +03:00
Ivailo Monev
75b9cfddd3 generic: const-ify private data pointers where copying is disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:49:59 +02:00
Ivailo Monev
836da4c2ce kdeui: de-duplicate code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 01:58:02 +02:00
Ivailo Monev
e11e2b0137 kdeui: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-23 11:35:20 +03:00
Ivailo Monev
fbfb374b9c generic: drop scripting and tray support
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:06:58 +03:00
Ivailo Monev
0296d36fec kdeui: do not store the URLs list in temporary in kCheckMimeData() and KPixmapWidget::dropEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 22:42:37 +03:00
Ivailo Monev
fadcacb651 kdeui: const-ify the KPixmapWidget::setAlignment() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 20:52:45 +03:00
Ivailo Monev
88598523d0 kdeui: new KPixmapWidget
the idea for QImage/QPixmap-optimized widget occurred to me while
writing kimageviewer (see the kde-playground repo), unlike the widget I
wrote for kimageviewer this one supports drag-n-drop tho and is drop-in
replacement for QLabel when showing only a pixmap is required. the
widget also shows a small image while dragging ala ksnapshot

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 08:59:51 +03:00
Ivailo Monev
e6ef3d422f kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 21:38:59 +03:00
Ivailo Monev
2bf47096e8 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 07:08:35 +03:00
Ivailo Monev
450120097d kdeui: reimplement KNotification
cleaning up the mess, everything but KNotificationConfigWidget is
implemented.

not only does it not require additional D-Bus service (knotify) to
function but also does not transmit pixmaps over D-Bus, the features
to execute command or log to file are dropped and will not be
implemented.

also about markup support in notifications - if the server does not
support markup then it is supposed to strip it, see the spec:
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#backwards-compat
meaning nothing should be done by KNotification itself because it is not
a server, it is just a proxy.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 09:01:39 +03:00
Ivailo Monev
4b632fcae6 kdeui: implement status notifier for any KApplication instance
optional feature that requires "-tray" command line argument and replaces
what the `ksystraycmd` program was doing. requires "X-KDE-SysTray" entry
in the desktop file as indicator that the application supports "-tray"
argument, unlike `ksystraycmd` does not spawn extra process and even
session management will work properly for it (the argument is manually
added to the restart command)

the feature is very much tide to KMainWindow (and derived classes) but the
overhead is next to none when the "-tray" argument is not specified (the
status notifier is not created in such case) however if created an
expensive tooltip update is done whenever a window changes (may have to
look into optimizing it but then again - most of the code does nothing
unless the "-tray" argument is specified)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 01:41:02 +03:00
Ivailo Monev
24f8640acd kdeui: simplify KGlobaSettings and do not setup mouse from it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 23:32:43 +07:00
Ivailo Monev
336d708b45 kdeui: remove KLineEdit TODO
done via 5333e9917d

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 12:06:44 +03:00
Ivailo Monev
f197e144ca kdeui: drop support for setting custom pixmap for KRatingPainter
KRatingPainter and KRatingWidget are currently not used but holding a
reference to a pixmap that can already be (and is) obtained from the icon
(constructing QIcon from pixmap is a thing) is just redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 14:57:01 +03:00
Ivailo Monev
300da74a3f kdeui: drop support for restoring more than one KMainWindow-dervice classes
unused feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 12:12:59 +03:00
Ivailo Monev
bd063c8b56 generic: remove dead and irrelevant links references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 14:26:19 +03:00
Ivailo Monev
be9d8967f7 kdeui: remove redundant KGlobalSettings::desktopGeometry() methods
QDesktopWidget is Xinerama aware and it can be disabled because I
implemented option for that, see the following commit in the Katie repo:
b7e4bae65f0cae7f3029b98980f638c077ecfc22

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 03:58:14 +03:00
Ivailo Monev
9642bc3d81 kdeui: handle zero time as special case in KTimeEdit and better min/max
the plasma frame applet for example uses zero time (QTime(0, 0, 0), not
invalid time) as a special for case for "never" (i.e. don't update) so
having this feature will make KTimeEdit even more suitable for timers (that
ofcourse has to be handled by the application or library, zero time timers
are a thing)

also min/max now allows to set lower seconds (for example) when the minute
is not zero instead of just restricting the seconds value to a hard-minumum
altough that makes me think a step feature may be needed (e.g. to now allow
intervals less than two seconds with minimum of one second)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 05:58:23 +03:00
Ivailo Monev
643efdc576 kdeui: remove forward-declaration of non-existing KDoubleLine class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 23:11:20 +03:00
Ivailo Monev
4de3537a82 kdeui: new KTimeEdit widget
inspired by QTimeEdit but ment for timers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 13:14:24 +03:00
Ivailo Monev
b323e4a95d kdeui: remove forward-declaration of now non-existing KCalendarWidgetPrivate class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 12:19:10 +03:00
Ivailo Monev
925c7571ce kdeui: remove duplicate qevent header inclusion in khistorycombobox source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:52:52 +03:00
Ivailo Monev
a9e778cc6d kdeui: update note in KCalendarWidget::changeEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 08:10:04 +03:00
Ivailo Monev
b7e54f8e21 kdeui: stub KSwitchLanguageDialog
to be rewritten. date, time, days, etc. translation and conversion work
like a charm tho (when translated and supported by the locale classes
ofcourse):
https://ibb.co/hcW0dL3

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 00:40:39 +03:00
Ivailo Monev
1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00
Ivailo Monev
6d3811054d kdeui: adapt KCalendarWidget to locale and language changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 12:02:13 +03:00
Ivailo Monev
3c697cf8ce kdeui: implement setter and getter for KCalendarWidget to use a specifiec KCalendarSystem
maybe temporary tho but for now the minimum and maximum date will be that
of the KCalendarSystem

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 11:29:06 +03:00
Ivailo Monev
8f8865db62 kdeui: do not warn from setupCalendarWidget() if the system locale name is "C"
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 08:21:55 +03:00
Ivailo Monev
6c2c0efda8 kdeui: remove unused klocale header inclusion in kcalendarwidget header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 06:20:32 +03:00
Ivailo Monev
061a11fd43 kdeui: replace KDatePicker/KDateTable with new KCalendarWidget class
interestingly QLocale is not used for many things but that is about to
change, Katie uses it a lot internally (e.g. for QDateTime formatting
and such) so instead of bolting a calendar system on top of KLocale
perhaps a QLocale wrapped around in KLocale will fit the general idea
of using QLocale in widgets when necessary (as does QCalendarWidget).

that however means no way to specify a calendar system (in general,
other than changing the widgets locale itself) but the QDateTime and
related classes are tied to gregorian calendar already - the system
time itself carries no information about the calendar and any
conversions from one calendar to another are basically made up stuff
(there is the time zone thing ofcourse but that is not a calendar)

another interesting thing to note is that KLocale was written such that
it is read-write - changing the date formats for example is possible
because there are public KLocale methods for that.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 06:16:56 +03:00
Ivailo Monev
e84a04fa67 kdeui: remove forward-declaration of now non-existing KTimeZones class
replaced with KTimeZoneList

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 02:50:53 +03:00
Ivailo Monev
000c8af989 kdeui: remove unused date and time related widget classes
some of the classes date back to 2001 and 2002, still unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 02:48:22 +03:00