1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

47 Commits

Author SHA1 Message Date
Mick Sayson
c7efe320d2 refactor(filetransfer): Move file transfer progress into ToxFile
* Refactor/test ToxFileProgress to ensure that when it's moved it
  behaves well
* Notice problems with speed averaging. We were average speeds without
  keeping track of the times they were over. Adding samples of different
  lengths would result in incorrect speeds. Refactor whole class to correct
* Move ToxFileProgress to be a member of ToxFile
* Remove duplicated members between ToxFile and ToxFileProgress
* Move sample addition into CoreFile
2021-12-11 15:38:35 -08:00
Mick Sayson
7c218b389d
feat(chatlog): Add image preview on paste
Reuse code from the file transfer widget to provide an image preview
on paste/grab. This prevents users from accidentally sending images they
did not mean to when their clipboard is not in the state they thought it
was.

Implementation exposes the genericchatlog vbox to the child classes and
chatform injects the imagepreview into it.
2021-10-24 22:06:58 -07:00
TriKriSta
b11a09d3e4
refactor: delete classes that were used to reload theme 2020-08-28 10:26:26 -07:00
TriKriSta
3bf3128a4f
fix(ui): implement and connect reloadTheme in leaf classes
This allows leaf classes to update independently when the GUI has changed themes, without
their parent having to call updateTheme() manually.

Fix #5924
Fix #5592
2020-08-28 10:19:53 -07:00
sudden6
040a833d56
refactor: remove getInstance from filetransferwidget.cpp 2020-08-16 12:47:30 +02:00
Mick Sayson
99c1753a76 fix(preview): Fix exif orientations
Previous exif transformations were not valid. The exif spec defines the
orientations as where the 0th row and the 0th column should end. The
previous mappings used in qTox did not respect these mappings and needed
to be updated.
2020-05-16 16:53:14 -07:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
Anthony Bilinski
1ad561ca4c
refactor(style): use only one of override, virtual, or final
following https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

virtual means exactly and only "this is a new virtual function."
override means exactly and only "this is a non-final overrider."
final means exactly and only "this is a final overrider."

Nothing was changed from e.g. override to final, just reduced duplication of
these labels.
2019-10-19 12:26:50 -07:00
jenli669
04a9bc46f4
docs(copyright): update and add copyright info
zealously updates and adds qTox copyright information.

Fixes #5713
2019-06-28 01:18:26 +02:00
Mick Sayson
ed514d7166 refactor(chatform): Remove message handling logic from gui path
Functional changes
* Offline messages are still sent when the chat log is cleared
* Spinner now does not wait for history to be complete, just a receipt
  from our friend
* Export chat and load chat history are now available in group chats
* Merged save chat log and export chat log
  * Note that we lost the info messages in the process

NonFunctional Changes
* FileTransferWidget slots only called for correct file
* Settings::getEnableGroupChatsColor now embedded in
GenericChatForm::colorizeNames
  * Settings::setEnableGroupChatscolor now emits signal connected to
GenericChatForm::setColorizedNames to keep state in sync
* Chatlog history not reloaded on setPassword()
  * I am pretty sure this had no purpose
* Removed a lot of responsibility from ChatForm
  * History moved to ChatHistory implementation of IChatLog
  * OfflineMsgEngine moved to FriendMessageDispatcher
  * Export chat and load chat history moved to GenericChatLog
    * Backed by IChatLog so can be used generically
  * Message processing moved to FriendMessageDispatcher
  * The action of sending files to coreFile is still handled by
  ChatForm, but displaying of the sent messages is done through IChatLog
  -> GenericChatForm
  * Search moved to ChatHistory/SessionChatLog
  * All insertion of chat log elements should be handled by
  GenericChatForm now
* Removed overlapping responsibilities from GroupChatForm
  * Search and message sending goes through ichatlog/messagedispatcher
  too
  * Lots of search functionality pushed down into IChatLog
* Some of the file logic was moved into Widget. This is mostly to avoid
  scope increase of this PR even further.
* History APIs removed that were no longer used
2019-06-21 11:01:35 -07:00
Monsterovich
1bbe210c25 fix(ui): Improved notifications 2019-05-22 19:48:23 +02:00
Mick Sayson
157be30b11 refactor(files): Refactor FileTransferWidget
Rational here is that the current FileTransferWidget is quite
entangled with core logic. If we are going to instantiate the
FileTransferWidget without an active file transfer the widget needs to
behave sanely without getting messages from toxcore. This changeset is
an attempt to allow us to move from any FileTransferWidget state to any
other state without having to go through the appropriate state
transitions.
2018-12-02 14:35:04 -08:00
sudden6
acc7058e65
refactor: remove another function from Nexus 2018-11-01 10:22:20 +01:00
Anthony Bilinski
5dc4e6de81
chore(legal): update copyright date to 2018 for all source files 2018-04-25 17:33:38 -07:00
sudden6
1dce8f6468
refactor(core): rename corestructs to toxfile.cpp
It only contains this struct now.
2017-10-31 09:32:53 +01:00
anthony.bilinski
414fa178b4 feat(exif): Honour exif orientation tag
Fixes #1848
2017-09-19 10:00:05 -07:00
Jimi Huotari
9322f29ef4 feat(UI): Move filetransferwidget buttons side-by-side.
This aims to prevent accidental clicks on the incorrect button in
cases where the chatlog moves at the time of the click.

