DatabaseWindow now provides some functionality to its child components through the IDatabaseWindow interface.
This way children do not need to include the full header to get access to some utility functions for changing the titles and icons of tabpages (and in fact do not need to know that there are tabs, could be something else)
This commit is contained in:
parent
6d4df99100
commit
1a2ec6a224
6 changed files with 84 additions and 135 deletions
20
pglab/IDatabaseWindow.h
Normal file
20
pglab/IDatabaseWindow.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef IDATABASEWINDOW_H
|
||||
#define IDATABASEWINDOW_H
|
||||
|
||||
#include <QIcon>
|
||||
#include <QString>
|
||||
|
||||
class OpenDatabase;
|
||||
class QWidget;
|
||||
/** Abstract class definition to make some functions
|
||||
* available to other classes without having to know everything about the window.
|
||||
*/
|
||||
class IDatabaseWindow {
|
||||
public:
|
||||
virtual void setTitleForWidget(QWidget* widget, QString title, QString hint) = 0;
|
||||
virtual void setIconForWidget(QWidget* widget, QIcon icon) = 0;
|
||||
virtual std::shared_ptr<OpenDatabase> openDatabase() = 0;
|
||||
virtual void showStatusBarMessage(QString message) = 0;
|
||||
};
|
||||
|
||||
#endif // IDATABASEWINDOW_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue