Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: qchat #182

Merged
merged 112 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
d78d360
add new plugin settings
gounux Jul 18, 2024
266a7bf
add qchat skeleton
gounux Jul 18, 2024
6288f04
refactor messages fetching
gounux Jul 18, 2024
dbdca1e
display dates with time format
gounux Jul 18, 2024
736268f
add websocket client
gounux Jul 18, 2024
8724240
add clear chat button
gounux Jul 18, 2024
e6ff55c
set nice icons
gounux Jul 18, 2024
1d1fa15
docstring and displayed date format
gounux Jul 18, 2024
bae1061
add send message action on return press
gounux Jul 19, 2024
4a22bcd
edit buttons cursors
gounux Jul 19, 2024
be93bdd
fix ws disconnection issue
gounux Jul 19, 2024
b96d371
fix rooms fetch from API
gounux Jul 19, 2024
705744d
add dizzy cheatcode
gounux Jul 19, 2024
3b9ace1
disconnect when widget is closed
gounux Jul 19, 2024
8ddb95d
add instance status button + exception handling
gounux Jul 21, 2024
959aae9
fix qchat settings
gounux Jul 21, 2024
e9a36d0
add qchat action to toolbar
gounux Jul 21, 2024
88670de
init stuff on widget open
gounux Jul 21, 2024
c3016fe
set taskmanager in widget initialization
gounux Jul 21, 2024
097787a
do not use cache when fetching qchat instance status
gounux Jul 21, 2024
355f7eb
add instance rules actions
gounux Jul 21, 2024
777a024
update qchat default settings
gounux Jul 21, 2024
43f127b
set ui nice cursors
gounux Jul 21, 2024
8b9d9ff
fix disconnect bug
gounux Jul 21, 2024
ce80f02
set cheatcode optional with a pref checkbox
gounux Jul 22, 2024
75593a7
add author in metadata
gounux Jul 22, 2024
86b810a
edit about in metadata
gounux Jul 23, 2024
81d4f13
edit about in metadata
gounux Jul 23, 2024
1030181
add optional chat sounds
gounux Jul 23, 2024
c085f03
fix sound play
gounux Jul 23, 2024
229960d
edit sound volume in plugin settings
gounux Jul 23, 2024
e484fe4
fix widget initialization
gounux Jul 23, 2024
6418623
add more ringtones
gounux Jul 23, 2024
bd69c51
play tone in preferences widget
gounux Jul 23, 2024
76777e7
edit default qchat instance
gounux Jul 23, 2024
bebfa83
add audio mention to pixabay
gounux Jul 23, 2024
c41b650
Update qtribu/metadata.txt
gounux Jul 23, 2024
87ebbf1
edit action order
gounux Jul 23, 2024
77ca994
move nickname to authoring widget
gounux Jul 24, 2024
cea901a
add volume label in preferences widget
gounux Jul 24, 2024
42ff1db
use label instead of lineedit for nickname in qchat widget
gounux Jul 24, 2024
3bf1ed5
log in msgbar if no nickname set
gounux Jul 24, 2024
474414a
edit instance rules button icon
gounux Jul 24, 2024
c415f5b
add settings button in qchat widget
gounux Jul 24, 2024
4e5ac82
colorize messages
gounux Jul 24, 2024
8d6b92a
minor UI edits
gounux Jul 24, 2024
1998634
set alphanum validator for nickname
gounux Jul 24, 2024
f51c6ab
add cat notif sound
gounux Jul 24, 2024
0b430eb
check nick length and reload settings afeter showing form
gounux Jul 24, 2024
3f093e8
refactor way to add messages in chat
gounux Jul 24, 2024
62f24f7
refactor utils sound functions to common file
gounux Jul 24, 2024
dc56aa6
load settings beep sound
gounux Jul 24, 2024
1dd3deb
crop beep 7 sound
gounux Jul 24, 2024
9098c5f
swap mention and user messages colors
gounux Jul 24, 2024
bd65c5f
add internal message handling
gounux Jul 24, 2024
a1f8615
change internal messages data model
gounux Jul 24, 2024
f53fc6d
fix datetime display
gounux Jul 24, 2024
e8f7e62
print current time using QTime object
gounux Jul 24, 2024
9439ba5
disconnect websocket if settings change
gounux Jul 24, 2024
cd78485
create new room groupbox
gounux Jul 24, 2024
d88403f
nicer UI updates
gounux Jul 24, 2024
2dd38f1
add arcgis cheatcode
gounux Jul 24, 2024
e7f09e4
remove arcgis cheatcode
gounux Jul 24, 2024
4d39b87
improve(gischat): handle case where external dependencies are not ins…
Guts Jul 24, 2024
80c12fc
fix(gischat): remove action chat when plugin is unloaded
Guts Jul 24, 2024
6efb943
improve(docs): add how to install dependencies
Guts Jul 24, 2024
cf03fc2
refacto: change prefix to fit UI class
Guts Jul 24, 2024
17588d2
refacto: change prefix to fit UI class
Guts Jul 24, 2024
0fbc2b7
refacto: rename into nickname to make it generic
Guts Jul 24, 2024
00de59e
fix: unreacheable var (HS)
Guts Jul 24, 2024
592cc0d
add gis license expired cheatcode
gounux Jul 24, 2024
b7bdf01
edit qgis license message
gounux Jul 24, 2024
5f1a981
set status string message to translatable
gounux Jul 24, 2024
dcad031
feature: add tooltip to message qtreewidgetitem
gounux Jul 24, 2024
9572451
fix: fix tooltip typo
gounux Jul 24, 2024
beded06
fix: fix tooltip item
gounux Jul 24, 2024
9d475e2
fix: fix typo
gounux Jul 25, 2024
2b31957
fix: remove qchat dockwidget when plugin is unloaded
Guts Jul 24, 2024
630d91f
feat: set author and message max length
gounux Jul 25, 2024
8aae62c
feat: add right click copy to clipboard action
gounux Jul 25, 2024
c661aa6
feat: add right click hide message action
gounux Jul 25, 2024
97318ff
feat: set admin message optional display in settings
gounux Jul 25, 2024
3001859
feat: mention user when double clicking on chat button
gounux Jul 25, 2024
a7f4cbb
fix: remove comment
gounux Jul 25, 2024
878d55b
feat: add mention action on right click
gounux Jul 25, 2024
91e185b
fix: reload widget if instance have changed
gounux Jul 25, 2024
d0334f7
fix: no mention if author is user or admin
gounux Jul 25, 2024
dbebe8f
feat: add avatars
gounux Jul 25, 2024
536b212
feat: use editable combobox for instance in settings
gounux Jul 25, 2024
818b7eb
update(docs): add QtMutimedia as required dependency
Guts Jul 25, 2024
cf6477d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
a91fb3a
feat: display main language in rules action
gounux Jul 25, 2024
43b64b5
update(docs): add how to download branch version
Guts Jul 25, 2024
b6bbb24
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
10b95fd
chore(packaging): update version to 0.18.0-beta1 and set it as experi…
Guts Jul 25, 2024
4a21fcc
feat: use QgsFilterLineEdit for message input
gounux Jul 25, 2024
ffbb36a
feat: set message colors in settings
gounux Jul 25, 2024
eea6d62
feat: add more debug logs
gounux Jul 25, 2024
344bf09
feat: add more available avatar icons
gounux Jul 26, 2024
e7e5553
feat: remove / at the end of the instance uri
gounux Jul 26, 2024
b4f0b88
feat: add min/max nickname and message length in rules display
gounux Jul 26, 2024
5dfa0b7
feat: discover instances button in settings
gounux Jul 26, 2024
ee5b01e
feat: mention when pinging @all
gounux Jul 26, 2024
067805d
feat: remove Room column
gounux Jul 26, 2024
16d9e8b
feat: display messages at the bottom and scroll
gounux Jul 26, 2024
2551fd4
feat: set focus to message lineedit when mentioning user
gounux Jul 31, 2024
e7194cc
update(docs): add PyQtWebEngine to recommended deps
Guts Aug 1, 2024
10c1d19
feat: display admin messages to false by default
gounux Aug 21, 2024
55baea4
fix: fix multiple widget opened signal triggered when moving widget
gounux Aug 21, 2024
ad8e5bd
add cow notif sound
gounux Aug 29, 2024
c213c2d
fix(import): QChatWidget
Guts Aug 29, 2024
84a74a5
fix(import): unload action_contents
Guts Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Plugin pour QGIS > 3.28
Inutile au travail donc forcément indispensable.

