mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
new class for controlling navigation in LibraryWindow (NavigationController), code refactoring
This commit is contained in:
@ -17,6 +17,7 @@ public:
|
||||
public slots:
|
||||
QString text();
|
||||
void clear();
|
||||
void clearText(); //no signal emited
|
||||
void setDisabled(bool disabled);
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
|
@ -342,6 +342,12 @@ void YACReaderMacOSXSearchLineEdit::clear()
|
||||
emit filterChanged(YACReader::NoModifiers, "");
|
||||
}
|
||||
|
||||
void YACReaderMacOSXSearchLineEdit::clearText()
|
||||
{
|
||||
//TODO be sure that this will not generate any event....
|
||||
[((NSTextField *)nstextfield) setStringValue:@""];
|
||||
}
|
||||
|
||||
void YACReaderMacOSXSearchLineEdit::setDisabled(bool disabled)
|
||||
{
|
||||
[((NSTextField *)nstextfield) setEnabled:!disabled];
|
||||
|
@ -70,6 +70,13 @@ YACReaderSearchLineEdit::YACReaderSearchLineEdit(QWidget *parent)
|
||||
connect(this,SIGNAL(textChanged(QString)),this,SLOT(processText(QString)));
|
||||
}
|
||||
|
||||
void YACReaderSearchLineEdit::clearText()
|
||||
{
|
||||
disconnect(this,SIGNAL(textChanged(QString)),this,SLOT(processText(QString)));
|
||||
clear();
|
||||
connect(this,SIGNAL(textChanged(QString)),this,SLOT(processText(QString)));
|
||||
}
|
||||
|
||||
//modifiers are not returned
|
||||
const QString YACReaderSearchLineEdit::text()
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ class YACReaderSearchLineEdit : public QLineEdit
|
||||
|
||||
public:
|
||||
YACReaderSearchLineEdit(QWidget *parent = 0);
|
||||
void clearText(); //no signal emited;
|
||||
const QString text();
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user