2 * Copyright (C) 2008 David Greaves
4 * This software is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
9 * This software is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this software; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 #ifndef SHOPPER_UI_CATEGORYDIALOG_H
21 #define SHOPPER_UI_CATEGORYDIALOG_H
23 #include "shopperList.h"
25 #include "LabelEntry.h"
26 #include "QFingerScrollArea.h"
30 // private helper class
31 class CatView
: public QWidget
35 CatView(Category
&it
, List
&l
,QWidget
* parent
= 0) ;
39 void set_pos(int, int);
40 // virtual void setVisible(bool vis);
44 void delete_category();
56 // Allow CatView* to be passed as Qt::QueuedConnection params
57 // must be done outside the namespace
58 Q_DECLARE_METATYPE ( Shopper::CatView
* )
62 // private base for adding/editing an Category
63 class CategoryDialog
: public QDialog
67 CategoryDialog(QWidget
* parent
, Shopper::List
*, Shopper::Category
*);
75 void highlightCategory(CatView
*);
78 void categoryAdded(CatView
*);
81 void move(Shopper::CatView
*c
, int direction
);
88 // Public classes for managing
89 class CategoryManage
: public CategoryDialog
92 CategoryManage(QWidget
* parent
, Shopper::List
* mylist
);