Oficina, a mechanical workshop application developed in Qt/C++

Hackweek 17: Work on TODO - Test. Make it very stable, after that, insert it in openQA.

Hackweek 16: Bugfixing, finish service groups functions, improve Qsettings usage.


Hackweek 15:


Add new functions to a Qt / C++ application, goal is to implement small functionalities and show how developing Qt can be easy, even for newcomers.

The application already exists, was written by from scratch and is pretty usable already.

It's an application to manage a Mechanical Workshop, it's designed based on real usage, such app. was 'requested' by my brother, in that time I had not much Qt skills, so the app was basically developed reading Qt5 official documentation, so I guess there probably are hidden bugs - Especially because it was done quite fast (started November 2016).

The very idea is to keep it simple, verify all forms and whatever else to 'block' the user from making 'final user stuff' :).

The code is all in github, even with a video and screenshot: https://github.com/bedi1982/Oficina

There I put a 'TODO' with some ideas of new functionalities, so anyone that want's to remove his Qt rust, or learn Qt from scratch (like me) is invited to help. The app is still very basic, small and simple, so learning the code flow is kinda fast, I hope.


Planning Hackweek 16:


1- Finish the Service type groups and create a group inclusion form;

2- Main bug tracking/fix session: I know there are several bugs, small ones, the plan is to-do a 100% coverage and swipe them all;

Maybe:

3- Create a config file which will store database credentials; I already use the Qtsetting store includes, need to research how to create a main config file.

4- Research on qsettings, currently I have a qsettings in all form classes, there must be a way to have a single one;

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 15 Hack Week 16 Hack Week 17

Activity

  • almost 2 years ago: pdostal liked this project.
  • about 7 years ago: slemke started this project.
  • about 7 years ago: slemke liked this project.
  • almost 8 years ago: pluskalm liked this project.
  • almost 8 years ago: slemke disliked this project.
  • almost 8 years ago: slemke liked this project.
  • almost 8 years ago: slemke disliked this project.
  • almost 8 years ago: slemke liked this project.
  • almost 8 years ago: slemke originated this project.

  • Comments

    • slemke
      almost 8 years ago by slemke | Reply

      My hack week started in a funny fashion, while it was almost 40C degree outside the postal service rang the bell. I had no idea what it was since I was not expecting anything, so I went down and picked it, it was a box from Provo weighting almost 1kg , so I assumed 'cool, my hackweek t-shirt! and maybe something else..' I opened the box and a huge coat with cap which probably would melt me, fortunately we will exit summer eventually and get colder days, on which I can use my new coat.

      My project was: Learn & Improve Qt, C++ - Project Oficina -> https://hackweek.suse.com/15/ projects/learn-and-improve-qt-c-plus-plus-project-oficina

      Code -> https://github.com/bedi1982/Oficina

      This code I learned by myself, reading man pages and googling all around, so in my mind I was pretty sure that there is bad implemented stuff, so the initial idea was to 'improve/refactor' existing code and while doing this maybe get some new ideas. And it worked very well, at least the shittiest functions I was able to refactor and make work/look decently, and I will explain just this one, as it was a good achievement in my point of view:

      On Qt on a line edit(line edit is a line on which the user enters text, like where you enter text in the web browser), on this line you can 'assign' commands on user 'actions', for example, in my case when one single letter changed on the 'line edit' an underlying function was called, what this function did?

      It created a data model with all the results from a SQL query, for each letter the user entered it opened a SQL query and recreated that model, let's use as example the word 'suse'.

      So, let's say the user is inserting the word suse, so first letter:

      s underlying function would call: select distronames from distro where distroname starts with %s%;

      u underlying function would call: select distronames from distro where distroname starts with %u%;

      s underlying function would call: select distronames from distro where distroname starts with %s%;

      e underlying function would call: select distronames from distro where distroname starts with %e%;

      This was totally insane, 4 queries for 4 letters, and a backspace would generate even more queries.

      So I researched the correct way, and the correct way is to create a proxy of the model:

      Funtion model-generator{ //Regular model: model = new QSqlTableModel(); model->setTable("Client"); model->select();

      //NEW ++//Proxy of the model: ++ proxy = new QSortFilterProxyModel(); ++ proxy->setSourceModel(model);

      //put the proxy on the interface: ++ ui->tblClientList->setModel(proxy); }

      So now all 'search' operations will be done on the proxy, not the model.

      At some points the model has to be 'regenerated' to include new data, but this is very simple, just need to call 'Function model-generator', which is fixed one query always.

    • slemke
      about 7 years ago by slemke | Reply

      Planning Hackweek 16: 1- Finish the Service type groups and create a group inclusion form; 2- Main bug tracking/fix session: I know there are several bugs, small ones, the plan is to-do a 100% coverage and swipe them all;

      Maybe: 3- Create a config file which will store database credentials; I already use the Qtsetting store includes, need to research how to create a main config file. 4- Research on qsettings, currently I have a qsettings in all form classes, there must be a way to have a single one;

    • kfreitag
      about 7 years ago by kfreitag | Reply

      If you want to be able to generate invoice documents after a service, please take a look at my project Kraft at http://volle-kraft-voraus.de . If you are interested, we will find a way to connect both projects. Let me know!

    • slemke
      over 6 years ago by slemke | Reply

      This seems really interesting, despite overall the Oficina project needs a lot of implementations and fixes, when it comes at that time I surely will look for Kraft - this was actually a topic causing me a lot of thinking on how to implement :) Thanks!

    Similar Projects

    This project is one of its kind!