1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: QCMakeWidgets.h,v $
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
25 // common widgets for Qt based CMake
27 /// Editor widget for editing paths or file paths
28 class QCMakeFileEditor
: public QLineEdit
32 QCMakeFileEditor(QWidget
* p
, const QString
& var
);
34 virtual void chooseFile() = 0;
36 void fileDialogExists(bool);
38 void resizeEvent(QResizeEvent
* e
);
39 QToolButton
* ToolButton
;
43 /// editor widget for editing files
44 class QCMakePathEditor
: public QCMakeFileEditor
48 QCMakePathEditor(QWidget
* p
= NULL
, const QString
& var
= QString());
52 /// editor widget for editing paths
53 class QCMakeFilePathEditor
: public QCMakeFileEditor
57 QCMakeFilePathEditor(QWidget
* p
= NULL
, const QString
& var
= QString());
61 /// completer class that returns native cmake paths
62 class QCMakeFileCompleter
: public QCompleter
66 QCMakeFileCompleter(QObject
* o
, bool dirs
);
67 virtual QString
pathFromIndex(const QModelIndex
& idx
) const;