tdelistviewlineedit.h
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 Charles Samuels <charles@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef TDELISTVIEWLINEEDIT_H 00020 #define TDELISTVIEWLINEEDIT_H 00021 00022 #include <klineedit.h> 00023 #include <tdelistview.h> 00024 00029 class TDEUI_EXPORT TDEListViewLineEdit : public KLineEdit 00030 { 00031 Q_OBJECT 00032 public: 00033 TDEListViewLineEdit(TDEListView *parent); 00034 ~TDEListViewLineEdit(); 00035 00036 TQListViewItem *currentItem() const; 00037 void setRenameSettings(const TDEListViewRenameSettings &renSett) { m_renSett = renSett; }; 00038 00039 signals: 00040 void done(TQListViewItem*, int); 00041 00053 void renameNext(TQListViewItem* item, int col); 00054 00066 void renamePrev(TQListViewItem* item, int col); 00067 00068 public slots: 00069 void terminate(); 00070 void load(TQListViewItem *i, int c); 00071 00072 protected: 00073 virtual void focusOutEvent(TQFocusEvent *); 00074 virtual void keyPressEvent(TQKeyEvent *e); 00075 virtual void paintEvent(TQPaintEvent *e); 00076 virtual bool event (TQEvent *pe); 00077 00079 void selectNextCell (TQListViewItem *pi, int column, bool forward); 00080 void terminate(bool commit); 00081 TQListViewItem *item; 00082 int col; 00083 TDEListView* const p; 00084 TDEListViewRenameSettings m_renSett; 00085 00086 protected slots: 00087 void slotSelectionChanged(); 00088 00090 void slotItemRemoved(TQListViewItem *i); 00091 00092 }; 00093 00094 #endif