mirror of
https://github.com/YACReader/yacreader
synced 2025-07-20 14:04:40 -04:00
Create wrappers for the search edit and the main toolbar.
So we can hide native implementations from classes using these elements.
This commit is contained in:
committed by
Luis Ángel San Martín
parent
00f8adfa54
commit
655cdc619e
39
YACReaderLibrary/yacreader_library_search_edit.h
Normal file
39
YACReaderLibrary/yacreader_library_search_edit.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef YACREADER_LIBRARY_SEARCH_EDIT_H
|
||||
#define YACREADER_LIBRARY_SEARCH_EDIT_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include "yacreader_search_line_edit.h"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "yacreader_macosx_toolbar.h"
|
||||
#endif
|
||||
|
||||
class YACReaderLibrarySearchEdit: public QObject
|
||||
{
|
||||
public:
|
||||
#ifdef Q_OS_MAC
|
||||
YACReaderLibrarySearchEdit(YACReaderMacOSXSearchLineEdit *searchEdit);
|
||||
#endif
|
||||
YACReaderLibrarySearchEdit(YACReaderSearchLineEdit *searchEdit);
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void clearText();
|
||||
void setDisabled(bool disabled);
|
||||
void setEnabled(bool enabled);
|
||||
QString text();
|
||||
|
||||
signals:
|
||||
void filterChanged(const YACReader::SearchModifiers, QString);
|
||||
|
||||
private:
|
||||
#ifdef Q_OS_MAC
|
||||
YACReaderMacOSXSearchLineEdit *macosSearchEdit;
|
||||
#endif
|
||||
YACReaderSearchLineEdit *defaultSearchEdit;
|
||||
};
|
||||
|
||||
#endif // YACREADER_LIBRARY_SEARCH_EDIT_H
|
Reference in New Issue
Block a user