CMakeSetupDialog.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef CMakeSetupDialog_h
  14. #define CMakeSetupDialog_h
  15. #include "QCMake.h"
  16. #include <QMainWindow>
  17. #include <QThread>
  18. #include "ui_CMakeSetupDialog.h"
  19. class QCMakeThread;
  20. class CMakeCacheModel;
  21. class QProgressBar;
  22. class QToolButton;
  23. /// Qt user interface for CMake
  24. class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog
  25. {
  26. Q_OBJECT
  27. public:
  28. CMakeSetupDialog();
  29. ~CMakeSetupDialog();
  30. protected slots:
  31. void initialize();
  32. void doConfigure();
  33. void doOk();
  34. void doHelp();
  35. void doInterrupt();
  36. void finishConfigure(int error);
  37. void finishGenerate(int error);
  38. void error(const QString& title, const QString& message, bool* cancel);
  39. void doSourceBrowse();
  40. void doBinaryBrowse();
  41. void updateSourceDirectory(const QString& dir);
  42. void setBinaryDirectory(const QString& dir);
  43. void showProgress(const QString& msg, float percent);
  44. void setEnabledState(bool);
  45. //void promptForGenerator();
  46. protected:
  47. void closeEvent(QCloseEvent*);
  48. QCMakeThread* CMakeThread;
  49. QProgressBar* ProgressBar;
  50. QToolButton* InterruptButton;
  51. };
  52. // QCMake instance on a thread
  53. class QCMakeThread : public QThread
  54. {
  55. Q_OBJECT
  56. public:
  57. QCMakeThread(QObject* p);
  58. QCMake* cmakeInstance() const;
  59. signals:
  60. void cmakeInitialized();
  61. protected slots:
  62. void processEvents();
  63. protected:
  64. virtual void run();
  65. QCMake* CMakeInstance;
  66. };
  67. #endif // CMakeSetupDialog_h