diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-01-27 18:44:50 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-01-27 18:44:50 +0900 |
commit | 08f2b5848ddd09e0da7e2d42a8743f0b40f1c717 (patch) | |
tree | 18bcb7a10dbea1184b4bc6f860e1a8e06ab1c819 /tdefilereplace/tdefilereplaceview.h | |
parent | 3c091bf671d1802dceabd5b820290b0828abf949 (diff) | |
download | tdeutils-08f2b5848ddd09e0da7e2d42a8743f0b40f1c717.tar.gz tdeutils-08f2b5848ddd09e0da7e2d42a8743f0b40f1c717.zip |
Moved TDEFileReplace to tdeutils. This resolves bug 767.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdefilereplace/tdefilereplaceview.h')
-rw-r--r-- | tdefilereplace/tdefilereplaceview.h | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/tdefilereplace/tdefilereplaceview.h b/tdefilereplace/tdefilereplaceview.h new file mode 100644 index 0000000..6081347 --- /dev/null +++ b/tdefilereplace/tdefilereplaceview.h @@ -0,0 +1,118 @@ +/*************************************************************************** + tdefilereplaceview.h - description + ------------------- + begin : sam oct 16 15:28:00 CEST 1999 + copyright : (C) 1999 by Fran�ois Dupoux <dupoux@dupoux.com> + (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it> + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TDEFILEREPLACEVIEW_H +#define TDEFILEREPLACEVIEW_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +//QT +#include <tqlcdnumber.h> +#include <tqwidgetstack.h> +class TQPixMap; + +//KDE +class TDEPopupMenu; +class TDEListView; + +//local +#include "tdefilereplaceviewwdg.h" +#include "configurationclasses.h" + +class coord +{ + public: + int line, + column; + public: + coord(){ line = 1; + column = 1;} + coord(const coord& c) { line = c.line; + column = c.column;} + coord operator=(const coord& c) { line = c.line; + column = c.column; + return (*this);} +}; + + +/** + * The view of KFilereplace. + */ +class TDEFileReplaceView : public TDEFileReplaceViewWdg +{ + Q_OBJECT + + public://Constructors + TDEFileReplaceView(RCOptions* info, TQWidget *parent,const char *name); + + public: + TQString currentPath(); + void showSemaphore(TQString s); + void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(TQString::number(filesNumber,10)); } + void stringsInvert(bool invertAll); + void changeView(bool searchingOnlyMode); + TDEListView* getResultsView(); + TDEListView* getStringsView(); + void updateOptions(RCOptions* info) { m_option = info; } + void loadMap(KeyValueMap extMap){ loadMapIntoView(extMap); } + KeyValueMap getStringsViewMap()const { return m_option->m_mapStringsView;} + void setCurrentStringsViewMap(){ setMap(); } + //void emitSearchingOnlyMode(bool b) { emit searchingOnlyMode(b); } + + public slots: + void slotResultMouseButtonClicked(int button, TQListViewItem *lvi, const TQPoint &pos); + void slotResultReturnPressed(TQListViewItem *lvi); + void slotResultProperties(); + void slotResultOpen(); + void slotResultOpenWith(); + void slotResultDirOpen(); + void slotResultEdit(); + void slotResultDelete(); + void slotResultTreeExpand(); + void slotResultTreeReduce(); + void slotResultHeaderClicked(int sortCol); + void slotStringsAdd(); + void slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace); + void slotStringsDeleteItem(); + void slotStringsEmpty(); + void slotStringsEdit(); + void slotStringsSave(); + + private: + void initGUI(); + void raiseStringsView(); + void raiseResultsView(); + coord extractWordCoordinates(TQListViewItem* lvi); + void expand(TQListViewItem *lviCurrent, bool b); + void setMap(); + void loadMapIntoView(KeyValueMap map); + void whatsThis(); + + /*signals: + void resetActions(); + void searchingOnlyMode(bool);*/ + + private: + TDEPopupMenu *m_menuResult; + RCOptions *m_option; + TDEListViewItem *m_lviCurrent; + TDEListView *m_rv, * m_sv; +}; + +#endif // TDEFILEREPLACEVIEW_H |