Gerrit: Allow custom query

Change-Id: I8ee0967a8f0013c785bc4d6e98ff7b634f488e97
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-06-11 19:01:02 +03:00
committed by Friedemann Kleint
parent a8debd265f
commit cb8c8ca19e
4 changed files with 125 additions and 40 deletions

View File

@@ -33,6 +33,8 @@
#ifndef GERRIT_INTERNAL_GERRITDIALOG_H
#define GERRIT_INTERNAL_GERRITDIALOG_H
#include <utils/filterlineedit.h>
#include <QDialog>
#include <QSharedPointer>
@@ -47,15 +49,30 @@ class QDialogButtonBox;
class QTextBrowser;
QT_END_NAMESPACE
namespace Utils {
class FilterLineEdit;
}
namespace Gerrit {
namespace Internal {
class GerritParameters;
class GerritModel;
class GerritChange;
class QueryValidatingLineEdit : public Utils::FilterLineEdit
{
Q_OBJECT
public:
explicit QueryValidatingLineEdit(QWidget *parent = 0);
void setTextColor(const QColor &c);
public slots:
void setValid();
void setInvalid();
private:
bool m_valid;
const QColor m_okTextColor;
const QColor m_errorTextColor;
};
class GerritDialog : public QDialog
{
Q_OBJECT
@@ -88,6 +105,7 @@ private:
GerritModel *m_model;
QTreeView *m_treeView;
QTextBrowser *m_detailsBrowser;
QueryValidatingLineEdit *m_queryLineEdit;
Utils::FilterLineEdit *m_filterLineEdit;
QDialogButtonBox *m_buttonBox;
QPushButton *m_displayButton;