Fix no newlines warnings. Patch by Peter Oberndorfer
[kdevelopdvcssupport.git] / shell / settings / runpreferences / projectitemlineedit.h
blob238d122685d0e887fe28055f3473e06669879058
1 /***************************************************************************
2 * Copyright 2008 Aleix Pol <aleixpol@gmail.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU Library General Public License as *
6 * published by the Free Software Foundation; either version 2 of the *
7 * License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Library General Public *
15 * License along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef PROJECTITEMLINEEDIT_H
21 #define PROJECTITEMLINEEDIT_H
23 #include <QCompleter>
24 #include <QStringList>
25 #include <KLineEdit>
27 class ProjectItemCompleter : public QCompleter
29 Q_OBJECT
30 public:
31 ProjectItemCompleter(QAbstractItemModel* model, QObject* parent=0);
33 QString pathFromIndex(const QModelIndex& index) const;
34 QString separator() const { return sep; }
35 QStringList splitPath(const QString &path) const { return path.split(sep); }
37 private:
38 QAbstractItemModel *mModel;
39 QString sep;
42 class ProjectItemLineEdit : public KLineEdit
44 Q_OBJECT
45 public:
46 ProjectItemLineEdit(QWidget* parent=0);
48 public Q_SLOTS:
49 void updated(const QString& newText);
50 void correctnessChange(bool correct);
52 Q_SIGNALS:
53 void correctnessChanged(bool isCorrect);
56 #endif