Plans for the Qt client

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Plans for the Qt client

Post by louis94 »

Hello,

To avoid polluting thread 912, I continue here.
If u like u can redesign old city dialog to whatevever u want with tabs.
Will the two versions coexist ?
Or u could do configurable shortcuts but with mouse support.
I fear mouse shortcuts are difficult to do with Qt. However, Kde Fraweworks have a nice widget for key sequence input (KKeySequenceWidget), so we might steal and adapt the code.
Or redesigned Start game like in civilziation - few questions with icons and then start game without showing pregame page.
Then normal start game would be as start customized game.
Good idea. I don't think it would be useful for multiplayer, but maybe that's because I never used it :oops: Let me pick this one, I'll see where I can get.
Or maybe customized messageboxes instead standard like in dota:
https://camo.githubusercontent.com/80b5 ... 4a2e6a7067
( it would require customized qinputdialog for picking city name and choice dialog for cravans/diplo actions - so everything would look similar )
Shouldn't that go to a full QTheme ? Or maybe some CSS would be enough…
Or maybe editor?
It would fill the gap between Qt and Gtk, but it's more work than I have time for.
Or improve pregame or those load scenario/load saved game/ start page - they looks lame :D
Rethought pregame (for single-player) is part of what I want for the redesigned Start Game experience. More on that later (here or on Gna!) ;)

Louis
User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: Plans for the Qt client

Post by mir3x »

Will the two versions coexist ?
First I wanted to coexist, now when GriffonSpade proposed new one, probably no. Idk, I'll do city dialog after sidebar.
key sequence input
Its not about keysequence but mouse+keyboard
eg you could configure just ctrl+x shortcut or ctrl+right mouse click to move map, instead right click
Shouldn't that go to a full QTheme ? Or maybe some CSS would be enough…
Later it would be themed, for now just simple CSS but probably also some animation effect. Eg lightning going via margin looks well.
Btw check gwenview, skip to last picture and see choice dialog, it looks well. ( i still have version 4x, but it should be in 5 too)
Rethought pregame (for single-player) is part of what I want for the redesigned Start Game experience. More on that later (here or on Gna!) ;)
Some really good free pics u can find on NASA www.
Or post here what u need.

You can always search qt client code for PORTME or FIXME, there are some missing parts or open patches on gna.
(but if u ever want to do tranport selection dialog then do it as submenu, not dialog )

I thought also about new tax rates - slider with double value - left and right - it would be good, instead 3 normal sliders - just 1.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Plans for the Qt client

Post by louis94 »

Here's my design so far for the "New Single Player Game" page. Feedback welcome !
new-game - light.jpeg
new-game - dark.jpeg
I looked at the Server Options dialog to find useful options, and ended up with the same set as in Civ V :o I swear I didn't cheat!
mir3x wrote: Some really good free pics u can find on NASA www.
Or post here what u need.
Screenshots are the easiest source of Freeciv-related images, but dedicated artwork would probably be better. Once the layout is fixed, finding good images shouldn't be very difficult.
mir3x wrote: I thought also about new tax rates - slider with double value - left and right - it would be good, instead 3 normal sliders - just 1.
Creating such a widget shouldn't be very complicated, one can use QStyle::SC_Slider* to do the hard painting. Just wondering : since it would serve the exact same function as the indicators in end_turn_area, wouldn't it make sense to merge the two designs ?

Louis
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Plans for the Qt client

Post by louis94 »

As you saw I posted a few patches. For now, this (patch 7489) is as close to the layout above as I can get. The handling of client pages is very difficult to understand, let alone modify. This is caused by the class fc_client being a God object (an anti-pattern you'll find many warnings against). I'll start working on a more C++ish way of communicating with the C backend, but doing it well will take some time. I'll of course work step by step − no 1MB patch ahead. Hopefully this will also make maintenance/future modifications easier.

Louis
User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: Plans for the Qt client

Post by mir3x »

Yeah, that was done fast just to to get it working, a lot of ctrl+c and ctrl+v.
If u have some problem with kdevelop and freeciv C++ code - u need downgrade Qt to 5.5 ( at least 5.6.X and any class with Q_OBJECT looks broken and kdevelop 4.7.3)
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Plans for the Qt client

Post by louis94 »

mir3x wrote:Yeah, that was done fast just to to get it working, a lot of ctrl+c and ctrl+v.
Otherwise we wouldn't have a working program yet ;) Copy-pasting is most of the time very useful.
mir3x wrote:If u have some problem with kdevelop and freeciv C++ code - u need downgrade Qt to 5.5 ( at least 5.6.X and any class with Q_OBJECT looks broken and kdevelop 4.7.3)
No problem with Qt 5.7.0 and kdevelop 4.90.92 (git version, with clang-based parser! yeah!)

Louis
User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: Plans for the Qt client

Post by mir3x »

This is caused by the class fc_client being a God object
Man that's new meta, u should leave it as it is.
Its just "One Ring to rule them all ... and in the darkness bind them"
It's like my SystemDown.

Pls be my followers, dont change that.

Pennart Loettering

Sorry I couldnt resist to write that :D
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Plans for the Qt client

Post by louis94 »

mir3x wrote:
This is caused by the class fc_client being a God object
Man that's new meta, u should leave it as it is.
Its just "One Ring to rule them all ... and in the darkness bind them"
It's like my SystemDown.
I'm an atheist. Do you want to start a religious war ?
Screenshot_20160721_184633.png
Screenshot_20160721_184633.png (179.71 KiB) Viewed 9054 times
mir3x wrote:Pls be my followers, dont change that.
Seriously or was it irony ? I'm not sure how I should understand your message.

Louis
User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: Plans for the Qt client

Post by mir3x »

It wasn't my message, Pennart hacked my account.
User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: Plans for the Qt client

Post by mir3x »

There is QChart in qt 5.7,
It could be nice to get some charts at endgame in freeciv 3.0 maybe.
Like 2 comboboxes, first to choose column from endgame report, second for chart type.
Just under endgame table.

Also it would be nice to patch server to send scorelog at endgame.
Post Reply