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.
139 lines
6.1 KiB
139 lines
6.1 KiB
/***************************************************************************
|
|
plugins.cpp - Kommander Plugins
|
|
-------------------
|
|
copyright : (C) 2003 Marc Britton <consume@optusnet.com.au>
|
|
(C) 2004-2006 Michal Rudolf <mrudolf@kdewebdev.org>
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* 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. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#include <kommanderplugin.h>
|
|
#include <kiconloader.h>
|
|
|
|
/* WIDGET INCLUDES */
|
|
#include "buttongroup.h"
|
|
#include "checkbox.h"
|
|
#include "closebutton.h"
|
|
#include "combobox.h"
|
|
#include "datepicker.h"
|
|
#include "dialog.h"
|
|
#include "execbutton.h"
|
|
#include "fileselector.h"
|
|
#include "groupbox.h"
|
|
#include "konsole.h"
|
|
#include "label.h"
|
|
#include "lineedit.h"
|
|
#include "listbox.h"
|
|
#include "pixmaplabel.h"
|
|
#include "progressbar.h"
|
|
#include "radiobutton.h"
|
|
#include "richtexteditor.h"
|
|
#include "scriptobject.h"
|
|
#include "slider.h"
|
|
#include "spinboxint.h"
|
|
#include "statusbar.h"
|
|
#include "subdialog.h"
|
|
#include "tabwidget.h"
|
|
#include "table.h"
|
|
#include "textbrowser.h"
|
|
#include "textedit.h"
|
|
#include "textedit.h"
|
|
#include "timer.h"
|
|
#include "treewidget.h"
|
|
#include "toolbox.h"
|
|
#include "wizard.h"
|
|
#include "popupmenu.h"
|
|
#include "fontdialog.h"
|
|
#include "aboutdialog.h"
|
|
|
|
class KomStdPlugin : public KommanderPlugin
|
|
{
|
|
public:
|
|
KomStdPlugin();
|
|
virtual TQWidget *create( const TQString &key, TQWidget *tqparent = 0, const char *name = 0 );
|
|
};
|
|
|
|
KomStdPlugin::KomStdPlugin()
|
|
{
|
|
const char *group = "Kommander";
|
|
addWidget("Label", group, "", 0);
|
|
addWidget("PixmapLabel", group, "", 0);
|
|
addWidget("LineEdit", group, "", 0);
|
|
addWidget("Dialog", group, "", 0);
|
|
addWidget("ExecButton", group, "", 0);
|
|
addWidget("CloseButton", group, "", 0);
|
|
addWidget("Konsole", group, "", 0);
|
|
addWidget("TextEdit", group, "", 0);
|
|
addWidget("RadioButton", group, "", 0);
|
|
// addWidget("", group, "");
|
|
addWidget("GroupBox", group, "", 0);
|
|
addWidget("ButtonGroup", group, "", 0);
|
|
addWidget("CheckBox", group, "", 0);
|
|
addWidget("ComboBox", group, "", 0);
|
|
addWidget("SpinBoxInt", group, "", 0);
|
|
// addWidget("Wizard", group, "");
|
|
addWidget("TabWidget", group, "", 0);
|
|
addWidget("ToolBox", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("toolbox", KIcon::NoGroup, KIcon::SizeMedium)), "", true);
|
|
// addWidget("SubDialog", group, "");
|
|
addWidget("ListBox", group, "", 0);
|
|
addWidget("Timer", group, "", 0);
|
|
addWidget("ScriptObject", group, "", 0);
|
|
addWidget("RichTextEditor", group, "", 0);
|
|
addWidget("TreeWidget", group, "", 0);
|
|
addWidget("StatusBar", group, "", 0);
|
|
addWidget("TextBrowser", group, "", 0);
|
|
addWidget("Slider", group, "", 0);
|
|
addWidget("Table", group, "", 0);
|
|
addWidget("DatePicker", group, "", 0);
|
|
addWidget("PopupMenu", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium)));
|
|
addWidget("FontDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium)));
|
|
addWidget("AboutDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)));
|
|
}
|
|
|
|
TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *tqparent, const char *name )
|
|
{
|
|
if (key == "ButtonGroup") return new ButtonGroup(tqparent, name);
|
|
else if (key == "CheckBox") return new CheckBox(tqparent, name);
|
|
else if (key == "CloseButton") return new CloseButton(tqparent, name);
|
|
else if (key == "ComboBox") return new ComboBox(tqparent, name);
|
|
else if (key == "Dialog") return new Dialog(tqparent, name);
|
|
else if (key == "ExecButton") return new ExecButton(tqparent, name);
|
|
else if (key == "FileSelector") return new FileSelector(tqparent, name);
|
|
else if (key == "GroupBox") return new GroupBox(tqparent, name);
|
|
else if (key == "Konsole") return new Konsole(tqparent, name);
|
|
else if (key == "Label") return new Label(tqparent, name);
|
|
else if (key == "LineEdit") return new LineEdit(tqparent, name);
|
|
else if (key == "ListBox") return new ListBox(tqparent, name);
|
|
else if (key == "PixmapLabel") return new PixmapLabel(tqparent, name);
|
|
else if (key == "ProgressBar") return new ProgressBar(tqparent, name);
|
|
else if (key == "RadioButton") return new RadioButton(tqparent, name);
|
|
else if (key == "RichTextEditor") return new RichTextEditor(tqparent, name);
|
|
else if (key == "ScriptObject") return new ScriptObject(tqparent, name);
|
|
else if (key == "Slider") return new Slider(tqparent, name);
|
|
else if (key == "SpinBoxInt") return new SpinBoxInt(tqparent, name);
|
|
else if (key == "StatusBar") return new StatusBar(tqparent, name);
|
|
else if (key == "SubDialog") return new SubDialog(tqparent, name);
|
|
else if (key == "Table") return new Table(tqparent, name);
|
|
else if (key == "TabWidget") return new TabWidget(tqparent, name);
|
|
else if (key == "ToolBox") return new ToolBox(tqparent, name);
|
|
else if (key == "TextBrowser") return new TextBrowser(tqparent, name);
|
|
else if (key == "TextEdit") return new TextEdit(tqparent, name);
|
|
else if (key == "Timer") return new Timer(tqparent, name);
|
|
else if (key == "TreeWidget") return new TreeWidget(tqparent, name);
|
|
else if (key == "Wizard") return new Wizard(tqparent, name);
|
|
else if (key == "DatePicker") return new DatePicker(tqparent, name);
|
|
else if (key == "PopupMenu") return new PopupMenu(tqparent, name);
|
|
else if (key == "FontDialog") return new FontDialog(tqparent, name);
|
|
else if (key == "AboutDialog") return new AboutDialog(tqparent, name);
|
|
else return 0;
|
|
}
|
|
|
|
KOMMANDER_EXPORT_PLUGIN(KomStdPlugin)
|