Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
wxProjectionDialog.cpp
1 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
2 
3  Copyright (C) 2003-2009 (see file CONTACT for details)
4  Multimediale Systeme der Informationsverarbeitung
5  Institut fuer Informatik
6  Christian-Albrechts-Universitaet Kiel
7 
8  BIAS is free software; you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as published by
10  the Free Software Foundation; either version 2.1 of the License, or
11  (at your option) any later version.
12 
13  BIAS is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License
19  along with BIAS; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
21 
22 #include "wxProjectionDialog.hh"
23 
24 namespace BIAS {
25 
26 /*
27  * \file wxProjectionDialog.cpp
28  * \class wxProjectionDialog
29  * Created on: Jun 25, 2010
30  * Author: ischiller
31  */
33  wxWindowID id, const wxString& title,
34  bool createButtons)
35  : wxDialog(parent, id, title, wxDefaultPosition, wxSize(500, 550),
36  wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
37 {
38  projgui_ = new wxProjectionPanel(this, -1,
39  wxDefaultPosition,
40  wxDefaultSize,
41  wxTAB_TRAVERSAL,
42  wxT("panel"),
43  createButtons);
44 
45  projgui_->SetProjection(projection);
46 
47  wxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
48  buttonSizer->Add(new wxButton(this, wxID_OK, wxT("OK")));
49  buttonSizer->Add(new wxButton(this, wxID_CANCEL, wxT("Cancel")));
50 
51  wxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
52  mainSizer->Add(projgui_, 1, wxEXPAND | wxALL, 5);
53  mainSizer->Add(buttonSizer, 0, wxBOTTOM | wxALIGN_CENTER, 5);
54 
55  SetSizer(mainSizer);
56 }
57 
59 {
60  return projgui_->GetProjection();
61 }
62 
63 
64 }
const Projection & GetProjection() const
Panel for displaying and editing projections.
This class hides the underlying projection model, like projection matrix, spherical camera...
Definition: Projection.hh:70
const Projection & GetProjection() const
void SetProjection(const Projection &projection)
wxProjectionDialog(const Projection &projection, wxWindow *parent=NULL, wxWindowID id=-1, const wxString &title=wxT("Projection"), bool createButtons=true)