1 #include "PaletteWindow.h" 14 parent->installEventFilter(
this);
47 QString instanceName = this->windowTitle();
49 QSettings settings(config.
expanded(), QSettings::NativeFormat);
50 QPoint pos = settings.value(
"pos", QPoint(300, 100)).toPoint();
51 QSize size = settings.value(
"size", QSize(900, 500)).toSize();
66 if(!this->isVisible())
return;
68 QString instanceName = this->windowTitle();
70 QSettings settings(config.
expanded(), QSettings::NativeFormat);
71 settings.setValue(
"pos", pos());
72 settings.setValue(
"size", size());
File name manipulation and expansion.
void writeSettings()
This method is called when the Palette window is closed or hidden to write the size and location sett...
bool eventFilter(QObject *o, QEvent *e)
This event filter is installed on the parent of this window.
PaletteWindow(QWidget *parent=0)
PaletteWindow constructor.
void hideEvent(QHideEvent *event)
This method ensure that the settings get written even if the Palette window was only hidden...
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
QString p_appName
Application name.
void closeEvent(QCloseEvent *event)
This method is overridden so that we can be sure to write the current settings of the Palette window...
void readSettings()
This method is called from the constructor so that when the Palette window is created, it know's it's size and location.
Namespace for ISIS/Bullet specific routines.