ENH: Add cross compiling support in the GUI in the same dialog that prompts for
[cmake.git] / Source / QtDialog / QCMakeWidgets.h
blob806a3b4be2fd10206180042acf09034ea8da36c8
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: QCMakeWidgets.h,v $
5 Language: C++
6 Date: $Date: 2008-05-15 23:21:01 $
7 Version: $Revision: 1.1 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
18 #ifndef QCMakeWidgets_h
19 #define QCMakeWidgets_h
21 #include <QLineEdit>
22 #include <QCompleter>
23 class QToolButton;
25 // common widgets for Qt based CMake
27 /// Editor widget for editing paths or file paths
28 class QCMakeFileEditor : public QLineEdit
30 Q_OBJECT
31 public:
32 QCMakeFileEditor(QWidget* p, const QString& var);
33 protected slots:
34 virtual void chooseFile() = 0;
35 signals:
36 void fileDialogExists(bool);
37 protected:
38 void resizeEvent(QResizeEvent* e);
39 QToolButton* ToolButton;
40 QString Variable;
43 /// editor widget for editing files
44 class QCMakePathEditor : public QCMakeFileEditor
46 Q_OBJECT
47 public:
48 QCMakePathEditor(QWidget* p = NULL, const QString& var = QString());
49 void chooseFile();
52 /// editor widget for editing paths
53 class QCMakeFilePathEditor : public QCMakeFileEditor
55 Q_OBJECT
56 public:
57 QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString());
58 void chooseFile();
61 /// completer class that returns native cmake paths
62 class QCMakeFileCompleter : public QCompleter
64 Q_OBJECT
65 public:
66 QCMakeFileCompleter(QObject* o, bool dirs);
67 virtual QString pathFromIndex(const QModelIndex& idx) const;
70 #endif