• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
kwidgetlistbox.h
1 /*
2  * Copyright (C) 2005 Petri Damstén <petri.damsten@iki.fi>
3  *
4  * This file is part of SuperKaramba.
5  *
6  * SuperKaramba is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * SuperKaramba is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with SuperKaramba; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  ****************************************************************************/
20 #ifndef KWIDGETLISTBOX_H
21 #define KWIDGETLISTBOX_H
22 
23 #include <tqtable.h>
24 
29 typedef bool (*show_callback) (int index, TQWidget* widget, void* data);
30 
31 class KWidgetListbox : public TQTable
32 {
33  TQ_OBJECT
34 
35 
36  public:
37  KWidgetListbox(TQWidget *parent = 0, const char *name = 0);
38  ~KWidgetListbox();
39 
40  int insertItem(TQWidget* item, int index = -1);
41  void setSelected(TQWidget* item);
42  void setSelected(int index);
43  void removeItem(TQWidget* item);
44  void removeItem(int index);
45  void clear();
46  int selected() const;
47  TQWidget* selectedItem() const;
48  TQWidget* item(int index) const;
49  int index(TQWidget* itm) const;
50  uint count() const { return numRows(); };
51 
52  void showItems(show_callback func = 0, void* data = 0);
53 
54  void paintCell(TQPainter* p, int row, int col, const TQRect& cr,
55  bool selected, const TQColorGroup& cg);
56  protected:
57  void setItemColors(int index, bool even);
58  void updateColors();
59  bool even(int index);
60  virtual void showEvent(TQShowEvent* e);
61 
62  protected slots:
63  void selectionChanged(int row, int col);
64 
65  signals:
66  void selected(int index);
67 };
68 
69 #endif

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.8.13
This website is maintained by Timothy Pearson.