src/gui.cpp

changeset 412
064b0467c8de
parent 411
fd90677cec8d
child 413
a52c30a4c041
equal deleted inserted replaced
411:fd90677cec8d 412:064b0467c8de
69 }; 69 };
70 70
71 // ============================================================================= 71 // =============================================================================
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
73 // ============================================================================= 73 // =============================================================================
74 ForgeWindow::ForgeWindow() : 74 ForgeWindow::ForgeWindow() {
75 m_renderer( new GLRenderer ),
76 ui( new Ui_LDForgeUI ),
77 m_primLoaderBar( new QProgressBar ),
78 m_primLoaderWidget( new QWidget ),
79 m_msglog( new MessageManager ),
80 m_quickColors( quickColorsFromConfig() )
81 {
82 g_win = this; 75 g_win = this;
76 m_renderer = new GLRenderer;
77
78 ui = new Ui_LDForgeUI;
83 ui->setupUi (this); 79 ui->setupUi (this);
84 80
85 // Stuff the renderer into its frame 81 // Stuff the renderer into its frame
86 QVBoxLayout* rendererLayout = new QVBoxLayout (ui->rendererFrame); 82 QVBoxLayout* rendererLayout = new QVBoxLayout (ui->rendererFrame);
87 rendererLayout->addWidget (R()); 83 rendererLayout->addWidget (R());
88 84
89 connect (ui->objectList, SIGNAL (itemSelectionChanged()), this, SLOT (slot_selectionChanged())); 85 connect (ui->objectList, SIGNAL (itemSelectionChanged()), this, SLOT (slot_selectionChanged()));
90 connect (ui->objectList, SIGNAL (itemDoubleClicked (QListWidgetItem*)), this, SLOT (slot_editObject (QListWidgetItem*))); 86 connect (ui->objectList, SIGNAL (itemDoubleClicked (QListWidgetItem*)), this, SLOT (slot_editObject (QListWidgetItem*)));
91 connect (ui->fileList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem*)), this, SLOT (changeCurrentFile())); 87 connect (ui->fileList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem*)), this, SLOT (changeCurrentFile()));
92 88
93 // Init message log manager= 89 // Init message log manager
90 m_msglog = new MessageManager;
94 m_msglog->setRenderer (R()); 91 m_msglog->setRenderer (R());
95 m_renderer->setMessageLog (m_msglog);= 92 m_renderer->setMessageLog (m_msglog);
93 m_quickColors = quickColorsFromConfig();
96 slot_selectionChanged(); 94 slot_selectionChanged();
97 setStatusBar (new QStatusBar); 95 setStatusBar (new QStatusBar);
98 96
99 // Init primitive loader task stuff 97 // Init primitive loader task stuff
98 m_primLoaderBar = new QProgressBar;
99 m_primLoaderWidget = new QWidget;
100 QHBoxLayout* primLoaderLayout = new QHBoxLayout (m_primLoaderWidget); 100 QHBoxLayout* primLoaderLayout = new QHBoxLayout (m_primLoaderWidget);
101 primLoaderLayout->addWidget (new QLabel ("Loading primitives:")); 101 primLoaderLayout->addWidget (new QLabel ("Loading primitives:"));
102 primLoaderLayout->addWidget (m_primLoaderBar); 102 primLoaderLayout->addWidget (m_primLoaderBar);
103 statusBar()->addPermanentWidget (m_primLoaderWidget); 103 statusBar()->addPermanentWidget (m_primLoaderWidget);
104 m_primLoaderWidget->hide(); 104 m_primLoaderWidget->hide();

mercurial