diff options
author | Michele Calgaro <[email protected]> | 2024-10-13 11:56:14 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-10-21 09:29:11 +0900 |
commit | 0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502 (patch) | |
tree | 10f9d3223f0a0904a0748a28ca44da52ee1092b7 /src/widgets/prepmethodlistview.h | |
parent | 7d5ba3180a82a0827c1fbd6dc93a2abf4f882c37 (diff) | |
download | krecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.tar.gz krecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.zip |
Rearrange folders structure to remove unnecessary 'krecipes' second level subfolder
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/widgets/prepmethodlistview.h')
-rw-r--r-- | src/widgets/prepmethodlistview.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/widgets/prepmethodlistview.h b/src/widgets/prepmethodlistview.h new file mode 100644 index 0000000..a31fccd --- /dev/null +++ b/src/widgets/prepmethodlistview.h @@ -0,0 +1,70 @@ +/*************************************************************************** +* Copyright (C) 2004 by * +* Jason Kivlighn ([email protected]) * +* * +* 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 PREPMETHODLISTVIEW_H +#define PREPMETHODLISTVIEW_H + +#include "dblistviewbase.h" + +#include "datablocks/element.h" + +class RecipeDB; +class TDEPopupMenu; + +class PrepMethodListView : public DBListViewBase +{ + TQ_OBJECT + +public: + PrepMethodListView( TQWidget *parent, RecipeDB *db ); + +public slots: + virtual void load( int curr_limit, int curr_offset ); + +protected slots: + virtual void createPrepMethod( const Element & ) = 0; + virtual void removePrepMethod( int ) = 0; + + void checkCreatePrepMethod( const Element &el ); + +protected: + virtual void init(); +}; + + +class StdPrepMethodListView : public PrepMethodListView +{ + TQ_OBJECT + +public: + StdPrepMethodListView( TQWidget *parent, RecipeDB *db, bool editable = false ); + +protected: + virtual void createPrepMethod( const Element & ); + virtual void removePrepMethod( int ); + +private slots: + void showPopup( TDEListView *, TQListViewItem *, const TQPoint & ); + + void createNew(); + void remove + (); + void rename(); + + void modPrepMethod( TQListViewItem* i ); + void savePrepMethod( TQListViewItem* i ); + +private: + bool checkBounds( const TQString &name ); + + TDEPopupMenu *kpop; +}; + +#endif //PREPMETHODLISTVIEW_H |