csettings.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. class MdiChild;
  12. #include <QDialog>
  13. #include <QString>
  14. #include "ui_settings.h"
  15. #include "config.h"
  16. #include <gvc/gvc.h>
  17. class CFrmSettings : public QDialog
  18. {
  19. Q_OBJECT
  20. public:
  21. CFrmSettings();
  22. int runSettings(MdiChild* m);
  23. int showSettings(MdiChild* m);
  24. int drawGraph();
  25. MdiChild* getActiveWindow();
  26. QString graphData;
  27. GVC_t* gvc;
  28. private slots:
  29. void outputSlot();
  30. void addSlot();
  31. void helpSlot();
  32. void cancelSlot();
  33. void okSlot();
  34. void newSlot();
  35. void openSlot();
  36. void saveSlot();
  37. void scopeChangedSlot(int);
  38. private:
  39. //Actions
  40. Agraph_t* graph;
  41. MdiChild* activeWindow;
  42. QAction* outputAct;
  43. QAction* addAct;
  44. QAction* helpAct;
  45. QAction* cancelAct;
  46. QAction* okAct;
  47. QAction* newAct;
  48. QAction* openAct;
  49. QAction* saveAct;
  50. //METHODS
  51. bool loadLayouts();
  52. bool loadRenderers();
  53. void refreshContent();
  54. void saveContent();
  55. void doPreview(const QString &);
  56. void setActiveWindow(MdiChild* m);
  57. bool loadGraph(MdiChild* m);
  58. bool createLayout();
  59. bool renderLayout();
  60. };