2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-12 16:36:33 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
|
|
|
** Contact: http://www.qt-project.org/legal
|
2008-12-12 16:36:33 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-12 16:36:33 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2008-12-12 16:36:33 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-12 16:36:33 +01:00
|
|
|
|
|
|
|
|
#ifndef COMPLETIONSETTINGSPAGE_H
|
|
|
|
|
#define COMPLETIONSETTINGSPAGE_H
|
|
|
|
|
|
2011-12-07 15:05:02 +01:00
|
|
|
#include "commentssettings.h"
|
|
|
|
|
|
2010-05-10 18:30:09 +02:00
|
|
|
#include <texteditor/completionsettings.h>
|
2010-04-12 15:53:17 +02:00
|
|
|
#include <texteditor/texteditoroptionspage.h>
|
2008-12-12 16:36:33 +01:00
|
|
|
|
2011-11-23 15:15:01 +00:00
|
|
|
namespace CppTools {
|
|
|
|
|
namespace Internal {
|
2008-12-12 16:36:33 +01:00
|
|
|
|
2011-12-07 15:05:02 +01:00
|
|
|
namespace Ui {
|
|
|
|
|
class CompletionSettingsPage;
|
|
|
|
|
}
|
2008-12-12 16:36:33 +01:00
|
|
|
|
2010-05-10 18:30:09 +02:00
|
|
|
// TODO: Move this class to the text editor plugin
|
|
|
|
|
|
2010-04-12 15:53:17 +02:00
|
|
|
class CompletionSettingsPage : public TextEditor::TextEditorOptionsPage
|
2008-12-12 16:36:33 +01:00
|
|
|
{
|
2009-04-16 19:42:58 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
2008-12-12 16:36:33 +01:00
|
|
|
public:
|
2011-12-07 15:05:02 +01:00
|
|
|
CompletionSettingsPage(QObject *parent);
|
2008-12-18 09:00:22 +01:00
|
|
|
~CompletionSettingsPage();
|
2008-12-12 16:36:33 +01:00
|
|
|
|
|
|
|
|
QWidget *createPage(QWidget *parent);
|
2009-01-13 15:41:33 +01:00
|
|
|
void apply();
|
2010-12-02 18:28:16 +01:00
|
|
|
void finish();
|
2012-05-22 11:17:13 +02:00
|
|
|
bool matches(const QString &) const;
|
2008-12-12 16:36:33 +01:00
|
|
|
|
2011-12-07 15:05:02 +01:00
|
|
|
const CommentsSettings &commentsSettings() const;
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void commentsSettingsChanged(const CppTools::CommentsSettings &settings);
|
|
|
|
|
|
2008-12-12 16:36:33 +01:00
|
|
|
private:
|
2010-05-10 18:30:09 +02:00
|
|
|
TextEditor::CaseSensitivity caseSensitivity() const;
|
2010-07-15 16:05:43 +02:00
|
|
|
TextEditor::CompletionTrigger completionTrigger() const;
|
2009-12-09 19:08:14 +01:00
|
|
|
|
2011-12-07 15:05:02 +01:00
|
|
|
bool requireCommentsSettingsUpdate() const;
|
|
|
|
|
|
2011-11-23 15:15:01 +00:00
|
|
|
Ui::CompletionSettingsPage *m_page;
|
2009-11-20 16:55:23 +01:00
|
|
|
QString m_searchKeywords;
|
2011-12-07 15:05:02 +01:00
|
|
|
CommentsSettings m_commentsSettings;
|
2008-12-12 16:36:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CppTools
|
|
|
|
|
|
|
|
|
|
#endif // COMPLETIONSETTINGSPAGE_H
|