Quanta Plus User Manual

Quanta Plus User Manual

Quanta Plus User Manual

Robert Nickel <robert@artnickel.com>

Developer up to 2.0: Alexander Yackovlev

Developer up to 2.0: Dmitry Poplavsky

Developer: Eric Laffoon

Developer: András Mantia


Revision 3.00.00

Quanta is a markup and scripting language IDE that strives to be DTD agnostic, supporting web based markup and scripting languages.

It is hoped that Quanta will be easily extensible for uses we cannot imagine at this writing.


Chapter 1. Introduction

Introduction

Chapter 1. Introduction

What is Quanta

From http://quanta.sourceforge.net/:
 

Quanta is a web development tool for the K Desktop Environment. Quanta is designed for quick web development and is rapidly becoming a mature editor with a number of great features.

Our objective remains to create the very best web development tool anywhere. We realize that we will need many more people active to accomplish this so we are in the process of developing enhancements geared toward making it easy for web developers to customize, extend and enhance Quanta. Then we will be asking you, the web developers, to contribute your feature enhancements. We will organize these so that Quanta web developers can find just the resources, extensions and custom plugins they need to be the most kick butt developers ever.

 
--Eric Lafoon 

Doesn't it just bring a tear to your eyes?

KDE Logo
Chapter 2. Installation

Installation

Chapter 2. Installation

This chapter describes obtaining and building Quanta.

Acquiring Quanta

Quanta binary packages

Many linux distros are bundling Quanta. Please check your favorite vendors site for a package tailored to your distro. If that fails, see Linux Easy for a RedHat oriented rpm of the latest cvs source.

Quanta source code

Quanta releases

Release versions of the Quanta source code can be obtained from the SourceForge home page. Once downloaded, simply unpack it into a directory and then go to Building the source to finish.

Quanta CVS access

If you have to have access to the very latest features (and potentially, bugs), you can obtain Quanta via anonymous CVS with the following:

%cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde login
CVS login:<enter>
%cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde co quanta

A short download later, you should have a quanta directory under your current working directory.

To finish things up, cd to the quanta/admin directory and type:

%cvs update -P -C -d -R -r KDE_3_0_BASE

A short while later, all these files will be updated. One last bit before we can build the source.

%make -f Makefile.cvs

This creates a number of files necessary to build the source. From here go to Building the source to finish.

Building the source

Building the source

Building the source

If you acquired Quanta source from CVS, be sure to read this.

Quanta uses automake and autoconf to ease installation from source. If you're familiar with these, skip to Quanta build considerations, otherwise, please read the following.

To install quanta you need KDE 3 and Qt 3.0.x, and run:

%test `echo $KDEDIR` && echo "KDEDIR ok" || echo "KDEDIR not exported"
%test `echo $QTDIR` && echo "QTDIR ok" || echo "QTDIR not exported"
a
b

If these don't return KDEDIR ok and QTDIR ok, you need to set them permanently or in a script that you call to execute Quanta and before you continue with the build process.

Once these are verified to be set, run the following:

%./configure
%make
%make install (as root)
...

*************** Important *************************

 Add path-to-kde3-bin-directory to your PATH

 Please report bugs with our web form at
 http://bugs.kde.org
    Crediting original team members
 Alexander Yakovlev <yshurik@kde.org>
 Dmitry Poplavsky   <dima@kde.org>
    Current maintainers are
 Eric Laffoon       <sequitur@kde.org>
 Andras Mantia      <amantia@freemail.hu>

 The Quanta developers wish you fun with Quanta.
****************************************************

Considerations when building

It's reasonable that you would want to customize the location of the Quanta files on your system. To this end, autoconf has a number of options that can be passed to the configure script to control this setup. To get a complete listing of these options, type ./configure --help. These are straight forward and will not be covered here.

If you're having trouble with Quanta running properly, you should check your path to ensure that the kde3 bin directory is in there. Also, be sure that you don't have any older versions of KDE laying about that appear in %PATH before your kde3 bin directory. The same holds true for Qt.

KDE Logo
KDE Logo
Chapter 3. Using Quanta

Using Quanta

Chapter 3. Using Quanta

Introduction

While striving to become the best HTML editor, the developers of Quanta began to kick about a rather intruiging idea. “What if Quanta was a generic, extensible, markup language editor?”

Well, this is the start of the answer. No longer bound to HTML, Quanta is now well on its way to becoming DTD agnostic. Essentially, if you can define it in XML or SGML, Quanta should be able to serve as an IDE for it.

Now, that said, it must be noted that Quanta is an outgrowth of the outstanding efforts that have been put forth by the entire KDE development community. Quanta, in celebration of open source uses the model of “Why rewrite something somebody already did and maintains already?”

Quanta provides web developers with an intuitive and powerful multiple document interface MDI that can dramatically increase your effectiveness as a web developer. Through the use of custom actions, scripting and toolbar creation you can automate almost any task. With the use of Kaptain, you can extend Quanta, so that you never have to remember scripting command syntax again (More on that in the Advanced Features section.).

The Quanta workspace

