File: crmacctcluster.h

package info (click to toggle)
postbooks 4.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 112,660 kB
  • ctags: 22,890
  • sloc: cpp: 310,358; sh: 607; xml: 214; python: 140; awk: 104; makefile: 50
file content (119 lines) | stat: -rw-r--r-- 3,037 bytes parent folder | download | duplicates (2)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * This file is part of the xTuple ERP: PostBooks Edition, a free and
 * open source Enterprise Resource Planning software suite,
 * Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
 * It is licensed to you under the Common Public Attribution License
 * version 1.0, the full text of which (including xTuple-specific Exhibits)
 * is available at www.xtuple.com/CPAL.  By using this software, you agree
 * to be bound by its terms.
 */

#ifndef _crmaccttCluster_h
#define _crmaccttCluster_h

#include "crmcluster.h"
#include "xcheckbox.h"

class XComboBox;

class XTUPLEWIDGETS_EXPORT CRMAcctInfoAction
{
  public:
    virtual ~CRMAcctInfoAction() {};
    virtual void crmacctInformation(QWidget* parent, int pCustid) = 0;
};

class XTUPLEWIDGETS_EXPORT CRMAcctLineEdit : public CrmClusterLineEdit
{
    Q_OBJECT

    public:
	CRMAcctLineEdit(QWidget*, const char* = 0);

        enum CRMAcctSubtype { Crmacct, Competitor, Cust,     Employee,
                              Partner, Prospect,   SalesRep, Taxauth,
                              User,    Vend,       CustAndProspect };

	virtual void		setSubtype(const CRMAcctSubtype);
	virtual CRMAcctSubtype	subtype()	const;

    protected slots:
	VirtualList*	listFactory();
	VirtualSearch*	searchFactory();

    protected:
	CRMAcctSubtype _subtype;
};

class XTUPLEWIDGETS_EXPORT CRMAcctList : public VirtualList
{
    Q_OBJECT

    friend class CRMAcctCluster;
    friend class CRMAcctLineEdit;

    public:
	CRMAcctList(QWidget*, const char* = 0, bool = false, Qt::WindowFlags = 0);

    public slots:
	virtual void sFillList();
	virtual void setId(const int);
	virtual void setShowInactive(const bool);
	virtual void setSubtype(const CRMAcctLineEdit::CRMAcctSubtype);

    protected:
	QWidget* _parent;
	bool	 _showInactive;
	enum CRMAcctLineEdit::CRMAcctSubtype _subtype;
        ParameterList *_queryParams;
};

class XTUPLEWIDGETS_EXPORT CRMAcctSearch : public VirtualSearch
{
    Q_OBJECT

    friend class CRMAcctCluster;
    friend class CRMAcctLineEdit;

    public:
	CRMAcctSearch(QWidget*, Qt::WindowFlags = 0);
	virtual void setId(const int);
	virtual void setShowInactive(const bool);
	virtual void setSubtype(const CRMAcctLineEdit::CRMAcctSubtype);

    public slots:
	virtual void sFillList();

    protected:
	QLabel*		_addressLit;
	QWidget*	_parent;
	XCheckBox*	_searchContact;
	XCheckBox*	_searchPhone;
        XCheckBox*      _searchEmail;
	XCheckBox*	_searchStreet;
	XCheckBox*	_searchCity;
	XCheckBox*	_searchState;
	XCheckBox*	_searchPostalCode;
	XCheckBox*	_searchCountry;
	QCheckBox*	_showInactive;
        XCheckBox*      _searchCombo;
        XComboBox*      _comboCombo;

	enum CRMAcctLineEdit::CRMAcctSubtype _subtype;
        ParameterList *_queryParams;

    private:
};

class XTUPLEWIDGETS_EXPORT CRMAcctCluster : public VirtualCluster
{
    Q_OBJECT

    public:
	CRMAcctCluster(QWidget*, const char* = 0);
	virtual void				setSubtype(CRMAcctLineEdit::CRMAcctSubtype const);
	virtual CRMAcctLineEdit::CRMAcctSubtype subtype() const;

};

#endif