selectionsafelineedit.h (krename-4.0.9) | : | selectionsafelineedit.h (krename-4.90.90) | ||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
/*************************************************************************** | /*************************************************************************** | |||
* * | * * | |||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | * the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | * (at your option) any later version. * | |||
* * | * * | |||
***************************************************************************/ | ***************************************************************************/ | |||
#ifndef _SELECTIONSAFELINEDIT_H_ | #ifndef SELECTIONSAFELINEEDIT_H | |||
#define _SELECTIONSAFELINEDIT_H_ | #define SELECTIONSAFELINEEDIT_H | |||
#include <QLineEdit> | #include <QLineEdit> | |||
/** A QLineEdit that does not loose its selection | /** A QLineEdit that does not loose its selection | |||
* on focusout events | * on focusout events | |||
*/ | */ | |||
class SelectionSafeLineEdit : public QLineEdit { | class SelectionSafeLineEdit : public QLineEdit | |||
{ | ||||
public: | public: | |||
/** Create a SeletionSafeLineEdit that keeps its selection | /** Create a SeletionSafeLineEdit that keeps its selection | |||
* even when the widget does not have the current keyboard focus. | * even when the widget does not have the current keyboard focus. | |||
* | * | |||
* @param parent parent widget | * @param parent parent widget | |||
*/ | */ | |||
SelectionSafeLineEdit( QWidget* parent = NULL ) | explicit SelectionSafeLineEdit(QWidget *parent = nullptr) | |||
: QLineEdit( parent ) | : QLineEdit(parent) | |||
{ | { | |||
} | } | |||
protected: | protected: | |||
void focusOutEvent( QFocusEvent * ) | void focusOutEvent(QFocusEvent *) | |||
{ | { | |||
// ignore | // ignore | |||
} | } | |||
}; | }; | |||
#endif // _SELECTIONSAFELINEDIT_H_ | #endif // SELECTIONSAFELINEEDIT_H | |||
End of changes. 5 change blocks. | ||||
6 lines changed or deleted | 7 lines changed or added |