Quanta divides workspace files into three areas; Global, Local and Project. These distinctions affect the scope or visibility of the various components in the Quanta IDE.

Global

Global items are available to anyone who uses Quanta. From toolbars to actions, everything marked as global is stored in the common Quanta directory structure. This has the effect of allowing a group of admins to save certain toolbars, actions and templates in the global tree that can then be used to keep a multi-user installation of Quanta common to everyone on the system.

Local

Local items are items that are part of an individual users collection of resources. These are stored in the individual users home directory tree as part of the kde environment information. This exposes all of the items stored as Local for use in any editing that the individual user wishes to work on. This allows you to save your most useful templates and toolbars into your home directory and use them on any documents.

Project

Project items are those items that are of use only to a particular project. These could be anything from a CSS template to a toolbar with a custom action that performs a special magic trick on this project's files. Simply put, this is the most limited scope. All of the items saved in the project workspace be saved in the project's directory tree.

Quanta's MDI Interface

Quanta's MDI Interface

Quanta's MDI Interface


The Quanta MDI editing this document


Quanta's MDI is broken down to three main parts: the editor window, the tree view window and the toolbar.

KDE Logo
The Quanta Editor Window

The Quanta Editor Window

The Quanta Editor Window


Quanta's editor window


Quanta's editor window allows for multiple files to be opened at the same time. When just one file is open, the document fills the entire editor window. As soon as a second document is opened, a small amount of space is taken from the bottom of the editory window to allow for tabs to be displayed with the filenames and a status icon (this picture doesn't show it, but there is a blue floppy icon that shows up to the left of the filename when a file has been altered indicating that a save is necessary).

At the top of the editor window is the editor toolbar set. Currently, Quanta has a default set of toolbars that are loaded. These are Standard, Fonts, Tables, Lists, Forms, Other. These are the original toolbars that have been a part of Quanta for some time now. These toolbars are strictly HTML and will continue to be a part of Quanta but will eventually be loaded only on demand and not by default.

Toolbar usage is pretty straight forward. If you're looking for a basic tag (like <u>), you click on that tag and it is inserted into your document. You then insert your information betrween (if there's a closing tag) the tags and call it good. If you're looking to insert something that takes more information than just you're text (like a <a href...>) then you'll get a dialog box with the various fields you can fill in.


HTML toolbar anchor dialog


KDE Logo
The Quanta Tree View Window

The Quanta Tree View Window

The Quanta Tree View Window


Quanta's tree view window


The tree view is the place where you will navigate and gather information in Quanta. It's tabbed format presents you with a Files, Project, Template, Document Structure and Documentation Tree.

Tabs in the tree view



Files Tree: This is where you can browse your entire filesystem in tree format. You are presented with two perspectives on the filesystem. The first is based on your home directory and the second is the root of the file system. Use this to find existing files on your machine that you'd like to edit or add to an active project. Right clicking on a file in this view gives you several options for managing the selected file and also allows you to insert the file into the active project (if any), or toggle the view between tree and list. Check it out!



Project Tree: Hopefully, if you use Quanta, you'll use projects. Project management is the single most powerful tool that Quanta offers. This view gives you direct access to what that structure looks like and allows you to manage the files in the project through right-click access. Add, remove or upload individual files or delete them entirely from the disk. All with a right-mouse click.



Template Tree: One of the new features in Quanta 3 is templates. Templates can be just about anything that you wish from images to code snippets to an entire web page that you change the heading on. Templates are sorted into three categories based on their scope, or visibility, in the current context. These are Global, Local and Project. As you may have guessed, Global templates are visible all the time. Local tamplates are visible to the user who created them and project templates are visible for a single project only. More on templates here.



Structure Tree: This handy little view gives you a look at how the parser sees your document. It's pretty straight forward and can really help with those sticky required closing tags we always seem to neglect.



Documentation Tree: Listed here is all of the documentation available for you to browse inside of Quanta. You can download pre-packaged docs for Quanta at http://quanta.sourceforge.net/docs.html or you can create your own documentation for Quanta.

KDE Logo
Quanta Toolbars

Quanta Toolbars

Quanta Toolbars



A major portion of Quanta's push to be DTD agnostic is dependent upon ease of use for each separate DTD. To that end, the toolbars in Quanta have been extended a great deal. Toolbars are easy enough to understand. You click onthe button and you get an associated action from that button. The really cool part here is that you can define your own actions in Quanta.

Using toolbars in Quanta is incredibly simple. Selecting the Toolbars (Alt+l) menu item reveals options to load, save, add and email toolbars.

Loading and saving toolbars is pretty straight forward. When you choose to load a toolbar, you may choose from one of the three workspaces in Quanta.

One of the most exciting new features of Quanta toolbars is that you can email them directly from Quanta. When you do so, Quanta bundles all of the actions and the toolbar information into a zipped tar archive then pushes it out via KMail. Once you receive a toolbar in email, you can save it anywhere and load it into Quanta like any other toolbar!

How to use toolbars in Quanta

As previously mentioned, toolbars in Quanta are primarily maanged through the Toolbars menu item. Usability and creation are somewhat different. Creation is deferred to an as there is more involved there. Usability will be discussed now.

