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

tdeprint

kmiconview.h
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #ifndef KMICONVIEW_H
00021 #define KMICONVIEW_H
00022 
00023 #include <kiconview.h>
00024 #include <tqptrlist.h>
00025 
00026 #include "kmobject.h"
00027 
00028 class KMPrinter;
00029 
00030 class KMIconViewItem : public TQIconViewItem, public KMObject
00031 {
00032 public:
00033     KMIconViewItem(TQIconView *parent, KMPrinter *p);
00034     void updatePrinter(KMPrinter *printer = 0, int mode = TQIconView::Bottom);
00035     bool isClass() const    { return m_isclass; }
00036 
00037 protected:
00038     virtual void paintItem(TQPainter*, const TQColorGroup&);
00039     virtual void calcRect(const TQString& text_ = TQString::null);
00040 
00041 private:
00042     int     m_mode;
00043     QString     m_pixmap;
00044     char        m_state;
00045     bool        m_isclass;
00046 };
00047 
00048 class KMIconView : public TDEIconView
00049 {
00050     Q_OBJECT
00051 public:
00052     enum ViewMode { Big, Small };
00053 
00054     KMIconView(TQWidget *parent = 0, const char *name = 0);
00055     ~KMIconView();
00056 
00057     void setPrinterList(TQPtrList<KMPrinter> *list);
00058     void setPrinter(const TQString&);
00059     void setPrinter(KMPrinter*);
00060     void setViewMode(ViewMode);
00061 
00062 signals:
00063     void rightButtonClicked(const TQString&, const TQPoint&);
00064     void printerSelected(const TQString&);
00065 
00066 protected slots:
00067     void slotRightButtonClicked(TQIconViewItem*, const TQPoint&);
00068     void slotSelectionChanged();
00069 
00070 private:
00071     KMIconViewItem* findItem(KMPrinter *p);
00072 
00073 private:
00074     TQPtrList<KMIconViewItem>   m_items;
00075     ViewMode        m_mode;
00076 };
00077 
00078 #endif

tdeprint

Skip menu "tdeprint"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.