mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -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
55
YACReaderLibrary/yacreader_library_toolbar.h
Normal file
55
YACReaderLibrary/yacreader_library_toolbar.h
Normal file
@ -0,0 +1,55 @@
|
||||
#ifndef YACREADER_LIBRARY_TOOLBAR_H
|
||||
#define YACREADER_LIBRARY_TOOLBAR_H
|
||||
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "yacreader_main_toolbar.h"
|
||||
#ifdef Q_OS_MAC
|
||||
#include "yacreader_macosx_toolbar.h"
|
||||
#endif
|
||||
|
||||
#include "yacreader_library_search_edit.h"
|
||||
|
||||
class YACReaderLibraryToolbar: public QObject
|
||||
{
|
||||
public:
|
||||
YACReaderLibraryToolbar(QMainWindow *mainWindow, bool isMacosNative, bool useNativeFullScreen, QSettings *settings);
|
||||
|
||||
QWidget * widget() { return defaultToolbar; }
|
||||
|
||||
QAction * backAction;
|
||||
QAction * forwardAction;
|
||||
|
||||
QAction * optionsAction;
|
||||
QAction * serverConfigAction;
|
||||
QAction * toggleComicsViewAction;
|
||||
|
||||
QAction * helpAboutAction;
|
||||
|
||||
QAction * toggleFullScreenAction = nullptr;
|
||||
|
||||
YACReaderLibrarySearchEdit *searchEdit;
|
||||
public slots:
|
||||
void show();
|
||||
void hide();
|
||||
|
||||
void updateViewSelectorIcon(const QIcon &icon);
|
||||
|
||||
void setDisabled(bool disabled);
|
||||
|
||||
private:
|
||||
QMainWindow *mainWindow;
|
||||
bool isMacosNative;
|
||||
bool useNativeFullScreen;
|
||||
QSettings * settings;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
YACReaderMacOSXToolbar *macosxToolbar;
|
||||
#endif
|
||||
|
||||
YACReaderMainToolBar *defaultToolbar = nullptr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // YACREADER_LIBRARY_TOOLBAR_H
|
Reference in New Issue
Block a user