Using toolbars is quite simple. You click on the icon of the desired tag or and one of three possibilities occur: the tag is inserted (optionally with a closing tag) (e.g. the bold HTML tag), a tag dialog is activated letting you fill in the multiple tag features in a dialog box (e.g. the anchor HTML tag), and lastly, an action is activated that does something nifty for your current file/project/whatever. For the first, I'll give no example as it is easy enough to understand. As to the second and third, read on...

Tag dialogs are defined in XML and stored in a tags subdirectory under your .kde subdirectory or with the Quanta distribution wherever you put that. I bring this up only to note that, if you find yourself doing tedious and redundant typing for a particular tag that isn't in Quanta, you can add it. Anyway, a tag dialog looks just like this:



This happens to be the anchor tag referenced above. If you know anything about HTML, you'll notice that that's just about all the attributes you can have for an anchor. Notice the tabs above for i18n and Events. Now all you do is fill in the blanks for those items you want in your anchor, click ok and, voila!, you have a well formed anchor set down at the current cursor position.

As for scripting actions, if you create two files in your home directory with the following contents, you'll have a fun surprise.

dt.actions

<!DOCTYPE actionsconfig>
<actions>
<action icon=“mini-book1.png” type=“script” name=“usr_1” \
	text=“Shell” > <script output=“message” error=“message” \
	input=“none” >xterm</script>
</action>
</actions>

dt.toolbar

<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="quanta" version="2">
  <ToolBar tabname="My1stToolbar" name="dt" >
   <text>My1stToolbar</text>
   <Action name="usr_1" />
  </Toolbar>
</kpartgui>
Now click on Toolbars->Load Toolbars->Load Local Toolbar, browse to the dt.toolbar file in your home directory (remember to change the file mask to * from *.toolbar.gz) and the action that you created is now loaded on a toolbar called My1stToolbar which is to the right of the others. Clicking on the action on the toolbar will give you an xterm window.

KDE Logo
Quanta's Menus

Quanta's Menus

Quanta's Menus

Robert Nickel

Some of the items listed in this section may be incorrect. If you find an error, please drop a line to <robert@artnickel.com> and let me know about it. Much of the menu tree was changed shortly after I wrote this section.

File Menu

File->New (Ctrl+N)

Create a new, blank file.

File->Open (Ctrl+O)

