[qet] [1804] TBT editor: logos manager: added a "Close" button.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1804
Author:   xavier
Date:     2012-05-11 19:47:42 +0200 (Fri, 11 May 2012)
Log Message:
-----------
TBT editor: logos manager: added a "Close" button.

Modified Paths:
--------------
    trunk/sources/titleblock/qettemplateeditor.cpp

Modified: trunk/sources/titleblock/qettemplateeditor.cpp
===================================================================
--- trunk/sources/titleblock/qettemplateeditor.cpp	2012-05-11 17:47:38 UTC (rev 1803)
+++ trunk/sources/titleblock/qettemplateeditor.cpp	2012-05-11 17:47:42 UTC (rev 1804)
@@ -293,7 +293,22 @@
 		if (!logo_manager_) {
 			initLogoManager();
 		}
-		logo_manager_ -> show();
+		
+		logo_manager_ -> layout() -> setContentsMargins(0, 0, 0, 0);
+		QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
+		
+		QVBoxLayout *vlayout0 = new QVBoxLayout();
+		vlayout0 -> addWidget(logo_manager_);
+		vlayout0 -> addWidget(buttons);
+		
+		QDialog d(this);
+		d.setWindowTitle(logo_manager_ -> windowTitle());
+		d.setLayout(vlayout0);
+		connect(buttons, SIGNAL(rejected()), &d, SLOT(reject()));
+		d.exec();
+		
+		// prevent the logo manager from being deleted along with the dialog
+		logo_manager_ -> setParent(this);
 	}
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/