{"action":"created","issue":{"url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/92","labels_url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/92/comments","events_url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/92/events","html_url":"https://github.com/ros-visualization/rqt_robot_plugins/issues/92","id":102743611,"number":92,"title":"rqt_robot_dashboard - change inheritance to be from QMainWindow or at least be from QWidget","user":{"login":"aleksandaratanasov","id":3254568,"avatar_url":"https://avatars.githubusercontent.com/u/3254568?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksandaratanasov","html_url":"https://github.com/aleksandaratanasov","followers_url":"https://api.github.com/users/aleksandaratanasov/followers","following_url":"https://api.github.com/users/aleksandaratanasov/following{/other_user}","gists_url":"https://api.github.com/users/aleksandaratanasov/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksandaratanasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksandaratanasov/subscriptions","organizations_url":"https://api.github.com/users/aleksandaratanasov/orgs","repos_url":"https://api.github.com/users/aleksandaratanasov/repos","events_url":"https://api.github.com/users/aleksandaratanasov/events{/privacy}","received_events_url":"https://api.github.com/users/aleksandaratanasov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-24T09:03:17Z","updated_at":"2015-08-26T08:08:07Z","closed_at":null,"body":"I'm working on a dashboard for our SR2 platform here at the KIT IPR and I can't stop asking myself why on Earth is this the way it is.\r\n\r\nFirst we have the **Plugin**, which inherits directly from **QObject** adding as little as saving, restoring and shutting itself down, which at this point is fine. However the next one is the **Dashboard**, which - note - basically mimics QMainWindow but adds a bunch of extra stuff (not enough to give an excuse for reimplementing QMainWindow) and inherits from **Plugin**.\r\n\r\nMy suggestion is to keep the extra things that are required for ROS in a separate or a set of modules and leave the rest to what is already there - the Qt classes. I find the extra amount of work one has to do in order to add basic functionality like fullscreen mode or displaying a message in a statusbar (QStatusBar can only be added to a QWidget but since Dashboard is not derived from the QWidget class one has to do various tricks and implement a whole set of otherwise existing features in order to do that) just suicidal. And with that I don't want to insult the people behind the (Rqt) Dashboard - the idea is great! The design decisions however are something that I'd like to discuss here. Especially with the lack of documentation on the Dashboard-related things it's just wasting time in order to get small things done.\r\n\r\nAnyone willing to make a small discussion about this? I'm definitely not a pro in Qt so this as well be nonsense, in which case I'd like to get an explanation what lead to this design."},"comment":{"url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/comments/134891716","html_url":"https://github.com/ros-visualization/rqt_robot_plugins/issues/92#issuecomment-134891716","issue_url":"https://api.github.com/repos/ros-visualization/rqt_robot_plugins/issues/92","id":134891716,"user":{"login":"aleksandaratanasov","id":3254568,"avatar_url":"https://avatars.githubusercontent.com/u/3254568?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksandaratanasov","html_url":"https://github.com/aleksandaratanasov","followers_url":"https://api.github.com/users/aleksandaratanasov/followers","following_url":"https://api.github.com/users/aleksandaratanasov/following{/other_user}","gists_url":"https://api.github.com/users/aleksandaratanasov/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksandaratanasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksandaratanasov/subscriptions","organizations_url":"https://api.github.com/users/aleksandaratanasov/orgs","repos_url":"https://api.github.com/users/aleksandaratanasov/repos","events_url":"https://api.github.com/users/aleksandaratanasov/events{/privacy}","received_events_url":"https://api.github.com/users/aleksandaratanasov/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T08:08:07Z","updated_at":"2015-08-26T08:08:07Z","body":">Clearly a plugin can not derive from QMainWindow since it needs to be composable with other plugins.\r\n\r\nThat is why I suggest changing the Dashboard (in particular). \r\n\r\n>Maybe you should describe what you actually want to achieve and there is a way to do that even when being a plugin.\r\n\r\nI want to use the Dashboard as both a standalone (it will be displayed in fullscreen on a relatively small touchscreen mounted on the service robot I'm working on) as well as Rqt-embeddable (it also has to also be viewable on a big desktop PC monitor where touch is not available and mouse+keyboard are the only means of input and using Rqt with multiple plugins displayed alongside each other is an option).\r\n\r\n>But I don't see why that would be a problem to add in both cases when multiple plugins are used as well as in standalone mode?\r\n\r\nBecause QWindowState is available only for QWidget and one has to implement manually resizing mechanims.\r\n\r\n> You could e.g. add a status bar to the plugin widget instead. That approach would play nicely with other plugins.\r\n\r\nThat is what I'm doing.\r\n\r\nAs I said it's the standalone side of Dashboard the is suffering a lot and not it's Plugin nature when you want to embed it in Rqt."}}