Qalculate / qalculate-gtk

Qalculate! GTK+ UI
https://qalculate.github.io/
GNU General Public License v2.0
945 stars 68 forks source link

Thank you! :smiley: - Next: Android, please. #24

Open musikjunkie opened 6 years ago

musikjunkie commented 6 years ago

A really big THANK YOU! for bringing Qalculate to Windows. This has been the single one piece of software I've been missing the most at work, where I have to use Windows. Now I can use the best calculator ever there as well. Great!

Now, with people using smartphones more often than PCs these days, it would be great to have a port of Qalculate on Android.

hanna-kn commented 6 years ago

Thanks.

The library should be easy to port to Android, but the user interface will likely require a complete rewrite.

musikjunkie commented 6 years ago

I'm not a coder, so this may be complete rubbish ... but would KDE Kirigami or GTKAndroid (https://github.com/eugals/GTKAndroid) options for that?

I like your photography.
hanna-kn commented 6 years ago

I would probably use Qt for an Android GUI (GTKAndroid appears unfortunately to be unfinished and abandoned). No matter what toolkit is used the GUI will need to be redesigned for small touch screens.

musikjunkie commented 6 years ago

Do you still have an Android version on your radar screen?

hanna-kn commented 6 years ago

It's at the top of my to-do list, but I have not really started yet.

Akrai commented 5 years ago

Im suscribing to this as im very interested in qalculate in android. How is the project going?

hanna-kn commented 5 years ago

I've managed to compile libqalculate (requires few modifications), but still haven't started with the Android GUI.

musikjunkie commented 5 years ago

Still interested in this. Qalculate would be the most powerful calculator on Android.

Akrai commented 5 years ago

Hi! Is there any progress in this matter? Thank you!

musikjunkie commented 5 years ago

I noticed that people reach for their phones when they need a calculator, even while sitting in front of their desktops. So the phone version should ideally become the master version, backported to the desktops.

How about kdeconnect integration, to put calculation results from the phone directly into the desktop clipboard?

Akrai commented 5 years ago

Well the kdeconnect feature in fact should be only just a copy to clipboard thing, as kdeconnect shares (if you allow it to) the clipboard between phone and computer, thats how i usually type long texts in the computer to be sent in an app in the phone, or things like that. I don't know if there could be more features with kdeconnect than this copy paste thing, but if this is the only one i think it is just enough to copy to android clipboard and let kdeconnect do its job

Well i think that if qalculate will have versions for different OS, the ideal thing is to have the same UI in all of them so you will always know how to use it even if you change to another OS, and the phone UI is the most limiting, compact and "special" to design, so i would go with the phone one as the main one to develop

musikjunkie commented 5 years ago

From https://techbase.kde.org/Kirigami ... Kirigami is KDE’s powerful but lightweight user interface framework for mobile and convergent applications. It allows Qt developers to easily create applications that run on most major mobile and desktop platforms without modification (though adapted user interfaces for different form-factors are supported and recommended for optimal user experience).

Sounds like an option.

hanna-kn commented 5 years ago

There hasn't been any progress. I'm busy enough with the development of the desktop versions (and libqalculate) of my two projects. I'm still hoping that someone else will step up and contribute. If I eventually do it myself I will likely try to implement a separate native Android UI (I have no wish to completely rewrite the desktop UI).

Akrai commented 5 years ago

I would totally contribute to the UI if i knew but i have 0 experience in programming UIs :(

57382 commented 3 years ago

This is undoubtedly Android's most powerful calculator.

jherkenhoff commented 2 years ago

Hello all, I was dreaming of a Qalculate! mobile version for a long time as well, and now decided that I will give it a try... Today, I did a quick mockup of how the GUI might look like: Mockup As can be seen, there is still some space left, waiting for your ideas ;) The sidebar on the left (Constants, Functions, Units) slides out, revealing the full glory of Qualculate's functionality.

Unfortunately, I am no UI/UX expert, so I would be greatful to hear about your opinion and to discuss alternative layouts and colorschemes. I am planning to implement the GUI using the android native framework.

Until then, I will continue with porting libqalculate to android...

crides commented 2 years ago

Nice work! I think the basic layer should be fairly complete, maybe a few more common constants can be added here (like e)?

I haven't looked into the details but, why would it be necessary to port libqalculate to Android? I've been using qalc on termux for quite a while now, so I imagine that part should be very easy. I think the only part necessary would be to link to the compiled libqalculate and design a UI around it

jherkenhoff commented 2 years ago

Thanks for your quick reply! I also see no big problem in the compatibility of libqalculate and android. Maybe "porting" was the wrong term here. I meant "convince Android-Studio to compile and package the native library together with the app code" :smile:.

Initially, I am planning to do exactly what you did with termmux, only as a Android app, i.e. using simple keyboard-input. From there on, I will add the GUI.

hanna-kn commented 2 years ago

