Removed more obsolete code

Thu, 04 Jul 2013 20:09:25 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 04 Jul 2013 20:09:25 +0300
changeset 333
905027940c51
parent 332
3013acb1df53
child 334
bb3a0e5ebe53

Removed more obsolete code

src/dialogs.cpp file | annotate | diff | comparison | revisions
src/dialogs.h file | annotate | diff | comparison | revisions
--- a/src/dialogs.cpp	Thu Jul 04 20:08:14 2013 +0300
+++ b/src/dialogs.cpp	Thu Jul 04 20:09:25 2013 +0300
@@ -153,51 +153,6 @@
 	dbb_buttons->button (QDialogButtonBox::Ok)->setEnabled (enable);
 }
 
-// =============================================================================
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-// =============================================================================
-SetContentsDialog::SetContentsDialog (QWidget* parent, Qt::WindowFlags f) : QDialog (parent, f) {
-	lb_error = new QLabel;
-	lb_errorIcon = new QLabel;
-	lb_contents = new QLabel ("LDraw code:", parent);
-	
-	le_contents = new QLineEdit (parent);
-	le_contents->setWhatsThis ("The LDraw code of this object. The code written "
-		"here is expected to be valid LDraw code, invalid code here results "
-		"the object being turned into an error object. Please do refer to the "
-		"<a href=\"http://www.ldraw.org/article/218.html\">official file format "
-		"standard</a> for further information.");
-	le_contents->setMinimumWidth (384);
-	
-	QHBoxLayout* bottomRow = new QHBoxLayout;
-	bottomRow->addWidget (lb_errorIcon);
-	bottomRow->addWidget (lb_error);
-	bottomRow->addWidget (makeButtonBox (*this));
-	
-	QVBoxLayout* layout = new QVBoxLayout (this);
-	layout->addWidget (lb_contents);
-	layout->addWidget (le_contents);
-	layout->addLayout (bottomRow);
-	
-	setWindowIcon (getIcon ("set-contents"));
-}
-
-void SetContentsDialog::setObject (LDObject* obj) {
-	le_contents->setText (obj->raw ());
-	
-	if (obj->getType() == LDObject::Gibberish) {
-		lb_error->setText (fmt ("<span style=\"color: #900\">%1</span>",
-			static_cast<LDGibberish*> (obj)->reason));
-		
-		QPixmap errorPixmap = getIcon ("error").scaledToHeight (16);
-		lb_errorIcon->setPixmap (errorPixmap);
-	}
-}
-
-str SetContentsDialog::text () const {
-	return le_contents->text ();
-}
-
 // =================================================================================================
 LDrawPathDialog::LDrawPathDialog (const bool validDefault, QWidget* parent, Qt::WindowFlags f)
 	: QDialog (parent, f), m_validDefault (validDefault)
--- a/src/dialogs.h	Thu Jul 04 20:08:14 2013 +0300
+++ b/src/dialogs.h	Thu Jul 04 20:09:25 2013 +0300
@@ -65,24 +65,6 @@
 };
 
 // =============================================================================
-// SetContentsDialog
-//
-// Performs the Set Contents dialog on the given LDObject. Object's contents
-// are exposed to the user and is reinterpreted if the user accepts the new
-// contents.
-// =============================================================================
-class SetContentsDialog : public QDialog {
-public:
-	explicit SetContentsDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
-	str text () const;
-	void setObject (LDObject* obj);
-	
-private:
-	QLabel* lb_contents, *lb_errorIcon, *lb_error;
-	QLineEdit* le_contents;
-};
-
-// =============================================================================
 class LDrawPathDialog : public QDialog {
 	Q_OBJECT
 	

mercurial