Commit Graph

9 Commits

Author SHA1 Message Date
Tobias Fella
3a4f71de7f Port to declarative type registration 2023-09-23 14:05:50 +00:00
James Graham
ed874ed00a Document clipboard 2023-04-23 08:24:09 +00:00
Alessio Mattiazzi
d1f7e7091e Copy image to the clipboard
Add a context menu option to save an image in the timeline to the clipboard

BUG: 466478
2023-03-05 23:19:02 +00:00
Tobias Fella
4bfd857093 Refactor input stuff
This is the start of a significant refactoring of everything related to sending messages, which is roughly:
- the chatbox
- action handling
- message sending on the c++ side
- autocompletion of users/rooms/emojis/commands/things i forgot

Notable changes so far include:
- ChatBox is now a ColumnLayout. As part of this, i removed the height animations for now. <del>as far as i can tell, they were broken anyway.</del> I'll readd them later
- Actions were refactored to live outside of the message sending function and are now each an object; it's mostly a wrapper around a function that is executed when the action is invoked
- Everything that used to live in ChatBoxHelper is now in NeoChatRoom; that means that the exact input status (text, message being replied to, message being edited, attachment) is now saved between room switching).
- To edit/reply an event, set `NeoChatRoom::chatBox{edit,reply}Id` to the desired event id, `NeoChatRoom::chatBox{reply,edit}{User,Message}` will then be updated automatically
- Attachments behave equivalently with `NeoChatRoom::chatBoxAttachmentPath`
- Error message reporting from ActionsHandler has been fixed (same fix as in !517) and moved to NeoChatRoom


Broken at the moment:
- [x] Any kind of autocompletion
- [x] Mentions
- [x] Fancy effects
- [x] sed-style edits
- [x] last-user-message edits and replies
- [x] Some of the actions, probably
- [x] Replies from notifications
- [x] Lots of keyboard shortcuts
- [x] Custom emojis
- [x] ChatBox height animations

TODO:
- [x] User / room mentions based on QTextCursors instead of the hack we currently use
- [x] Refactor autocompletion stuff
- [x] ???
- [x] Profit
2022-10-10 23:10:00 +00:00
Tobias Fella
a117eaa12b Improve License header style 2021-04-18 17:47:22 +02:00
Tobias Fella
1cb6b3bbd6 Consistently use pragma once in all headers 2021-02-04 23:14:54 +01:00
Carl Schwan
136a8f2af8 Clang-tidy + clang-format 2020-11-27 00:26:39 +01:00
Tobias Fella
d8dde6e082 Add license headers to code files 2020-11-11 15:17:23 +00:00
Carl Schwan
8c8a9976a5 Transform Clipboard to singleton and add rich text copying feature 2020-11-07 16:08:35 +01:00