Logo Search packages:      
Sourcecode: bbconf version File versions  Download package

menuedit.h

/***************************************************************************
                         -- menuedit.h --
                         -------------------
    begin                : 2001-09-01
    copyright            : (C) 2001 - 2002
    authors              : Jason Kasper (vanRijn)
                         : Ben Jansens (xOr)
    URL                  : http://bbconf.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/
 // E_O_H_VR
#ifndef __MENUEDIT_H
#define __MENUEDIT_H

#include "menu.h"
#include "plugin.h"
#include "menuitem.h"
#include <qfile.h>
#include <qdict.h>
#include <qtextstream.h>
#include <qlistview.h>

class menuedit : public Plugin
{
public:
      menuedit(QObject *p = 0, const char *n = 0, const QDict<QString> args = 0);
      virtual ~menuedit();
public slots:
      void load();
      bool save();
      void open_new(const QString){ return; } ;
      void save_as(const QString) { return; } ;
protected:
      QFile* openfile();
      void readfile(QFile*);
      void readmenu(QTextStream*,TreeNode<menuitem>*);
      menuitem *getMenuItem(QString*);
      int getLineType(QString*);
      QString *getLineLabel(QString*);
      QString *getLineData(QString*);
      void savebranch(TreeNode<menuitem>*);
private:
      class TreeNode<menuitem> *menu;
      MenuEditor *menu_form;
      void loadMenuFromEditor(QListViewItem*,TreeNode<menuitem>*);
      QString menufile;
      QString indent;
};

#endif // __MENUEDIT_H

Generated by  Doxygen 1.6.0   Back to index