--- a/src/dialogs.cpp Tue Jul 02 00:31:40 2013 +0300 +++ b/src/dialogs.cpp Tue Jul 02 01:42:43 2013 +0300 @@ -351,89 +351,6 @@ // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= -NewPartDialog::NewPartDialog (QWidget* parent, Qt::WindowFlags f) : QDialog (parent, f) { - lb_brickIcon = new QLabel; - lb_brickIcon->setPixmap (getIcon ("brick")); - - lb_name = new QLabel ("Title:"); - le_name = new QLineEdit; - le_name->setMinimumWidth (384); - - lb_author = new QLabel ("Author:"); - le_author = new QLineEdit; - - rb_license = new RadioBox ("License", { - "CCAL Redistributable", - "Non-redistributable", - "None", - }, CCAL); - - rb_BFC = new RadioBox ("BFC Winding", { - "CCW", - "CW", - "None" - }, CCW); - - QHBoxLayout* boxes = new QHBoxLayout; - boxes->addWidget (rb_license); - boxes->addWidget (rb_BFC); - - QGridLayout* layout = new QGridLayout; - layout->addWidget (lb_brickIcon, 0, 0); - layout->addWidget (lb_name, 0, 1); - layout->addWidget (le_name, 0, 2); - layout->addWidget (lb_author, 1, 1); - layout->addWidget (le_author, 1, 2); - layout->addLayout (boxes, 2, 1, 1, 2); - layout->addWidget (makeButtonBox (*this), 3, 2); - - setLayout (layout); - setWindowTitle ("New Part"); -} - -// ============================================================================= -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -// ============================================================================= -void NewPartDialog::StaticDialog () { - NewPartDialog dlg (g_win); - if (dlg.exec () == false) - return; - - newFile (); - - short idx; - str author = dlg.le_author->text (); - - idx = dlg.rb_BFC->value (); - const LDBFC::Type BFCType = - (idx == CCW) ? LDBFC::CertifyCCW : - (idx == CW) ? LDBFC::CertifyCW : - LDBFC::NoCertify; - - idx = dlg.rb_license->value (); - const str license = - (idx == CCAL) ? CALicense : - (idx == NonCA) ? NonCALicense : - ""; - - *g_curfile << new LDComment (dlg.le_name->text ()); - *g_curfile << new LDComment ("Name: <untitled>.dat"); - *g_curfile << new LDComment (fmt ("Author: %1", author)); - *g_curfile << new LDComment (fmt ("!LDRAW_ORG Unofficial_Part")); - - if( license != "" ) - *g_curfile << new LDComment ( license ); - - *g_curfile << new LDEmpty; - *g_curfile << new LDBFC (BFCType); - *g_curfile << new LDEmpty; - - g_win->fullRefresh (); -} - -// ============================================================================= -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -// ============================================================================= RotationPointDialog::RotationPointDialog (QWidget* parent, Qt::WindowFlags f) : QDialog (parent, f) { rb_rotpoint = new RadioBox ("Rotation Point", { "Object center", "Custom" }, 0, Qt::Vertical, this); connect (rb_rotpoint, SIGNAL (valueChanged (int)), this, SLOT (radioBoxChanged ()));