source: git/src/prefsdlg.cc @ ecbc6c18

RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-datawalls-data-hanging-as-warning
Last change on this file since ecbc6c18 was ecbc6c18, checked in by Olly Betts <olly@…>, 14 years ago

src/: Update FSF address in licence notices.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3417 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[e5fc9b1]1//
2//  prefsdlg.cc
3//
4//  Preferences dialog box.
5//
6//  Copyright (C) 2002 Mark R. Shinwell
[3675a18]7//  Copyright (C) 2004 Olly Betts
[e5fc9b1]8//
9//  This program is free software; you can redistribute it and/or modify
10//  it under the terms of the GNU General Public License as published by
11//  the Free Software Foundation; either version 2 of the License, or
12//  (at your option) any later version.
13//
14//  This program is distributed in the hope that it will be useful,
15//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//  GNU General Public License for more details.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program; if not, write to the Free Software
[ecbc6c18]21//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
[e5fc9b1]22//
23
[cbfa50d]24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
[3675a18]28#include <wx/confbase.h>
29
[e5fc9b1]30#include "ctlprefs.h"
31#include "gridprefs.h"
[d0867c3]32#include "indicatorprefs.h"
[e5fc9b1]33#include "legprefs.h"
34#include "prefsdlg.h"
35#include "stnprefs.h"
36#include "tubeprefs.h"
37#include "unitsprefs.h"
[d0867c3]38#include "winprefs.h"
[203d2a7]39#include "mainfrm.h"
[e5fc9b1]40
[203d2a7]41PrefsDlg::PrefsDlg(GfxCore* parent, MainFrm* parent_win) : PanelDlg(parent_win, 1000, "Preferences")
[e5fc9b1]42{
43    CtlPrefs* ctlprefs = new CtlPrefs(this);
44    GridPrefs* gridprefs = new GridPrefs(this);
45    LegPrefs* legprefs = new LegPrefs(this);
[203d2a7]46    StnPrefs* stnprefs = new StnPrefs(parent, this);
[e5fc9b1]47    TubePrefs* tubeprefs = new TubePrefs(this);
48    UnitsPrefs* unitsprefs = new UnitsPrefs(this);
[d0867c3]49    IndicatorPrefs* indicatorprefs = new IndicatorPrefs(this);
[203d2a7]50    WinPrefs* winprefs = new WinPrefs(parent_win, this);
[e5fc9b1]51
52    list<PanelDlgPage*> pages;
53    pages.push_back(stnprefs);
54    pages.push_back(legprefs);
55    pages.push_back(tubeprefs);
[d0867c3]56    pages.push_back(indicatorprefs);
[e5fc9b1]57    pages.push_back(gridprefs);
58    pages.push_back(ctlprefs);
59    pages.push_back(unitsprefs);
[d0867c3]60    pages.push_back(winprefs);
61
62    list<PanelDlgPage*>::iterator iter = pages.begin();
63    while (iter != pages.end()) {
64        (*iter++)->Hide();
65    }
[e5fc9b1]66
67    SetPages(pages);
68}
69
[3675a18]70wxBitmap PrefsDlg::LoadPreferencesIcon(const wxString& icon) const
[e5fc9b1]71{
[3675a18]72    // Load an icon for use in the preferences dialog.
73    //FIXME share code with LoadIcon...
[e5fc9b1]74
[8a05a7a]75    wxString path = wmsg_cfgpth();
76    path += wxCONFIG_PATH_SEPARATOR;
77    path += wxString("icons");
78    path += wxCONFIG_PATH_SEPARATOR;
79    path += wxString(icon);
80    path += wxString("prefs.png");
[3675a18]81    return wxBitmap(path, wxBITMAP_TYPE_PNG);
[e5fc9b1]82}
Note: See TracBrowser for help on using the repository browser.