widgetwindowsmanager.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. = StarPU-Top for StarPU =
  3. Copyright (C) 2011
  4. William Braik
  5. Yann Courtois
  6. Jean-Marie Couteyen
  7. Anthony Roy
  8. This library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Lesser General Public
  10. License as published by the Free Software Foundation; either
  11. version 2.1 of the License, or (at your option) any later version.
  12. This library is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public
  17. License along with this library; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef WIDGETWINDOWSMANAGER_H
  21. #define WIDGETWINDOWSMANAGER_H
  22. #include <QMdiArea>
  23. #include <QMdiSubWindow>
  24. #include <QPointer>
  25. #include <QSettings>
  26. class MainWindow;
  27. class AbstractWidgetWindow;
  28. class WidgetWindowsManager
  29. { /* Manages the widget windows of the current session and can save
  30. their states and geometries for use in another session */
  31. public:
  32. WidgetWindowsManager(
  33. MainWindow *mainWindow,
  34. QMdiArea *mdiArea);
  35. ~WidgetWindowsManager();
  36. void displayWidgetWindow(AbstractWidgetWindow *widgetWindow) const;
  37. void flyingWindowsToMdi() const;
  38. void mdiToFlyingWindows() const;
  39. void flyingWindowToMdi(AbstractWidgetWindow *widgetWindow) const;
  40. void mdiToFlyingWindow(AbstractWidgetWindow *widgetWindow) const;
  41. void closeWidgetWindow(AbstractWidgetWindow *widgetWindow) const;
  42. void closeWidgetWindows() const;
  43. const QList<AbstractWidgetWindow*> widgetWindows() const;
  44. private:
  45. // Data
  46. MainWindow *_mainWindow;
  47. QMdiArea *_mdiArea;
  48. };
  49. #endif // WIDGETWINDOWSMANAGER_H