It should actually be possible to compile and run the Qt UI (https://github.com/Qalculate/qalculate-qt) on Android with very few modifications. It would neither look as good or work as well (quite far from it) as a native GUI, but it would be a relatively easy first step.

ByteHamster commented 2 years ago

Just my personal opinion: I would try to make the UI less busy. I would remove pi and i buttons from the main screen and have them on the "constants" panel. I would remove the equals sign and the dollar sign. Probably even cos/sin/tan.

Then the start screen is a rather simple calculator, like the one that comes pre-installed on your device. If you need it, you still have the full power of libqualculate by opening the panels. But the default is more simple, less cluttered and easier to touch (because the buttons can be larger). At least on my phone, when opening the mock-up in full screen mode, I need to aim for the numbers pretty carefully.

I don't know how you use your phone calculator but I, personally, mostly do simple tasks with the basic mathematical operations. I want to quickly get my task done and not be overwhelmed by a screen full of tiny buttons. If I'm then doing something more complex like solving an equation (like maybe once in two weeks), I think it is fine having to open the side panels for that.

That's what I love about the (unmaintained) calculator app by Xlythe (https://github.com/Xlythe/Calculator). The UI is super simple and it can be used as a daily "basic" calculator. When you then sometimes need the more advanced features, they are just one single slide away.

That's it with my UI suggestions :) I'm happy to see some movement here, no matter how it ends up looking


Edit: quick mock-up moving the buttons around in GIMP:

jherkenhoff commented 2 years ago

Thanks for sharing your opinion and ideas, @ByteHamster. I agree that there should be a less busy screen for every day use - exactly like your gimp-remake :wink:. I thought about having multiple screens with varying complexity and purposes, which can be accessed by swiping the whole keypad to the left/right (as indicated by the five dots on the top of the keypad). While I have no problem aiming the buttons of the current mockup (they are significantly bigger than my android-keyboards buttons), I see your point, that bigger buttons are significantly quicker to use.

One could also think of making the screens fully customizable in terms of number of rows/columns and button placement. However, I don't know how many people would use such a feature or whether a few well-thought through screens may be better.

@hanna-kn you said you managed to compile libqalculate for android? Did you compile all dependencies (e.g. GMP, MPFR etc.) from source?

musikjunkie commented 2 years ago

That second mock-up looks better. However, I would still keep the basic operators (+, -, *, /) to the right of the numbers. Also suggest to move the numbers pad and the stuff to the right of it to the bottom or the screen.

As suggested by @ByteHamster , the basic stuff should have most of the screen real-estate, because those are the most used 'buttons'.

A completely different approach could be to start with an empty editor field and opening the Gboard keyboard in numeric mode for data entry.

jherkenhoff commented 2 years ago

Just a small update: I managed to compile libqalculate and its required dependencies using the Android NDK. If you are curious, here is a simple stand-alone build script: https://gist.github.com/mr-kenhoff/756fd1062627ca1ea9f60923d161b0d8

jherkenhoff commented 2 years ago

Quick status update: Since my last post, I lost some motivation due to strange errors while compiling the native libraries with AndroidStudio. However, a few days ago I figured I could give it another try - luckily with more success... libqalculate is now packaged in a Android library project, which can be found in my GitHub repository. I used SWIG to automatically generate java wrapper classes for usage in Android apps.

With this, I hacked together a very sporadic qalculate app that allows you to enter expressions using the standard keyboard and prints the result:

Finally the fun part can begin :tada: :keyboard: If someone wants to join: https://github.com/mr-kenhoff/qalculate-android

samuelobe commented 2 years ago

Hi all! I loved Qalculate when I was an engineering major in college. Any ideas on how I could use the API for an iOS port? I'm thinking of making the UI with SwiftUI.

stephtr commented 1 year ago

Dear all, Since I also love Qalculator, I made a website (https://qalculator.xyz/) using libqalculate, which is also available as a Store App for Windows, Android & iOS.

hanna-kn commented 1 year ago

Dear all, Since I also love Qalculator, I made a website (https://qalculator.xyz/) using libqalculate, which is also available as a Store App for Windows, Android & iOS.

Excellent. Where are the source code?

stephtr commented 1 year ago

It is on stephtr/qalculator.

nameOfUser0236 commented 1 year ago

It is on https://github.com/stephtr/qalculator.

dead link

stephtr commented 1 year ago

Fixed it, the link was correct, just my markdown syntax wasn't.

WeirdOddWodd commented 10 months ago

@jherkenhoff Your text-based graphical user interface looks excellent. Here is an idea: Add additional options when pressing and holding the finger on the buttons. As an example: On the desktop version, pressing and holding the left mouse button (or pressing the right mouse button) on the 2 button inserts a superscript 2 and pressing the middle mouse button on the button inserts a vulgar fraction one half Unicode glyph. image You can do what is done in Windows (since most people probably don’t normally use mice to operate their Android phones and, as such, would be unable to use the standard 3-button interface). See screenshot for example

avidseeker commented 7 months ago

Until the app is ready, is there a tmux package for libqalculate?

crides commented 7 months ago

If you mean termux, qalc. Been using it for a long time