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] [needs-docs] classify symmetric #5370

Closed

Conversation

pierreloicq
Copy link
Contributor

@pierreloicq pierreloicq commented Oct 15, 2017

Hello,

This PR is the following of #5161.

The goal is to have symmetric colors and hence classes around a value. It works for equal interval, s.d. method and pretty breaks.
For equal interval and s.d. methods, there is box for the user to put the pivot value. On my system, typing the dot . doesn't work, probably because comma , is used in my locale language (french). Searching on the net refers to the "bug" so I didn't try to correct that for the moment. Please tell me if it works correctly on your non-french systems.
I used the word "astride" to describe when the pivot point is inside a class. I think it's easy to understand but maybe you will have a better word.

Thank you

capture du 2017-10-16 00-35-27

…n the menu. The checkbox is activated on ly if there both positive and negative values
…terval, with or without a class astride the X value
@kannes
Copy link
Contributor

kannes commented Oct 19, 2017

Awesome!

I believe you can set QGIS to use any other locale for testing in the options menu somewhere.

Not sure about the "astride", that is not a basic word so I am not sure how intuitive it would be. Maybe "around"?

@pierreloicq
Copy link
Contributor Author

Thank you kannes.
Yes, but "around" does not seem precise about if its astride or not :-D.
A feedback from a native maybe ?

@Gustry
Copy link
Contributor

Gustry commented Oct 26, 2017

Hi Pierre,
Nice feature, I wanted to give it a try but I got a compilation error:

/Users/etienne/dev/cpp/QGIS/src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp:501:12: error: use of undeclared identifier 'cbxSymmetricAroundZero'

Also, you need to move from qMin, qMax to std::min/max and also qAbs

@Gustry
Copy link
Contributor

Gustry commented Oct 27, 2017

You will need to fix the code layout by running the scripts/prepare-commit.sh and also the failing tests

@pierreloicq
Copy link
Contributor Author

Hello,
I found and resolved some lacks this week-end.
I still have to add the capability to save and load this new information in the qml/sld files.

… window is reopen. Properties are also saved in qml file.
@pierreloicq
Copy link
Contributor Author

Hello,
Seems good now. The QgsDoubleSpinBox to enter the pivot value behave strangely sometimes (you have not finished to type the number that it is filed automatically). It crashes if I load a 2.14 project but I does not seem to come from my part:
"Warning: Loading a file that was saved with an older version of qgis (saved in 2.14.11-Essen, loaded in 2.99.0-Master). Problems may occur."

@pierreloicq
Copy link
Contributor Author

pierreloicq commented Nov 19, 2017

The test output the answer below. Am I supposed to document the setters and getters ? (Others are not)
If yes, how ? Just some text in a multiline comment placed before the function ?
Thank you

Unacceptable missing documentation:

Class [NON-XML-CHAR-0x1B][33mQgsGraduatedSymbolRenderer[NON-XML-CHAR-0x1B][0m, 29/55 members documented

[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m astride()[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m listForCboPrettyBreaks()[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m setAstride(bool astride)[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m setSymmetryPoint(double symmetryPoint)[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m setUseSymmetricMode(bool useSymmetricMode)[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m symmetryPoint()[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m setListForCboPrettyBreaks(QStringList listForCboPrettyBreaks)[NON-XML-CHAR-0x1B][0m
[NON-XML-CHAR-0x1B][1m[NON-XML-CHAR-0x1B][33m useSymmetricMode()[NON-XML-CHAR-0x1B][0m

@Gustry
Copy link
Contributor

Gustry commented Nov 21, 2017

The test output the answer below. Am I supposed to document the setters and getters ? (Others are not)

AFAIK, all new members since QGIS 3.0 require documentation. That's why some previous members haven't documentation yet

@pierreloicq
Copy link
Contributor Author

pierreloicq commented Dec 17, 2017

Hello,
I wanted to resolve the conflict online. I did the modifications then clicked on "commit merge". Looks like it merged master into my branch. But the conflict is still there (I guess because resolving a conflict needs to be able to write on master ?)
Is there any way to cancel this merge ?
Or I should pull the changes on my local prettyBreaksAroundZeroByTickingBox branch and push again ?
Or an authorized person can resolve the conflict ?
Thank you

@elpaso
Copy link
Contributor

elpaso commented Dec 17, 2017

I've never used the online way, but you can revert the merge locally and push -f to go back to your previous state.
To resolve a conflict locally you normally have to rebase from origin/master (if the official qgis repo is named origin) and resolve conflicts manually, then commit and push -f

@pierreloicq
Copy link
Contributor Author

Ho, it looks like there is not conflict anymore. But the tests didn't launch. Is it possible to launch the Travis test manually ?

if the answer is "commit again", I need to ask you about my git problems:

The merge master-> prettyBreaksAroundZeroByTickingBox occurred here on the website, and after correcting the conflict on my local branch, it didn't want me to push because there was more work here than on my local branch. So, while staying on the prettyBreaksAroundZeroByTickingBox branch, I did:

  • git pull origin: it downloaded 2080 commits + python/core/symbology/qgsgraduatedsymbolrenderer.sip (modified on both sides)
  • I solved the conflict in python/core/symbology/qgsgraduatedsymbolrenderer.sip
  • git add python/core/symbology/qgsgraduatedsymbolrenderer.sip

now, if you tells me it's ok, I can add the 2080 supplementary commits, commit and push.
Thank you

@Gustry
Copy link
Contributor

Gustry commented Dec 18, 2017

You can close/reopen the PR, it should retrigger travis

@pierreloicq pierreloicq reopened this Dec 18, 2017
@pierreloicq
Copy link
Contributor Author

pierreloicq commented Jan 14, 2018

test output: "The job exceeded the maximum time limit for jobs, and has been terminated."
I wanted to update master and rebase. Should I be in my local master (checkout master) to pull master, or we don't care ?

git checkout master
    Déjà sur 'master'
    Votre branche est à jour avec 'origin/master'. (origin = my repo, upstream = qgis repo)
git pull upstream --rebase
    Vous avez demandé de tirer depuis le dépôt distant 'upstream', mais sans indiquer
    la branche. Comme ce n'est pas le dépôt distant par défaut dans la configuration
    pour la branche actuelle, vous devez spécifier la branche avec la commande.
git pull upstream/master --rebase
    fatal: 'upstream/master' does not appear to be a git repository
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

@pierreloicq
Copy link
Contributor Author

To be continued at #6120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants