You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
3.3 KiB
128 lines
3.3 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#ifndef KXMLCOMMANDDLG_H
|
||
|
#define KXMLCOMMANDDLG_H
|
||
|
|
||
15 years ago
|
#include <tqwidget.h>
|
||
|
#include <tqmap.h>
|
||
|
#include <tqstringlist.h>
|
||
15 years ago
|
#include <kdialogbase.h>
|
||
|
|
||
|
class KListView;
|
||
15 years ago
|
class TQListViewItem;
|
||
|
class TQLineEdit;
|
||
|
class TQComboBox;
|
||
|
class TQWidgetStack;
|
||
|
class TQToolButton;
|
||
15 years ago
|
class KListBox;
|
||
15 years ago
|
class TQListBoxItem;
|
||
|
class TQTextEdit;
|
||
|
class TQCheckBox;
|
||
15 years ago
|
|
||
|
class DrGroup;
|
||
|
class DrBase;
|
||
|
class KXmlCommand;
|
||
|
|
||
14 years ago
|
class KXmlCommandAdvancedDlg : public TQWidget
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
KXmlCommandAdvancedDlg(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
~KXmlCommandAdvancedDlg();
|
||
|
|
||
|
void setCommand(KXmlCommand*);
|
||
15 years ago
|
static bool editCommand(KXmlCommand *xmlcmd, TQWidget *parent = 0);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
void parseGroupItem(DrGroup*, TQListViewItem*);
|
||
15 years ago
|
void parseXmlCommand(KXmlCommand*);
|
||
15 years ago
|
void viewItem(TQListViewItem*);
|
||
|
void removeItem(TQListViewItem*);
|
||
|
void recreateGroup(TQListViewItem*, DrGroup*);
|
||
15 years ago
|
|
||
|
protected slots:
|
||
15 years ago
|
void slotSelectionChanged(TQListViewItem*);
|
||
15 years ago
|
void slotTypeChanged(int);
|
||
|
void slotAddValue();
|
||
|
void slotRemoveValue();
|
||
|
void slotApplyChanges();
|
||
|
void slotAddGroup();
|
||
|
void slotAddOption();
|
||
|
void slotRemoveItem();
|
||
|
void slotMoveUp();
|
||
|
void slotMoveDown();
|
||
15 years ago
|
void slotCommandChanged(const TQString&);
|
||
|
void slotValueSelected(TQListViewItem*);
|
||
|
void slotOptionRenamed(TQListViewItem*, int);
|
||
15 years ago
|
void slotChanged();
|
||
|
|
||
|
private:
|
||
|
KListView *m_view;
|
||
14 years ago
|
TQLineEdit *m_name, *m_desc, *m_format, *m_default, *m_command;
|
||
|
TQComboBox *m_type;
|
||
|
TQWidget *m_dummy;
|
||
15 years ago
|
KListView *m_values;
|
||
14 years ago
|
TQLineEdit *m_edit1, *m_edit2;
|
||
|
TQWidgetStack *m_stack;
|
||
|
TQToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down;
|
||
|
TQLineEdit *m_inputfile, *m_inputpipe, *m_outputfile, *m_outputpipe;
|
||
|
TQToolButton *m_addval, *m_delval;
|
||
15 years ago
|
TQTextEdit *m_comment;
|
||
|
TQCheckBox *m_persistent;
|
||
15 years ago
|
|
||
|
KXmlCommand *m_xmlcmd;
|
||
15 years ago
|
TQMap<TQString, DrBase*> m_opts;
|
||
15 years ago
|
};
|
||
|
|
||
|
class KXmlCommandDlg : public KDialogBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
KXmlCommandDlg(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
|
||
|
void setCommand(KXmlCommand*);
|
||
15 years ago
|
static bool editCommand(KXmlCommand*, TQWidget *parent = 0);
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slotAddMime();
|
||
|
void slotRemoveMime();
|
||
|
void slotEditCommand();
|
||
|
void slotAddReq();
|
||
|
void slotRemoveReq();
|
||
15 years ago
|
void slotReqSelected(TQListViewItem*);
|
||
|
void slotAvailableSelected(TQListBoxItem*);
|
||
|
void slotSelectedSelected(TQListBoxItem*);
|
||
15 years ago
|
void slotOk();
|
||
|
|
||
|
private:
|
||
14 years ago
|
TQLineEdit *m_description;
|
||
|
TQLabel *m_idname;
|
||
|
TQComboBox *m_mimetype;
|
||
15 years ago
|
KListBox *m_availablemime, *m_selectedmime;
|
||
14 years ago
|
TQToolButton *m_addmime, *m_removemime;
|
||
15 years ago
|
KListView *m_requirements;
|
||
14 years ago
|
TQToolButton *m_removereq, *m_addreq;
|
||
15 years ago
|
|
||
14 years ago
|
TQStringList m_mimelist;
|
||
15 years ago
|
KXmlCommand *m_cmd;
|
||
|
};
|
||
|
|
||
|
#endif
|