KeineAhnung
27th April 2014, 10:58
Hi there,
I am trying to get an idea of how to create a graphical class that allows me to display the values stored in a QVector. The QVector is filled with custom class objects that hold a lot of information. The most important values should be displayed for each element of the QVector. To get the full information you should be able to click on the graphical element but it should only be possible to have one element "active". So maybe a combination of a custom BushButton and RadioButton. Is something like this possible? The data within the QVector can change. If data is updated it should be also updated in the graphical element.
I have the data of several weather stations (temp., humidity, wind etc.), which is stored in an object of the custom class WeatherStation for each weather station. The location and the current temperature should be displays on the "button" for each weather station. If the station button is clicked the temperature curve over the last 24 hours from that station should be displayed in the main window. If another station is selected this curve shall be displayed.
My initial idea was to create a new QGroupBox class as button or with a button. Add a background image and a table to view the data and maybe some labels for with non changing information. If clicked I wanted to add a highlighted frame and sent the index of the QVector to display the full data. If another "button" is clicked the frame changes.
Within the main window I wanted to do a grid view and line up all the QGroupBoxes with the information of the QVector.
Is this a good plan? Could this work or is there a better approach to that?
I do not ask you write the code for that I just need some hints to the right direction. At the moment I have no clue what elements I should use and what to read to get what I want.
Thanks a lot!
I am trying to get an idea of how to create a graphical class that allows me to display the values stored in a QVector. The QVector is filled with custom class objects that hold a lot of information. The most important values should be displayed for each element of the QVector. To get the full information you should be able to click on the graphical element but it should only be possible to have one element "active". So maybe a combination of a custom BushButton and RadioButton. Is something like this possible? The data within the QVector can change. If data is updated it should be also updated in the graphical element.
I have the data of several weather stations (temp., humidity, wind etc.), which is stored in an object of the custom class WeatherStation for each weather station. The location and the current temperature should be displays on the "button" for each weather station. If the station button is clicked the temperature curve over the last 24 hours from that station should be displayed in the main window. If another station is selected this curve shall be displayed.
My initial idea was to create a new QGroupBox class as button or with a button. Add a background image and a table to view the data and maybe some labels for with non changing information. If clicked I wanted to add a highlighted frame and sent the index of the QVector to display the full data. If another "button" is clicked the frame changes.
Within the main window I wanted to do a grid view and line up all the QGroupBoxes with the information of the QVector.
Is this a good plan? Could this work or is there a better approach to that?
I do not ask you write the code for that I just need some hints to the right direction. At the moment I have no clue what elements I should use and what to read to get what I want.
Thanks a lot!