summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-11-09 03:28:50 +0000
committerTim E. Real <termtech@rogers.com>2010-11-09 03:28:50 +0000
commit6f006e0573dc0ec5cef0de2e9de9e9b09e3283ea (patch)
treee05bb34516d9ae3928d24833f7301f13ebc4f570
parent8524da8e014372100b8ee4a579e3b8a4635c9a12 (diff)
Updated some window flags (stay on top, delete on close...)
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/app.cpp3
-rw-r--r--muse2/muse/cliplist/cliplist.cpp3
-rw-r--r--muse2/muse/cobject.cpp1
-rw-r--r--muse2/muse/cobject.h2
-rw-r--r--muse2/muse/instruments/editinstrument.h2
-rw-r--r--muse2/muse/marker/markerview.cpp4
-rw-r--r--muse2/muse/mixer/rack.cpp3
-rw-r--r--muse2/muse/mixer/strip.cpp3
-rw-r--r--muse2/muse/mplugins/rhythm.h2
-rw-r--r--muse2/muse/transport.cpp3
-rw-r--r--muse2/muse/widgets/bigtime.cpp4
-rw-r--r--muse2/synti/fluid/fluidgui.cpp2
-rw-r--r--muse2/synti/organ/organgui.cpp2
-rw-r--r--muse2/synti/vam/vamgui.cpp2
15 files changed, 23 insertions, 14 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index c8e9d8c3..0a3f0fd3 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,6 +1,7 @@
08.11.2010
- Add missing link to libdl.so. Caused bulid failure on Fedora 14 (Orcan)
- Fixed strip name label colours, also name label auto-font-sizing. (Tim)
+ - Updated some window flags (stay on top, delete on close...) (Tim)
07.11.2010
- Mixer is fixed and converted to QT4. (Tim)
- Conversion of TLLayout class to QT4.
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index f0d622b7..7f292feb 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -3518,7 +3518,8 @@ int main(int argc, char* argv[])
if (!splsh.isNull()) {
QSplashScreen* muse_splash = new QSplashScreen(splsh,
- Qt::WStyle_StaysOnTop | Qt::WDestructiveClose);
+ Qt::WindowStaysOnTopHint);
+ muse_splash->setAttribute(Qt::WA_DeleteOnClose); // Possibly also Qt::X11BypassWindowManagerHint
muse_splash->show();
QTimer* stimer = new QTimer(0);
muse_splash->connect(stimer, SIGNAL(timeout()), muse_splash, SLOT(close()));
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 92002032..30b269d3 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -103,8 +103,9 @@ QString ClipItem::text(int col) const
//---------------------------------------------------------
ClipListEdit::ClipListEdit()
- : TopWin(0, "cliplist", Qt::WType_TopLevel /*|WDestructiveClose*/)
+ : TopWin(0, "cliplist", Qt::Window)
{
+ //setAttribute(Qt::WA_DeleteOnClose);
setCaption(tr("MusE: Clip List Editor"));
editor = new ClipListEditorBase(this, "edit");
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index 09338156..8f12edf0 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -59,6 +59,7 @@ void TopWin::writeStatus(int level, Xml& xml) const
TopWin::TopWin(QWidget* parent, const char* name,
Qt::WFlags f) : QMainWindow(parent, name, f)
{
+ setAttribute(Qt::WA_DeleteOnClose);
// Allow multiple rows. Tim.
//setDockNestingEnabled(true);
setIconSize(ICON_SIZE);
diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h
index 416c0974..4141d40c 100644
--- a/muse2/muse/cobject.h
+++ b/muse2/muse/cobject.h
@@ -29,7 +29,7 @@ class TopWin : public QMainWindow
virtual void readStatus(Xml&);
virtual void writeStatus(int, Xml&) const;
TopWin(QWidget* parent=0, const char* name=0,
- Qt::WFlags f = Qt::WType_TopLevel|Qt::WDestructiveClose);
+ Qt::WFlags f = Qt::Window);
};
//---------------------------------------------------------
diff --git a/muse2/muse/instruments/editinstrument.h b/muse2/muse/instruments/editinstrument.h
index ef01f525..25a5993f 100644
--- a/muse2/muse/instruments/editinstrument.h
+++ b/muse2/muse/instruments/editinstrument.h
@@ -85,7 +85,7 @@ class EditInstrument : public EditInstrumentBase {
void ctrlNullParamLChanged(int);
public:
- EditInstrument(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = Qt::WType_TopLevel);
+ EditInstrument(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = Qt::Window);
};
#endif
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index eb210829..910d1cf3 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -152,8 +152,10 @@ void MarkerView::closeEvent(QCloseEvent* e)
//---------------------------------------------------------
MarkerView::MarkerView(QWidget* parent)
- : TopWin(parent, "markerview", Qt::WType_TopLevel /*| WDestructiveClose*/)
+ : TopWin(parent, "markerview", Qt::Window /*| WDestructiveClose*/)
{
+ //setAttribute(Qt::WA_DeleteOnClose);
+
setCaption(tr("MusE: Marker"));
QAction* markerAdd = new QAction(QIcon(*flagIcon), tr("add marker"), this);
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index ae5d34b7..1fbef665 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -87,8 +87,9 @@ void RackSlot::paint(QPainter* painter)
//---------------------------------------------------------
EffectRack::EffectRack(QWidget* parent, AudioTrack* t)
- : Q3ListBox(parent, "Rack", Qt::WDestructiveClose)
+ : Q3ListBox(parent, "Rack")
{
+ setAttribute(Qt::WA_DeleteOnClose);
track = t;
setFont(config.fonts[1]);
diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp
index 720b272d..99347862 100644
--- a/muse2/muse/mixer/strip.cpp
+++ b/muse2/muse/mixer/strip.cpp
@@ -156,8 +156,9 @@ void Strip::soloToggled(bool val)
//---------------------------------------------------------
Strip::Strip(QWidget* parent, Track* t)
- : QFrame(parent, Qt::WDestructiveClose)
+ : QFrame(parent)
{
+ setAttribute(Qt::WA_DeleteOnClose);
iR = 0;
oR = 0;
diff --git a/muse2/muse/mplugins/rhythm.h b/muse2/muse/mplugins/rhythm.h
index 013fba08..064948d8 100644
--- a/muse2/muse/mplugins/rhythm.h
+++ b/muse2/muse/mplugins/rhythm.h
@@ -185,7 +185,7 @@ class RhythmGen : public RhythmBase
public:
// virtual void OnMenuCommand(int id);
// virtual void OnSize(int w, int h);
- RhythmGen(QWidget* parent = 0, const char* name = 0, Qt::WFlags fo = Qt::WType_TopLevel);
+ RhythmGen(QWidget* parent = 0, const char* name = 0, Qt::WFlags fo = Qt::Window);
virtual ~RhythmGen();
// void OnPaint();
// void GenRhythm();
diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp
index 74aa75ac..5d4add66 100644
--- a/muse2/muse/transport.cpp
+++ b/muse2/muse/transport.cpp
@@ -208,7 +208,8 @@ void Transport::setRecord(bool flag)
Transport::Transport(QWidget*, const char* name)
// : QWidget(0, name, WStyle_Customize | WType_TopLevel | WStyle_Tool
//| WStyle_NoBorder | WStyle_StaysOnTop)
- : QWidget(0, name, Qt::WStyle_Customize | Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop)
+ //: QWidget(0, name, Qt::WStyle_Customize | Qt::Window | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop)
+ : QWidget(0, name, Qt::Window | Qt::WindowStaysOnTopHint) // Possibly also Qt::X11BypassWindowManagerHint
{
setCaption(QString("Muse: Transport"));
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp
index 16cfe071..0c88f045 100644
--- a/muse2/muse/widgets/bigtime.cpp
+++ b/muse2/muse/widgets/bigtime.cpp
@@ -27,11 +27,11 @@ extern int mtcType;
//---------------------------------------------------------
BigTime::BigTime(QWidget* parent)
- : QWidget(parent, 0, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop)
+ : QWidget(parent, 0, Qt::Window | Qt::WindowStaysOnTopHint) // Possibly also Qt::X11BypassWindowManagerHint
{
tickmode = true;
- dwin = new QWidget(this, "bigtime-dwin", Qt::WStyle_StaysOnTop);
+ dwin = new QWidget(this, "bigtime-dwin", Qt::WindowStaysOnTopHint); // Possibly also Qt::X11BypassWindowManagerHint
dwin->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
fmtButton = new QCheckBox(QString(""), this);
fmtButton->resize(18,18);
diff --git a/muse2/synti/fluid/fluidgui.cpp b/muse2/synti/fluid/fluidgui.cpp
index e5677bcb..909b5086 100644
--- a/muse2/synti/fluid/fluidgui.cpp
+++ b/muse2/synti/fluid/fluidgui.cpp
@@ -29,7 +29,7 @@
//---------------------------------------------------------
FLUIDGui::FLUIDGui()
- : FLUIDGuiBase(0, "fluidgui", Qt::WType_TopLevel), MessGui()
+ : FLUIDGuiBase(0, "fluidgui", Qt::Window), MessGui()
{
connect(fdialogButton, SIGNAL(clicked()), SLOT(soundFontFileDialog()));
connect(loadButton, SIGNAL(clicked()), SLOT(loadFont()));
diff --git a/muse2/synti/organ/organgui.cpp b/muse2/synti/organ/organgui.cpp
index 2f68b655..43b754aa 100644
--- a/muse2/synti/organ/organgui.cpp
+++ b/muse2/synti/organ/organgui.cpp
@@ -34,7 +34,7 @@
//---------------------------------------------------------
OrganGui::OrganGui()
- : OrganGuiBase(0, "organgui", Qt::WType_TopLevel), MessGui()
+ : OrganGuiBase(0, "organgui", Qt::Window), MessGui()
{
QSocketNotifier* s = new QSocketNotifier(readFd, QSocketNotifier::Read);
connect(s, SIGNAL(activated(int)), SLOT(readMessage(int)));
diff --git a/muse2/synti/vam/vamgui.cpp b/muse2/synti/vam/vamgui.cpp
index 2a3a5e72..4d33d5d2 100644
--- a/muse2/synti/vam/vamgui.cpp
+++ b/muse2/synti/vam/vamgui.cpp
@@ -177,7 +177,7 @@ void Preset::writeConfiguration(Xml& xml, int level)
//---------------------------------------------------------
VAMGui::VAMGui()
- : VAMGuiBase(0, "vamgui", Qt::WType_TopLevel),
+ : VAMGuiBase(0, "vamgui", Qt::Window),
MessGui()
{
QSocketNotifier* s = new QSocketNotifier(readFd, QSocketNotifier::Read);