goat3d

annotate goatview/src/goatview.cc @ 83:57e745dd13c2

almost working
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 12 May 2014 07:22:52 +0300
parents 70b7c41a4f17
children 022b13ed975b
rev   line source
nuclear@78 1 #include <stdio.h>
nuclear@82 2 #include "opengl.h"
nuclear@76 3 #include <QtOpenGL/QtOpenGL>
nuclear@76 4 #include <vmath/vmath.h>
nuclear@73 5 #include "goatview.h"
nuclear@74 6 #include "goat3d.h"
nuclear@74 7
nuclear@82 8 static void update_tree(QTreeWidget *tree);
nuclear@82 9 static void add_tree(QTreeWidget *tree, goat3d_node *node, QTreeWidgetItem *parent);
nuclear@82 10
nuclear@78 11 static void draw_node(goat3d_node *node);
nuclear@82 12 static void draw_mesh(goat3d_mesh *mesh);
nuclear@78 13
nuclear@74 14 goat3d *scene;
nuclear@75 15
nuclear@75 16 static long anim_time;
nuclear@75 17 static float cam_theta, cam_phi, cam_dist = 8;
nuclear@76 18 static float fov = 60.0;
nuclear@82 19 static bool use_nodes = true;
nuclear@83 20 static bool use_lighting = true;
nuclear@75 21
nuclear@82 22
nuclear@82 23 GoatView::GoatView()
nuclear@82 24 {
nuclear@82 25 glview = 0;
nuclear@82 26
nuclear@83 27 QSettings *settings = new QSettings;
nuclear@83 28 resize(settings->value("main/size", QSize(1024, 768)).toSize());
nuclear@83 29 move(settings->value("main/pos", QPoint(100, 100)).toPoint());
nuclear@83 30 use_nodes = settings->value("use_nodes", true).toBool();
nuclear@83 31 use_lighting = settings->value("use_lighting", true).toBool();
nuclear@83 32 delete settings;
nuclear@83 33
nuclear@83 34 make_center(); // must be first
nuclear@82 35 make_menu();
nuclear@82 36 make_dock();
nuclear@82 37
nuclear@82 38 statusBar();
nuclear@82 39
nuclear@82 40 setWindowTitle("GoatView");
nuclear@82 41 }
nuclear@82 42
nuclear@82 43 GoatView::~GoatView()
nuclear@82 44 {
nuclear@82 45 }
nuclear@82 46
nuclear@83 47 void GoatView::closeEvent(QCloseEvent *ev)
nuclear@83 48 {
nuclear@83 49 QSettings *settings = new QSettings;
nuclear@83 50 settings->setValue("main/size", size());
nuclear@83 51 settings->setValue("main/pos", pos());
nuclear@83 52 settings->setValue("use_nodes", use_nodes);
nuclear@83 53 settings->setValue("use_lighting", use_lighting);
nuclear@83 54 delete settings;
nuclear@83 55 }
nuclear@83 56
nuclear@83 57
nuclear@82 58 bool GoatView::load_scene(const char *fname)
nuclear@76 59 {
nuclear@76 60 if(scene) {
nuclear@76 61 goat3d_free(scene);
nuclear@76 62 }
nuclear@76 63 if(!(scene = goat3d_create()) || goat3d_load(scene, fname) == -1) {
nuclear@76 64 return false;
nuclear@76 65 }
nuclear@76 66
nuclear@76 67 float bmin[3], bmax[3];
nuclear@82 68 if(goat3d_get_bounds(scene, bmin, bmax) != -1) {
nuclear@82 69 float bsize = (Vector3(bmax[0], bmax[1], bmax[2]) - Vector3(bmin[0], bmin[1], bmin[2])).length();
nuclear@83 70 cam_dist = bsize / tan(DEG_TO_RAD(fov) / 2.0);
nuclear@82 71 printf("bounds size: %f, cam_dist: %f\n", bsize, cam_dist);
nuclear@82 72 }
nuclear@76 73
nuclear@82 74 update_tree(scntree);
nuclear@76 75 return true;
nuclear@76 76 }
nuclear@73 77
nuclear@73 78 bool GoatView::make_menu()
nuclear@73 79 {
nuclear@82 80 // file menu
nuclear@73 81 QMenu *menu_file = menuBar()->addMenu("&File");
nuclear@73 82
nuclear@73 83 QAction *act_open_sce = new QAction("&Open Scene", this);
nuclear@73 84 act_open_sce->setShortcuts(QKeySequence::Open);
nuclear@73 85 connect(act_open_sce, &QAction::triggered, this, &GoatView::open_scene);
nuclear@73 86 menu_file->addAction(act_open_sce);
nuclear@73 87
nuclear@73 88 QAction *act_open_anm = new QAction("Open &Animation", this);
nuclear@73 89 connect(act_open_anm, &QAction::triggered, this, &GoatView::open_anim);
nuclear@73 90 menu_file->addAction(act_open_anm);
nuclear@73 91
nuclear@73 92 QAction *act_quit = new QAction("&Quit", this);
nuclear@73 93 act_quit->setShortcuts(QKeySequence::Quit);
nuclear@73 94 connect(act_quit, &QAction::triggered, [&](){qApp->quit();});
nuclear@73 95 menu_file->addAction(act_quit);
nuclear@82 96
nuclear@82 97 // view menu
nuclear@82 98 QMenu *menu_view = menuBar()->addMenu("&View");
nuclear@82 99
nuclear@82 100 QAction *act_use_nodes = new QAction("use nodes", this);
nuclear@82 101 act_use_nodes->setCheckable(true);
nuclear@82 102 act_use_nodes->setChecked(use_nodes);
nuclear@83 103 connect(act_use_nodes, &QAction::triggered, this,
nuclear@83 104 [&](){ use_nodes = !use_nodes; glview->updateGL(); });
nuclear@82 105 menu_view->addAction(act_use_nodes);
nuclear@83 106
nuclear@83 107 QAction *act_use_lighting = new QAction("lighting", this);
nuclear@83 108 act_use_lighting->setCheckable(true);
nuclear@83 109 act_use_lighting->setChecked(use_lighting);
nuclear@83 110 connect(act_use_lighting, &QAction::triggered, glview, &GoatViewport::toggle_lighting);
nuclear@83 111 menu_view->addAction(act_use_lighting);
nuclear@83 112
nuclear@83 113 // help menu
nuclear@83 114 QMenu *menu_help = menuBar()->addMenu("&Help");
nuclear@83 115
nuclear@83 116 QAction *act_about = new QAction("&About", this);
nuclear@83 117 connect(act_about, &QAction::triggered, this, &GoatView::show_about);
nuclear@83 118 menu_help->addAction(act_about);
nuclear@73 119 return true;
nuclear@73 120 }
nuclear@73 121
nuclear@73 122 bool GoatView::make_dock()
nuclear@73 123 {
nuclear@73 124 // ---- side-dock ----
nuclear@73 125 QWidget *dock_cont = new QWidget;
nuclear@73 126 QVBoxLayout *dock_vbox = new QVBoxLayout;
nuclear@73 127 dock_cont->setLayout(dock_vbox);
nuclear@73 128
nuclear@73 129 QDockWidget *dock = new QDockWidget("Scene graph", this);
nuclear@73 130 dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
nuclear@73 131 dock->setWidget(dock_cont);
nuclear@73 132 addDockWidget(Qt::LeftDockWidgetArea, dock);
nuclear@73 133
nuclear@82 134 // make the tree view widget
nuclear@82 135 scntree = new QTreeWidget;
nuclear@82 136 scntree->setColumnCount(1);
nuclear@82 137 QStringList hdrstr;
nuclear@82 138 hdrstr << "Node";// << "Type";
nuclear@82 139 scntree->setHeaderItem(new QTreeWidgetItem((QTreeWidget*)0, hdrstr));
nuclear@82 140 scntree->setAlternatingRowColors(true);
nuclear@82 141 dock_vbox->addWidget(scntree);
nuclear@82 142
nuclear@82 143 update_tree(scntree);
nuclear@82 144
nuclear@82 145 // misc
nuclear@82 146 QPushButton *bn_quit = new QPushButton("quit");
nuclear@82 147 dock_vbox->addWidget(bn_quit);
nuclear@82 148 connect(bn_quit, &QPushButton::clicked, [&](){qApp->quit();});
nuclear@82 149
nuclear@73 150 // ---- bottom dock ----
nuclear@73 151 dock_cont = new QWidget;
nuclear@73 152 QHBoxLayout *dock_hbox = new QHBoxLayout;
nuclear@73 153 dock_cont->setLayout(dock_hbox);
nuclear@73 154
nuclear@73 155 QSlider *slider_time = new QSlider(Qt::Orientation::Horizontal);
nuclear@73 156 slider_time->setDisabled(true);
nuclear@73 157 dock_hbox->addWidget(slider_time);
nuclear@73 158
nuclear@73 159 dock = new QDockWidget("Animation", this);
nuclear@73 160 dock->setAllowedAreas(Qt::BottomDockWidgetArea);
nuclear@73 161 dock->setWidget(dock_cont);
nuclear@73 162 addDockWidget(Qt::BottomDockWidgetArea, dock);
nuclear@73 163
nuclear@73 164 return true;
nuclear@73 165 }
nuclear@73 166
nuclear@73 167 bool GoatView::make_center()
nuclear@73 168 {
nuclear@82 169 glview = new GoatViewport(this);
nuclear@82 170 setCentralWidget(glview);
nuclear@73 171 return true;
nuclear@73 172 }
nuclear@73 173
nuclear@73 174 void GoatView::open_scene()
nuclear@73 175 {
nuclear@74 176 std::string fname = QFileDialog::getOpenFileName(this, "Open scene file", "",
nuclear@74 177 "Goat3D Scene (*.goatsce);;All Files (*)").toStdString();
nuclear@74 178 if(fname.empty()) {
nuclear@74 179 statusBar()->showMessage("Abort: No file selected!");
nuclear@74 180 return;
nuclear@74 181 }
nuclear@74 182
nuclear@74 183 statusBar()->showMessage("opening scene file");
nuclear@76 184 if(!load_scene(fname.c_str())) {
nuclear@74 185 statusBar()->showMessage("failed to load scene file");
nuclear@74 186 }
nuclear@73 187 }
nuclear@73 188
nuclear@73 189 void GoatView::open_anim()
nuclear@73 190 {
nuclear@73 191 statusBar()->showMessage("opening animation...");
nuclear@73 192 }
nuclear@73 193
nuclear@82 194 static void update_tree(QTreeWidget *tree)
nuclear@82 195 {
nuclear@82 196 if(!scene) return;
nuclear@82 197
nuclear@82 198 int num_nodes = goat3d_get_node_count(scene);
nuclear@82 199 for(int i=0; i<num_nodes; i++) {
nuclear@82 200 goat3d_node *node = goat3d_get_node(scene, i);
nuclear@82 201 if(goat3d_get_node_parent(node)) {
nuclear@82 202 continue;
nuclear@82 203 }
nuclear@82 204
nuclear@82 205 // only add the root nodes, the rest will be added recursively by them
nuclear@82 206 add_tree(tree, node, 0);
nuclear@82 207 }
nuclear@82 208 tree->expandAll();
nuclear@82 209 }
nuclear@82 210
nuclear@82 211 static void add_tree(QTreeWidget *tree, goat3d_node *node, QTreeWidgetItem *parent)
nuclear@82 212 {
nuclear@82 213 //char icon_name[64];
nuclear@82 214 //sprintf(icon_name, ":/icons/icons/icon_%s.png", node->get_type());
nuclear@82 215
nuclear@82 216 QStringList row;
nuclear@82 217 row << goat3d_get_node_name(node) << "M";
nuclear@82 218 QTreeWidgetItem *item = new QTreeWidgetItem(parent, row);
nuclear@82 219 //item->setIcon(0, QIcon(icon_name));
nuclear@82 220 tree->addTopLevelItem(item);
nuclear@82 221
nuclear@82 222 int num_children = goat3d_get_node_child_count(node);
nuclear@82 223 for(int i=0; i<num_children; i++) {
nuclear@82 224 add_tree(tree, goat3d_get_node_child(node, i), item);
nuclear@82 225 }
nuclear@82 226 }
nuclear@82 227
nuclear@82 228
nuclear@73 229
nuclear@73 230 // ---- OpenGL viewport ----
nuclear@82 231 GoatViewport::GoatViewport(QWidget *main_win)
nuclear@73 232 : QGLWidget(QGLFormat(QGL::DepthBuffer))
nuclear@73 233 {
nuclear@82 234 this->main_win = main_win;
nuclear@82 235 initialized = false;
nuclear@73 236 }
nuclear@73 237
nuclear@73 238 GoatViewport::~GoatViewport()
nuclear@73 239 {
nuclear@73 240 }
nuclear@73 241
nuclear@73 242 QSize GoatViewport::sizeHint() const
nuclear@73 243 {
nuclear@73 244 return QSize(800, 600);
nuclear@73 245 }
nuclear@73 246
nuclear@82 247 #define CRITICAL(error, detail) \
nuclear@82 248 do { \
nuclear@82 249 fprintf(stderr, "%s: %s\n", error, detail); \
nuclear@82 250 QMessageBox::critical(main_win, error, detail); \
nuclear@82 251 abort(); \
nuclear@82 252 } while(0)
nuclear@82 253
nuclear@73 254 void GoatViewport::initializeGL()
nuclear@73 255 {
nuclear@82 256 if(initialized) return;
nuclear@82 257 initialized = true;
nuclear@82 258
nuclear@79 259 init_opengl();
nuclear@79 260
nuclear@82 261 if(!GLEW_ARB_transpose_matrix) {
nuclear@82 262 CRITICAL("OpenGL initialization failed", "ARB_transpose_matrix extension not found!");
nuclear@82 263 }
nuclear@82 264
nuclear@79 265 glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
nuclear@78 266
nuclear@78 267 glEnable(GL_DEPTH_TEST);
nuclear@78 268 glEnable(GL_CULL_FACE);
nuclear@83 269 if(use_lighting) {
nuclear@83 270 glEnable(GL_LIGHTING);
nuclear@83 271 }
nuclear@83 272 glEnable(GL_LIGHT0);
nuclear@83 273
nuclear@83 274 float ldir[] = {-1, 1, 2, 0};
nuclear@83 275 glLightfv(GL_LIGHT0, GL_POSITION, ldir);
nuclear@73 276 }
nuclear@73 277
nuclear@73 278 void GoatViewport::resizeGL(int xsz, int ysz)
nuclear@73 279 {
nuclear@73 280 glViewport(0, 0, xsz, ysz);
nuclear@75 281 glMatrixMode(GL_PROJECTION);
nuclear@75 282 glLoadIdentity();
nuclear@75 283 gluPerspective(60.0, (float)xsz / (float)ysz, 0.5, 5000.0);
nuclear@73 284 }
nuclear@73 285
nuclear@73 286 void GoatViewport::paintGL()
nuclear@73 287 {
nuclear@75 288 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
nuclear@75 289
nuclear@75 290 glMatrixMode(GL_MODELVIEW);
nuclear@75 291 glLoadIdentity();
nuclear@75 292 glTranslatef(0, 0, -cam_dist);
nuclear@75 293 glRotatef(cam_phi, 1, 0, 0);
nuclear@75 294 glRotatef(cam_theta, 0, 1, 0);
nuclear@75 295
nuclear@82 296 if(!scene) return;
nuclear@82 297
nuclear@82 298 if(use_nodes) {
nuclear@75 299 int node_count = goat3d_get_node_count(scene);
nuclear@75 300 for(int i=0; i<node_count; i++) {
nuclear@75 301 goat3d_node *node = goat3d_get_node(scene, i);
nuclear@83 302 if(!goat3d_get_node_parent(node)) {
nuclear@83 303 draw_node(node); // only draw root nodes, the rest will be drawn recursively
nuclear@83 304 }
nuclear@82 305 }
nuclear@82 306 } else {
nuclear@82 307 int mesh_count = goat3d_get_mesh_count(scene);
nuclear@82 308 for(int i=0; i<mesh_count; i++) {
nuclear@82 309 goat3d_mesh *mesh = goat3d_get_mesh(scene, i);
nuclear@82 310 draw_mesh(mesh);
nuclear@75 311 }
nuclear@75 312 }
nuclear@73 313 }
nuclear@75 314
nuclear@83 315 void GoatViewport::toggle_lighting()
nuclear@83 316 {
nuclear@83 317 use_lighting = !use_lighting;
nuclear@83 318 if(use_lighting) {
nuclear@83 319 glEnable(GL_LIGHTING);
nuclear@83 320 } else {
nuclear@83 321 glDisable(GL_LIGHTING);
nuclear@83 322 }
nuclear@83 323 updateGL();
nuclear@83 324 }
nuclear@83 325
nuclear@82 326 #ifndef GLEW_ARB_transpose_matrix
nuclear@82 327 #error "GLEW_ARB_transpose_matrix undefined?"
nuclear@82 328 #endif
nuclear@82 329
nuclear@75 330 static void draw_node(goat3d_node *node)
nuclear@75 331 {
nuclear@75 332 float xform[16];
nuclear@75 333 goat3d_get_node_matrix(node, xform, anim_time);
nuclear@78 334
nuclear@78 335 glPushMatrix();
nuclear@82 336 glMultTransposeMatrixf(xform);
nuclear@75 337
nuclear@75 338 if(goat3d_get_node_type(node) == GOAT3D_NODE_MESH) {
nuclear@75 339 goat3d_mesh *mesh = (goat3d_mesh*)goat3d_get_node_object(node);
nuclear@75 340
nuclear@82 341 draw_mesh(mesh);
nuclear@75 342 }
nuclear@75 343
nuclear@83 344 int num_child = goat3d_get_node_child_count(node);
nuclear@75 345 for(int i=0; i<num_child; i++) {
nuclear@75 346 draw_node(goat3d_get_node_child(node, i));
nuclear@83 347 }
nuclear@78 348
nuclear@78 349 glPopMatrix();
nuclear@78 350 }
nuclear@78 351
nuclear@82 352 static void draw_mesh(goat3d_mesh *mesh)
nuclear@82 353 {
nuclear@83 354 static const float white[] = {1, 1, 1, 1};
nuclear@83 355 static const float black[] = {0, 0, 0, 1};
nuclear@83 356
nuclear@83 357 const float *color;
nuclear@83 358 goat3d_material *mtl = goat3d_get_mesh_mtl(mesh);
nuclear@83 359
nuclear@83 360 if(mtl && (color = goat3d_get_mtl_attrib(mtl, GOAT3D_MAT_ATTR_DIFFUSE))) {
nuclear@83 361 glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
nuclear@83 362 } else {
nuclear@83 363 glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, white);
nuclear@83 364 }
nuclear@83 365 if(mtl && (color = goat3d_get_mtl_attrib(mtl, GOAT3D_MAT_ATTR_SPECULAR))) {
nuclear@83 366 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color);
nuclear@83 367 } else {
nuclear@83 368 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
nuclear@83 369 }
nuclear@83 370 if(mtl && (color = goat3d_get_mtl_attrib(mtl, GOAT3D_MAT_ATTR_SHININESS))) {
nuclear@83 371 glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, color[0]);
nuclear@83 372 } else {
nuclear@83 373 glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 60.0);
nuclear@83 374 }
nuclear@83 375 // TODO texture
nuclear@83 376
nuclear@83 377
nuclear@82 378 int num_faces = goat3d_get_mesh_face_count(mesh);
nuclear@82 379 int num_verts = goat3d_get_mesh_attrib_count(mesh, GOAT3D_MESH_ATTR_VERTEX);
nuclear@82 380
nuclear@82 381 glEnableClientState(GL_VERTEX_ARRAY);
nuclear@82 382 glVertexPointer(3, GL_FLOAT, 0, goat3d_get_mesh_attribs(mesh, GOAT3D_MESH_ATTR_VERTEX));
nuclear@82 383
nuclear@82 384 float *data;
nuclear@82 385 if((data = (float*)goat3d_get_mesh_attribs(mesh, GOAT3D_MESH_ATTR_NORMAL))) {
nuclear@82 386 glEnableClientState(GL_NORMAL_ARRAY);
nuclear@82 387 glNormalPointer(GL_FLOAT, 0, data);
nuclear@82 388 }
nuclear@82 389 if((data = (float*)goat3d_get_mesh_attribs(mesh, GOAT3D_MESH_ATTR_TEXCOORD))) {
nuclear@82 390 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
nuclear@82 391 glTexCoordPointer(2, GL_FLOAT, 0, data);
nuclear@82 392 }
nuclear@82 393
nuclear@82 394 int *indices;
nuclear@82 395 if((indices = goat3d_get_mesh_faces(mesh))) {
nuclear@82 396 glDrawElements(GL_TRIANGLES, num_faces * 3, GL_UNSIGNED_INT, indices);
nuclear@82 397 } else {
nuclear@82 398 glDrawArrays(GL_TRIANGLES, 0, num_verts * 3);
nuclear@82 399 }
nuclear@82 400
nuclear@82 401 glDisableClientState(GL_VERTEX_ARRAY);
nuclear@82 402 glDisableClientState(GL_NORMAL_ARRAY);
nuclear@82 403 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
nuclear@82 404 }
nuclear@82 405
nuclear@78 406
nuclear@78 407 static float prev_x, prev_y;
nuclear@78 408 void GoatViewport::mousePressEvent(QMouseEvent *ev)
nuclear@78 409 {
nuclear@78 410 prev_x = ev->x();
nuclear@78 411 prev_y = ev->y();
nuclear@78 412 }
nuclear@78 413
nuclear@78 414 void GoatViewport::mouseMoveEvent(QMouseEvent *ev)
nuclear@78 415 {
nuclear@78 416 int dx = ev->x() - prev_x;
nuclear@78 417 int dy = ev->y() - prev_y;
nuclear@80 418 prev_x = ev->x();
nuclear@80 419 prev_y = ev->y();
nuclear@78 420
nuclear@78 421 if(!dx && !dy) return;
nuclear@78 422
nuclear@78 423 if(ev->buttons() & Qt::LeftButton) {
nuclear@78 424 cam_theta += dx * 0.5;
nuclear@78 425 cam_phi += dy * 0.5;
nuclear@78 426
nuclear@78 427 if(cam_phi < -90) cam_phi = -90;
nuclear@78 428 if(cam_phi > 90) cam_phi = 90;
nuclear@78 429 }
nuclear@78 430 if(ev->buttons() & Qt::RightButton) {
nuclear@78 431 cam_dist += dy * 0.1;
nuclear@78 432
nuclear@78 433 if(cam_dist < 0.0) cam_dist = 0.0;
nuclear@78 434 }
nuclear@78 435 updateGL();
nuclear@78 436 }
nuclear@83 437
nuclear@83 438 static const char *about_str =
nuclear@83 439 "GoatView - Goat3D scene file viewer<br>"
nuclear@83 440 "Copyright (C) 2014 John Tsiombikas &lt;<a href=\"mailto:nuclear@mutantstargoat.com\">nuclear@mutantstargoat.com</a>&gt;<br>"
nuclear@83 441 "<br>"
nuclear@83 442 "This program is free software: you can redistribute it and/or modify<br>"
nuclear@83 443 "it under the terms of the GNU General Public License as published by<br>"
nuclear@83 444 "the Free Software Foundation, either version 3 of the License, or<br>"
nuclear@83 445 "(at your option) any later version.<br>"
nuclear@83 446 "<br>"
nuclear@83 447 "This program is distributed in the hope that it will be useful,<br>"
nuclear@83 448 "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>"
nuclear@83 449 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>"
nuclear@83 450 "GNU General Public License for more details.<br>"
nuclear@83 451 "<br>"
nuclear@83 452 "You should have received a copy of the GNU General Public License<br>"
nuclear@83 453 "along with this program. If not, see <a href=\"http://www.gnu.org/licenses/gpl\">http://www.gnu.org/licenses/gpl</a>.";
nuclear@83 454
nuclear@83 455 void GoatView::show_about()
nuclear@83 456 {
nuclear@83 457 QMessageBox::information(this, "About GoatView", about_str);
nuclear@83 458 }