-
Notifications
You must be signed in to change notification settings - Fork 0
/
businessinfo.h
85 lines (80 loc) · 2.49 KB
/
businessinfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* -*- c++ -*-
* businessinfo.h
*
* Header for the BusinessInfo class.
* Copyright (C) 2002 lignum Computing, Inc. <lignumcad@lignumcomputing.com>
* $Id$
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef BUSINESSINFO_H
#define BUSINESSINFO_H
#include <qstring.h>
/*!
* This is a global (singleton) object which contains the business
* information entered in the Preferences dialog.
*/
class BusinessInfo {
//! The name of the business (or the user)
QString name_;
//! The location of the business (usually city, state, but otherwise
//! not parsed).
QString location_;
//! A logo for the business (SVG would be the best but we'll accomodate
//! a pixmap, too.)
QString logo_;
//! The global Businessinfo object.
static BusinessInfo business_info_;
protected:
/*!
* All of the defaults are just null strings.
*/
BusinessInfo () {}
public:
/*!
* Access the business information through this global instance.
* \return reference to the global business info object.
*/
static BusinessInfo& instance ( void );
/*!
* Set the business name.
* \param name business name.
*/
void setName ( const QString& name ) { name_ = name; }
/*!
* \return the name of the business.
*/
QString name ( void ) const { return name_; }
/*!
* Set the business location.
* \param name business location.
*/
void setLocation ( const QString& location ) { location_ = location; }
/*!
* \return the location of the business.
*/
QString location ( void ) const { return location_; }
/*!
* Set the file name containing the business logo.
* \param file file name containing the business logo.
*/
void setLogo ( const QString& logo ) { logo_ = logo; }
/*!
* \return the business logo as a string.
*/
QString logo ( void ) const { return logo_; }
};
#endif // BUSINESSINFO_H