Closes #2597.
2017-03-01 23:44:49 +02:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
Diadlo
fcd8eed7cd
style: Fix style of a lot of pointers 2017-01-06 23:03:58 +03:00
Zetok Zalbavar
d4ac13dbf4
revert: "refactor: Added to include path and exclude it from all includes"
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.

In case of conflicts, includes were sorted according to the coding
standards from #3839.

This reverts commit b4a9f04f92.
This reverts commit 5921122960.
2016-12-29 16:10:53 +00:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Diadlo
b4a9f04f92
refactor: Added to include path and exclude it from all includes 2016-11-28 23:28:42 +03:00
Diadlo
233cc412ac
refactor(filetransferwidget): Added ability to check activity 2016-07-31 11:20:57 +03:00
Vincas Dargis
32d588a499 fix(file transfer widget): QPushButton allows image to overflow
Introduced in 857dfbcd4c

Regression was due to fact that QPushButton allows icon to overflow.
This patch does:
1. Scale and crop icon to fit into button.
2. Avoid upscaling small images.
3. Refactor FileTransferWidget::showPreview() to load image from file
   only once.

Closes #3042
2016-04-17 12:45:39 +03:00
Vincas Dargis
857dfbcd4c Open downloaded image with mouse click on thumbnail 2016-02-14 17:20:11 +02:00
agilob
db5903c2fe
set one global initial file accept directory for all file transfers 2015-08-30 20:36:39 +01:00
tux3
36fcb5cb62
Add final/override specifiers
We get more compile time checking, and it's always good for performance to help the compiler
2015-06-08 20:08:24 +02:00
Zetok Zalbavar
67e9aeec63
Fix incorrect copyright headers
The qTox Project is not associated with the Tox Project in any way, with the
exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's
"qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox
contributors, and no partiular rights are granted to the Tox Project.
2015-06-06 14:51:28 +01:00
tux3
76cbaf18f1
Fix incorrect copyright headers
The qTox Project is not associated with the Tox Project in any ways, with the exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's "qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox contributors, and no partiular rights are granted to the Tox Project.
2015-05-12 04:12:53 +02:00
tux3
e74e29e4fb
Cleanly cancel broken file transfers 2015-04-25 19:18:46 +02:00
tux3
9dedd22bb2
Port file transfers to the new API
Parallel, extremely large, and other edge case transfers have not been tested, but the common path should work well.
2015-04-24 15:31:30 +02:00
tux3
e4859efe18
Refactor Core
Refactor Core's file transfer callbacks into their CoreFile class and files

Move all core*.{h|cpp} into a core/ folder
2015-04-24 02:32:09 +02:00
Dubslow
e96211199d
Check for writability for Qr saves 2015-03-16 16:41:59 -05:00
krepa098
9499909f8b finished work on FTW
hopefully
2015-02-14 12:14:09 +01:00
krepa098
faaa147a83 mockup (WIP) 2015-02-13 16:46:59 +01:00
krepa098
6b605fbdc3 FTW: Replaced QPropertyAnimation by QVariantAnimation 2015-02-07 14:02:40 +01:00
krepa098
5e4e56778b FTW: color animation 2015-02-04 17:21:56 +01:00
krepa098
5be6caca68 [HiDPI] ChatLog: replaced all .png by .svg, FTW custom paintEvent
This does not enable HiDPI support!

issue #975
2015-01-26 14:01:42 +01:00
Dubslow
44921db440
minor code cleanup 2015-01-18 13:57:51 -06:00
krepa098
b4f53944cc FileTransferWidget: calculate mean 2015-01-18 11:51:48 +01:00
krepa098
f574a43581 FileTransferWidget: fixed autoaccept 2015-01-11 11:57:33 +01:00
krepa098
3190530686 filling the gaps 2014-12-13 21:11:03 +01:00
krepa098
3a567d962e more work on filetransferwidget 2014-11-17 20:08:55 +01:00
krepa098
27cb075dbb hooked up filetransferwidget 2014-11-17 16:05:14 +01:00
krepa098
1cf9fe3474 filetransferwidget: first steps 2014-11-16 20:01:37 +01:00
krepa098
4ea21c2d19 (c) 2014-11-16 12:58:43 +01:00
krepa098
de52bad1db initial commit 2014-11-12 14:11:25 +01:00