Search the filesystem to open an existing file. You can also use the kio slaves here to open up files from the network by placing the kio slave tag at the beginning of the url. (e.g. ftp://foo.bar.com/myfile.html)

File->Open Recent

Quick list of the last several files you've opened for ease of use. This list will change each time you open a file that is not on it, with the oldest being bumped off first.

File->Save (Ctrl+S)

Save the active file's changes.

File->Save As

Save the active file with another name.

Save As Template

This allows you to save code snippets and entire files as a template for later use. See the section on templates

File->Save All (Ctrl+Shift+S)

Save all modified files in the editor.

File->Print (Ctrl+P)

A new feature in Quanta! You can actually print out your documents. Uses the kprinter interface.

File->Close (Ctrl+W)

Close the currently displayed file.

File->Close All

Close all open files. Prompting for save if modified, of course.

File->Quit (Ctrl+Q)

Exit Quanta

Edit Menu

Edit->Undo (Ctrl+Z)

Undo the last action performed.

Edit->Redo (Ctrl+Shift+Z)

Redo the last action undone.

Edit->Cut (Ctrl+X)

Cut the current block of text and place its contents on the clipboard.

Edit->Copy (Ctrl+C)

Copy the current block of text to the clipboard.

Edit->Paste (Ctrl+V)

Paste the contents of the clipboard at the current cursor position.

Edit->Paste Special

Edit->Paste Special->HTML Quoted

Converts the clipboard text HTML special characters to html entities before pasting into the text body so they show up properly when viewed and aren't picked up as tags by the client browser.

Edit->Paste Special->URL Encoded

Edit->Select All (Ctrl+A)

Select all of the text in the current document.

Edit->Deselect (Ctrl+Shift+A)

Unselect all text in the current document.

Edit->Toggle Block Selection (F4)

Turn on/off block highlighting. Allows you to select text blocks with your keyboard without holding down the shift key.

Edit->Find (Ctrl+F)

String or regular expression pattern to find in the current document.

Edit->Find Next (F3)

Repeat the find downward in the document from the current location.

Edit->Find Previous (Shift+F3)

Repeat the find upward in the document from the current location.

Edit->Replace (Ctrl+R)

String or regular expression replacement of text in the current file.

Edit->Find in Files (Alt+Ctrl+A)

Find a string or expression in files in the selected directory. Sort of a gui grep or sed with some predefined pattern spaces to help you out.

Edit->Indent (Ctrl+I)

Move the selected block of text one tab width to the right.

Edit->Unindent (Ctrl+Shift+I)

Move the selected block of text one tab width to the left.

Edit->Comment (Ctrl+#)

Deprecated. HTML specific function that will be pulled soon. Don't get used to it as it's HTML comments and not DTD specific.

Edit->Uncomment (Ctrl+Shift+#)

Deprecated. HTML specific function that will be pulled soon. Don't get used to it as it's HTML comments and not DTD specific.

Edit->Apply Word Wrap

Wrap the text in the current window to a predefined width.

Edit->Go to Line (Ctrl+G)

Go directly to a specific line number. This is really helpful when your PHP script is barfing at you!

Edit->Spelling...

Check the spelling in the current document.

View Menu

View->Show Files Tree

Toggle display of the files tree.

View->Show Project Tree

Toggle display of the project tree.

View->Show Template Tree

Toggle display of the template tree.

View->Show Structure Tree

Toggle display of the document structure tree.

View->Show Documentation Tree

Toggle display of the documentation tree.

View->Show Preview (F6)

Preview the current document.

Back

Navigate back one step in the preview.

Forward

Navigate forward one step in the preview after having gone back in the preview.

View->Reload Preview (F5)

Reload the preview from disk.

View->View with Netscape (Alt+F6)

View the current file with Netscape (Mozilla).

View->View with Konqueror (Ctrl+F6)

View the current file with Konqueror.

View->View with Lynx (Shift+F6)

View the current file with Lynx (text based browser).

Bookmarks Menu

Bookmarks->Toggle Bookmark (Ctrl+B)

Toggle a bookmark at the current line location in the current file.

Bookmarks->Clear Bookmarks

Clears all set bookmarks.

Project Menu

If you are looking for a description of how to use projects in Quanta, go here instead.

Project->New Project

Launch the project creation wizard.

Project->Open Project

Open an existing project file from disk. Quanta projects are saved with the .webprj extension.

Project->Open Recent

Gives you a list of your most recently used projects for quick access.

Project->Save Project

Save the current project to disk.

Project->Close Project

Close the current project.

Project->Insert Files

Presents a dialog that allows you to select files to add to your current project. These files will then be copied into the project directory for editing.

Project->Insert Directory

Insert a directory and all of its contents into the current project.

Project->Rescan Project Directory

Scan the project directory for any new files you may have there. This allows you to copy graphics into your project directory or a subdirectory thereof and then add them to the project.

Project->Upload Project

Upload the files in your project to the hosting server. The list of available transports depends on the version of KDE you are running and whether or not you've downloaded extra kio slaves.

Project->Project Options

Settings affecting the way Quanta manages your project. See the Quanta projects section for details.

Tags Menu

This menu contains a list of the tags that are on the currently loaded toolbars. i.e. If you have the Standard (HTML) toolbar loaded, the Tags menu will contain a submenu Standard which will contain the list of tags/actions on that toolbar. This is a pretty cool little keyboard navigation scheme that Andras came up with of a sudden one day.

Tools Menu

Tools->Change DTD Type

Pops up a dialog box that allows you to change the current documents DTD (Document Type Defininition)

Tools->Edit Current Tag (Ctrl+E)

Allows you to access the current markup tag's settings dialog if one exists.

Tools->Syntax Check

Checks the syntax of the current document against the selected DTD.

Toolbars Menu

Toolbars->Load Toolbars

Toolbars->Load Toolbars->Load Global Toolbar

Loads a globally defined toolbar. These are kept in $KDEDIR/share/apps/quanta/toolbars by default.

Toolbars->Load Toolbars->Load Local Toolbar

Loads a locally defined toolbar. These are kept in $HOME/.kde/share/apps/quanta/toolbars by default.

Toolbars->Load Toolbars->Load Project Toolbar

Loads a project toolbar. These are kept in <ProjectDir>/toolbars and are only available in this menu if they have been assigned to this project.

Toolbars->Save Toolbars

Dialog for saving your toolbars. Allows you to pick the type of toolbar; Local or Project.

Toolbars->Save Toolbars->Save as Local Toolbar

Save as a local toolbar to $HOME/.kde/share/apps/quanta/toolbars

Toolbars->Save Toolbars->Save as Project Toolbar

Save as a project toolbar in <ProjectDir>/toolbars

Toolbars->Add User Toolbar

Brings up a dialog to create a new toolbar. This only creates the name. Actions must be added from the Settings->Configure Actions menu item. Toolbars are saved via the Toolbars->Save Toolbars menu or on close unsaved toolbars will prompt for you to save.

Toolbars->Remove User Toolbar

Remove a toolbar from usage. This does not remove it from the disk. If you've not saved the toolbar you are removing, you will be prompted to save it.

Toolbars->Send Toolbar in Email

This is a hook to email your custom toolbar to someone (maybe the Quanta team for inclusion in the next release!) for their use. It spawns an email window and attaches your toolbar file to it automagically.

Settings Menu

Show Toolbar

Toggle display of the Quanta toolbar. This has no effect on the action toolbars.

Show Statusbar

Toggle display of the status bar along the bottom of the editor.

Show Messages

Toggle display of the message window. This is the window where you see the output of any scripting actions and the debugger.

Show Icon Border

Toggle display of the icon border to the left of the main editor window. This bar allows for click toggling of bookmarks.

Show Line Numbers

Toggles the display of line numbers along the left side of the main editor window.

Configure Editor

Setup the behavior of the editor window. See the documentation on Kate for details.

Configure Quanta

Setup the behavior of Quanta.

Configure Actions

This is where you define the actions for use on toolbars. Please see the

Configure Toolbars

Dialog that allows you to add/delete items to/from toolbars and change the order the icons appear in.

Configure Shortcuts

Allows you to configure the many editor shortcuts available to Quanta.

Highlight Mode

Choose the syntax highlighting mode for the current file. The list of available highlighting schemes varies depending on your version of Kate.

End of Line

Select the end of line encoding type. Useful if you have folks using other OS platforms to develop on (shudder at the thought). Choose from Unix, Windows/DOS or Macintosh.

Help Menu

Quanta Handbook

What's this?

This gives a little question mark next to your pointer and allows clicking on an object for specific help. At the time of this writing this feature is not implemented.

Context Help

This should produce help based on the current pointer context. At the time of this writing this feature is not implemented.

Report Bug

This gathers the operating environment for Quanta and produces a link to the kde bug wizard.

About Quanta

All about Quanta, it's authors and supporters. Also contains a copy of the software license that Quanta exists under.

About KDE

Displays a popup window with information about your running kde, how to report bugs for kde, how to join the effort and more.

KDE Logo
Projects in Quanta

Projects in Quanta

Projects in Quanta

New Projects

The Quanta project wizard ( Project->New Project) makes project creation a breeze.



The fields are pretty straight forward and are best filled in from top to bottom as filling in the project name will relieve you of some effort of typing in all the directory structure for the rest of the project. However, we're open source and will not limit your uses of this program. All of these paths and author information fields are configurable at this point and later from the Project->Project Options (F7) menu tree on the General Tab.

Project Name

This is the name of your project. Whatever you wish to call it. For means of example, we'll call ours foo. As you type into this field you'll notice that the Project destination, source file, templates and toolbars fields all fill in with default values. All paths in this project will be set relative to the current users home directory where the destination directory will be set to $HOME/<Lower-Case-Project-Name-Without-Spaces> (e.g. $HOME/foo/ is the destination directory).

Project destination

This is the directory where all of the project files will be stored. By default, this is $HOME/foo where foo is the name of your project in all lower case letters.

Project source file

This is the name of the Quanta project file. By default it is the name of your project in lower case letters without whitespace with the webprj extension (e.g. foo.webprj). This file is stored in the root of the Project destination directory.

Project templates

This is where the templates for this project will be stored. By default it is <Project destination>/templates. If you have a common set of files that you use for several projects, it may be useful to point this there instead of the default.

Project toolbars

This is where the toolbars for this project will be stored. By default it is <Project destination>/toolbars. If you have a common set of toolbars that you use for several projects, it may be useful to point this there instead of the default.

Author

Insert your name (or alias) here.

Email

Email where you'd like things regarding this project to go. Hopefully, it belongs to you.

Project Sources

Add local files

This allows you to get files from the local filesystem. You can choose multiple files or entire directories. Use of kio slaves is not allowed.

Use wget to download files from site

This option is great if you have static web content that you wish to download and modify. For server side scripting (a la PHP, Python, etc.) you'll have to get the files another way.

The last screen of the new project wizard has 3 settings that can make your life easier. These settings are avialable for change from the Project->Project Options (F7) menu tree on the Network Tab.

Use preview prefix

This allows you to set the path prefix to something other than your local filesystem. This is most useful for pages that contain dynamic content and are dependent on server processing (like PHP, JSS, Python, etc.). Simply type in the first portion of the address as it exists on that server and the filepath at the end will be complete by quanta. For example, if you have the domain bar.com and you're editng the index.html page, you could edit it on your remote machine (foo.bar.com), upload it to the server and press F6 to see the results from www.bar.com instead of your local filesystem.

Insert global templates

This makes a copy of the global templates in your projects directory tree.

Insert local templates

This makes a copy of the local templates in your projects directory tree.

Using projects

Project files

Robert Nickel

By default Quanta will open the last project accessed when launched. This behavior is not currently configurable.

To open another project, select Open from the Project menu or the Open Project icon on the toolbar. The open project dialog will pop up and allow you to choose the project you wish. Projects have a webprj extension.

When closing Quanta, your project file will be saved automatically. You will be asked to save any changes before exiting if Quanta detects any changed files. This same behavior occurs if you load a new project.

The Project Tree View

Robert Nickel

The project tree view gives you uncluttered access to the files in your project. This is where you manage the files in the current project.

For files, a right mouse button (RMB) click brings up the following menu:



These items are fairly self-explanatory and will be left to the reader for exploration.

Directories are similar and are just missing the Open with and Open in Quanta RMB menu items:



These items are left to the reader for exploration as well.

Uploading Projects

Robert Nickel

The upload projects dialog:



Host

This is the hostname of the server your copying the files to. Either fully qualified domain name, or an ip address will work.

Protocol

Transfer protocol to use for this upload. Depending on your version of KDE and whether you've downloaded extra kio slaves, this list will vary. At the very least you should be able to choose from ftp, file and nfs.

Path

This is the base path on the remote host that you will be copying files to.

Port

Port for the transfer. Usually this won't need to be bothered unless your network administrator is hosting a service on a port other than it's well known port.

User/Password

User name to use for authentication. If you're using Linux and I need to explain this to you, send me an email for your slap! ;-)

Keep Password

Depending on your level of paranoia, this is a good or bad feature. Use it at your discretion. FYI, the password is kept ??? and is clear text.

All button

Select all files in your project for upload.

Modified button

Select all modified files for upload.

Clear button

Unselects all files in the list.

Upload button

Duh! Beam 'em up Scotty.

Cancel button

This will abort your transfer in progress or just exit out of the dialog if you change your mind before starting the upload.

KDE Logo
Quanta Templates

Quanta Templates

Quanta Templates

Templates are basically skeleton documents, code snippets and files to link to. Quanta uses templates fundementally as a standard file system with enhanced organization and interfacing. You can copy, move or link any repository currently on your system into the templates tree. Think of Quanta templates as having roughly the limitations to your imagination that your file system has.

Templates exist in nested directories. There is no limit to how deep you can nest them however within any given directory Quanta expects a consistent action for the base template type described below. Additionally templates allow for pre and post text to be concatonated to non document type templates. This facilitates tag creation. The next update after the introduction is scheduled to add the ability to pass variables to the text such as image size information to assist in tag creation.

Our goal with templates is to extend them to include multi file "concept" templates useful for things like placing an order or creating an about section, Ideally this will be a tool for making your work more productive and dynamic. An eventual goal is to have a structural template design mode to deal with site layout and structure which you could use to design and interactively update your sites. If you would like to be involved, check out our help wanted page.

Important

Some of the templates that ship with Quanta have conditions for their usage. Please read carefully the usage statement of conditions at the top of each template before you use it.

Template types

Currently templates are limited to being one of the following types of objects:
Document
Text to insert in a document
A file to link to form a document

Documents can be any type of document. Generally you would want to nest more specific or diverse documents in subdirectories. Here you can make a basic framework for what you do and deliver it to your work in an organized fashion and realize much better effiency. Text insertion could be anything from a snippet of code to a script or whatever you might wish to use. This overlaps the ability to insert text blocks as an action which can be triggered from the toolbar. Linked files can be binary, PHP class libraries or whatever.

Template scope

Templates are accessible based upon their established workspace in Quanta

Creating templates

Create a document structure that you love (XML, HTML, DocBook, etc.) and click on File->Save as Template->Save as Local/Project Template.

Once this is done, you'll notice that (even if it's saved as a Project template) the template does NOT show in the project tab view. Look into the templates view to find your template under the Project templates tab.

Additinoally if you look at your options with the Right Mouse Button (RMB) you will see complete file management tools for creatind directories or copying and pasting templates from one location to another.

Using templates with Projects

Project templates allow you to be more tightly focused. You can create headers, footers or go dynamic with PHP include files and link them. Additionally there are some very cool things we took into consideration when using templates in projects.

When creating a project you can opt to copy over all global and user templates. Legacy project get default templating abilities so nothing is lost You can choose where to locate your template files so they can be in your server root and easy to upload or you can make them secure to link to below server root which is a very cool trick When linking to a file not in the project templates you will be prompted to copy the file to the project templates prior to linking. This will prevent broken links on upload. You always have control where you place your templates so you can choose to move them. However Quanta does not track this so you will need to change links. This is a good task for kfilereplace which we are setting up to plug in as a kpart.

Managing Template Behavior

Template structure on the template tab is based on the files found in $KDEDIR/share/apps/quanta/templates and $HOME/.kde/share/apps/quanta/templates. Each of these directories is specified as one of three types of container:

files/all

binaries and such things that get inserted by their url (ie images as an <img src=/src/url>

text/all

text that you can insert into the current quanta document. stuff like repetitive blocks etc

template/all

document templates which you can create new documents from. these open a new window in quanta.

To set the behavior of each directory, righ-click in the template view on the directory and choose proerties. The folowing dialog will come up:



Type

Drop down box with the three types discussed prefiously; files, text, template. This box will be grayed out if you have the inheret parent attribute box checked.

Inherit parent attribute (<blah>)

This is checked by default and is fine for all but the top level directories in your templates tree. If the top level directory has this checked, it will basically deactivate templates for that directory and all that aren't explicitly set below it. If this is not a top level directory, then the <blah> will say something like text/all. If it says nothing, then chances are that you're on a top level directory.

Use pre/post text

Enables pre and post text for templates in this directory. This could be a common header/footer for all of your templates for a given project and then you copy content templates into that directory and have a complete page with the custom header/footer as a starting point.

Pre-text

The actual text to insert before your templates content.

Post-text

The actual text to insert after your templates content.

KDE Logo
KDE Logo
Chapter 4. Quanta Advanced Features

Quanta Advanced Features

Chapter 4. Quanta Advanced Features

This chapter outlines the advanced features of Quanta.

Using Kommander with Quanta

Kommander by Marc Britton.

Debugging in Quanta

Debugging in Quanta

Debugging in Quanta

Using the PHP debugger

Sorry. Nothing yet.

Using qxsldbg with Quanta

Sorry. Nothing yet.

KDE Logo
Quanta Tag Files

Quanta Tag Files

Quanta Tag Files

Quanta uses tag files to define the various actions that are available for toolbar association. These tag files can define a simple tag with no attributes or they can define a tag dialog box that will remember all of the available attributes for you so that you can simply fill in the blanks.

Important

Spaces don't adversely affect anything, but watch out for & and < characters. These should likely be replaced by &amp; and &lt; respectively in all of the xml based Quanta resource files. This won't cause a crash, but you'll have chunks of your work disappear if you forget.

Tag File Structure

Possible entries for the type attribute of the attr tag: To get a list of possible types, I did the following against the tag dirs: grep -h type= *.tag |sed -e 's/^.*type=\"\([a-z]*\).*/\1/'| sort |uniq

These are the types for tag dialog items:
check
color
input
list
text
url

These are the argument types inside the php function tags, ask Andras if these are pretty much free form and the former are keywords:
array
bool
boolean
char
constant
flags
float
function
int
long
mixed
number
object
resource
resoure
string

The tag definition has the following optional attributes:

hasScript

"1" if common events/scripts can be associated to this tag (onclick etc.)

hasCore

"1" if common core attributes are present (id, class, etc)

hasI18n

"1" if common i18n attributes are present (lang, dir)

single

"1" if it is a single tag (eg. <hr>)

optional

"1" if it is an optional tag (eg. <colgroup>)

returnType

for scripting languages, the function return type if any. (eg int)

The <attr> definition can have the following attributes:

defaultValue

the default value of the tag ???

status

can be “optional”, “required”, “implied”

For scripting language functions, define tag files as such:


<!DOCTYPE tags>
<tags>

<tag name=“[function-name]” type=“function” returnType=“[return-type]”>
  <attr name=“[argument1]>” type=“[argument1-type]”></attr>
  <attr name=“[argument2]” type=“[argument2-type]” status=“optional”></attr>
    ...
</tag>
<tag ...
...
</tag>
 ...
</tags>

Items in [] are to be substituted. argument1 above is required and argument2 is optional.

A tag file that you want to have tag dialog editing of should look like this:


<!DOCTYPE tags>
<tags>
  <tag name="[name] [hasCore="[01]" hasI18n="[01]" hasScript="[01]"]>
    <attr name="[attribute1]" type="[check|color|input|list|text|url]">
      <text></text>
      <textlocation col="0" row="0" />
      <tooltip></tooltip>
      <location col="1" row="0" colspan="3"/>
    </attr>
  ...
  </tag>
  ...
</tags>

<text></text> defines brief descriptive text for the object.

<textlocation ... /> defines row and column layout for <text> tag.

<tooltip></tooltip> is text description for a hovering user.

<location ../> defines the location of the object for that attribute.

All the attributes must be enumarated in the tag file. If you don't want to appear in the tagdialog, just forget the <location> tag. eg <attr ...> </attr>

KDE Logo
KDE Logo
Chapter 5. Extending Quanta

Extending Quanta

Chapter 5. Extending Quanta

This chapter describes how to customize Quanta to your particular needs and how you can help Quanta become better.

Creating Your Own Docs for Quanta

Probably the most notable additions to Quanta for the general user will be the addition of documentation for the markup or scripting language that you like best. To that end, this chapter will explain how I create the php documentation tree for my personal use.

Before starting on creating your own documentation, you may wish to check out the Quanta repository to see if someone else has already done this set.

There are two parts to this process. First, you must obtain the existing documentation for the markup/scripting/etc language that you're after. Second, you have to create the docrc file. The first is up to you, the second is what we'll cover here.

The general form of the docrc file is as follows:


#KDE Config File
[Tree]
Doc dir=<path, relative to this file, of the documentation html files> e.g. php42/
#top level elements
Top Element=<Your description for these docs> e.g. PHP 4.2 documentation

Section 1=Section1.html
Section 2=#Sec2.1,#Sec2.2,#Sec2.3
Sec2.1=Sec2.1.html
Sec2.2=Sec2.2.html
Sec2.3=Sec2.3.html
...

[Context]
ContextList=func1,func2,tag1,tag2,tag3
func1=func1.html
func2=func2.html
tag1=tag1.html
tag2=tag2.html
tag3=tag3.html

The docrc is broken down into two sections: Tree and Context.

The Tree section defines the presentation aspect of the documentation in the documentation tab. For example, you'll see that in the php docs you have something akin to this:

Relating this to the above, my php docrc looks like this:


#KDE Config File

[Tree]

Doc dir=php42/

#top level elements
Top Element=PHP 4.2 documentation

PHP 4.2 documentation=Table of Contents,#Getting Started,#Language Reference

Table of Contents=index.html

Getting Started=Introduction, ...
Introduction=introduction.html
...

Language Reference=Basic syntax, ...
Basic syntax=language.basic-syntax.html
...

Notice the # in front of “Getting Started” and “Language Reference”. This indicates that these are sub containers in the tree and have content of their own. I don't believe that there is a set limit to the depth here (other than that driven by sanity) - use your judgement.

For the Table of Contents, you'll notice that it is referenced directly to a file (and consequently shows up at the bottom of the tree view - directories first!).

Important

Spaces don't adversely affect anything, but watch out for & and < characters. These should likely be replaced by &amp; and &lt; respectively in all of the xml based Quanta resource files.

The Context section is the section of the docrc file that is used to facilitate context sensitive help. For example, you're writing a PHP script and you'd like to see the docs for the mysql_fetch_array function. You simply highlight the function and then press (Ctrl+H) for context help. Woosh! You're viewing the docs on mysql_fetch_array. There are only two entry types here: the ContextList and the file association lines.

ContextList

Really simple, this is just a comma separated list of the context items you wish to have available (for PHP, these are the functions for PHP).

File association lines

These are of the form context item=html doc page. e.g. acos=function.acos.html

A pared down version of my docrc Context section is as follows:


#Keywords for context help
[Context]
ContextList=abs,acos,acosh,addcslashes,addslashes,...

abs=function.abs.html
acos=function.acos.html
acosh=function.acosh.html
addcslashes=function.addcslashes.html
addslashes=function.addslashes.html
...

Now you can just save your docrc file, save it in $HOME/.kde/share/apps/quanta/doc or $KDEDIR/share/apps/quatna/doc for local or global use respectively. Then create a directory (the one specified in your docrc file) in the same directory as your docrc file and copy your html doc pages in there.

You'll need to restart Quanta and then you'll see your docs.

Once you're sure that they're good and worth sharing, send the docrc file along with a description of any pertinent information on what docs you used to the Quanta repository for use by the Quanta community. You won't get rich, but you'll feel great knowing that you contributed to the best web development platform around.

Creating Actions in Quanta

Creating Actions in Quanta

Creating Actions in Quanta

Robert Nickel

Actions in Quanta are the basis for nearly all the extensions that Quanta has and will acquire in the future. The same mechanism that defines an action in Quanta enables autocompletion and tag dialogs. With actions, the limit of what you can do is virtually limitless. For means of an example, we will use html tidy on our web pages.

Let's get started: Settings->Configure Actions

Once you start the actions dialog you'll see this window. To the left is the list of currently known actions. You can select one of those and perform the same actions for an existing action that we're going to do with our html tidy action.

We're going to make a new action, so let's click on the new button (lower left) and begin.

Now you're presented with a blank set of options to fill in:

Text

This is the name of the action

Tool tip

Not sure where this get's displayed. It's optional!

Status text

Don't know what this is for or where it's used. It's optional!

Place this action onto (checkbox)

This enables the drop down box for selection of a toolbar to place this action onto. If you don't choose now, you can always add them later from Settings->Configure Toolbars.

After filling in these basics, you can select an icon for the action by clicking on the icon button to the left of the 'Text' input box.

Now to the meat of the matter. The actions definition.

If we were defining a markup tag, we could use the tag tab here to input the tags parameters.

To whit:

<tag>

This is where you enter the tag name as it will appear in your document. e.g. <div align=center>

</tag>

This is where you enter the closing tag, if any, or uncheck the box if none. e.g. </div>

Run “Edit Tag” dialog if available

This runs the dialog editor if there is a tag file defined for this item. Check out the tag files section for more information on tag files.

And now... Back to our regularly scheduled program. Continuing on the html tidy action creation.

Click on the Script tab to reveal the following:

Input box at top

This is where you place the executable that you're after. In our case, it would be /usr/local/bin/tidy because that's where I keep tidy.

Now on to the Input/Output/Error tabs.

Input Tab

None (radio button)

Don't take any input for this script. This could be useful if you were calling a Tcl/Tk script that popped up a window for interaction with the user and then returned its results. We'll be choosing something else for tidy.

Selected text (radio button)

Just what it says. It pushes a copy of the currently selected text out to the standard in of the script in the input box above. We could use this for tidy, but it's no fun to select everything in a large document.

Current document (radio button)

Pipes the contents of the editor version of the file through to the standard in of the script in the input box above. This is what we'll use for tidy.

Now click on the Output tab. This is where we decide on our redirection for your scripts output.

None

Duh. This would be fine if you're launching an external application that only takes input but doesn't output anything. This is no real use for us with tidy.

Insert in cursor position

Just what it says. Be certain you're where you want the text inserted. No good for tidy.

Replace current document

Total file replacement here. It won't overwrite the file on disk, but it will blast your current edit session. Use with caution. We won't use this for tidy.

Create new document

Output to a new document in the edit window. This is the best choice for tidy.

Message window

Output to the message window (Ctrl+M). This is useful for debugging and the Error tab, but not much else for Output. Not for tidy.

For the Edit tab, the options are the same as the Output tab. Usually, you'll use the message window, to help in debugging, or none option.

KDE Logo
KDE Logo
KDE Logo