:book: :fr: [Voir la documentation](https://geotribu.github.io/qtribu/)

:sound: Audio sounds come from [pixabay.com](https://pixabay.com) (see [terms of license](https://pixabay.com/service/license-summary/))
58 changes: 53 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
# Installation

## Depuis le projet Github
## Dépendances

Certaines fonctionnalités du plugin reposent sur des dépendances logicielles tierces non incluses dans le packaging de QGIS sur certaines plateformes :

- QGISChat: (Py)QtMutimedia, (Py)QtWebEngine, (Py)QtWebSockets,

### Linux

> Par exemple sur Ubuntu 22.04. Adapter à votre distribution.

Ouvrir un terminal et exécuter la commande suivante :

```sh
sudo apt install python3-pyqt5.qtmultimedia python3-pyqt5.qtwebengine python3-pyqt5.qtwebsockets
```

----

## Version stable (recommandée)

Le plugin est publié sur le dépôt officiel des extensions de QGIS : <https://plugins.qgis.org/plugins/qtribu/>.

## Version stable depuis le projet Github (alternative)

En plus d'être publié dans le dépôt officiel de plugins de QGIS, QTribu est également disponible via son propre dépôt personnalisé. Dans QGIS :

1. Menu `Extensions` > `Installer/Gérer des extensions`
2. Onglet `Paramètres`
3. Sous la liste des dépôts, cliquer sur `Ajouter...` et renseigner :
* Nom :
- Nom :

```txt
Dépôt personnalisé du plugin QTribu
```

* URL :
- URL :

```html
https://github.com/geotribu/qtribu/releases/latest/download/plugins.xml
Expand All @@ -31,14 +53,40 @@ Selon votre configuration, redémarrer QGIS peut être nécessaire, le gestionna

----

## Version en développement

### Depuis une branche

1. S'identifier sur Github.com
1. Se rendre sur la page correspondant au workflow GitHub Actions "📦 Packaging & 🚀 Release" : [cliquer ici](https://github.com/geotribu/qtribu/actions/workflows/packager.yml)
1. Filtrer sur la branche souhaitée

![Github - Workflow run listing](./static/github_actions_workflow_packaging_listing.webp)

1. Sélectionner la dernière exécution qui a fonctionné (avec une coche verte)
1. En bas de la page _Summary_, télécharger l'artefact du plugin packagé :

![Github - Workflow run summary](./static/github_actions_workflow_packaging_summary_annotated_artefact.webp)

1. Décompresser le fichier ZIP.
1. Ajouter le zip depuis le menu de QGIS ([voir la doc officielle](https://docs.qgis.org/3.34/fr/docs/user_manual/plugins/plugins.html#the-install-from-zip-tab) pour cette étape si besoin)

:::{note}
Il est aussi possible d'accéder à la page depuis l'onglet `Checks` de la Pull Request correspondante :

![Github - PR Checks tab](./static/github_pr_checks_tab_annotated_packaging.webp)
:::

----

## Intégration dans QGIS

Une fois installé, le plugin s'intègre :

* dans le menu `Internet` :
- dans le menu `Internet` :

![Menu QTribu](https://cdn.geotribu.fr/img/projets-geotribu/plugin_qtribu/qtribu_menu_plugin.png "Menu QTribu")

* dans la barre d'outils sous forme d'une simple icône :
- dans la barre d'outils :

![Toolbar QTribu](https://cdn.geotribu.fr/img/projets-geotribu/plugin_qtribu/qtribu_toolbar.png "Toolbar QTribu")
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions qtribu/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,25 @@ def local_path(self, base_path: Path = Path().home() / ".geotribu/cdn/") -> Path
description="icône globe pointillisme",
),
)

# QChat
QCHAT_NICKNAME_MINLENGTH = 3
ADMIN_MESSAGES_NICKNAME = "admin"
ADMIN_MESSAGES_AVATAR = "mIconWarning.svg"
ERROR_MESSAGES_COLOR = "#ff0000"
INTERNAL_MESSAGE_AUTHOR = "internal"

# QChat cheatcodes
CHEATCODE_DIZZY = "givemesomecheese"
CHEATCODE_DONTCRYBABY = "dontcrybaby"
CHEATCODE_IAMAROBOT = "iamarobot"
CHEATCODE_10OCLOCK = "its10oclock"
CHEATCODE_QGIS_PRO_LICENSE = "qgisprolicense"

CHEATCODES = [
CHEATCODE_DIZZY,
CHEATCODE_DONTCRYBABY,
CHEATCODE_IAMAROBOT,
CHEATCODE_10OCLOCK,
CHEATCODE_QGIS_PRO_LICENSE,
]
Loading
Loading