Difference between revisions of "Projects/KNS2/Packager"

< Projects‎ | KNS2
Jump to: navigation, search
m (Text replace - "</code>" to "</syntaxhighlight>")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{note|Names are just temporary. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.}}
+
{{warning|Names are just temporary. Infos can be as well. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.}}
 
+
= The Packager =
+
This task is mostly done, this is the API I came out with:
+
  
 +
== The Packager/Uploader ==
 
The syntax I'd like to came up with is:
 
The syntax I'd like to came up with is:
 
<div class="codebox">
 
<div class="codebox">
 
<div class="codebarbg">Code</div>
 
<div class="codebarbg">Code</div>
<code cppqt>
+
<syntaxhighlight lang="cpp-qt">
 
Plasmagik packager;
 
Plasmagik packager;
 
packager.setPackageType(...);
 
packager.setPackageType(...);
 
packager.setSomething();
 
packager.setSomething();
 
packager.show();   
 
packager.show();   
</code>
+
</syntaxhighlight>
 
</div><noinclude>
 
</div><noinclude>
or something like that
+
or something like that --[[User:Ruphy|Ruphy]] 18:14, 12 March 2007 (CET).
  
==== Packager API ====
+
Plasmagik inherits QDialog
 +
 
 +
This task is mostly done, this is the API I came out with:
 +
== Proposed API (packaging section) ==
 
* '''Plasmagik::PackageType''' -> Predefined list of package types. See packaging.txt for the complete list.
 
* '''Plasmagik::PackageType''' -> Predefined list of package types. See packaging.txt for the complete list.
 
* '''setPackageType(Plasmagik::PackageType, bool clearFirst)''' If clearFirst == true, clearProgrammingLanuages() will be called.
 
* '''setPackageType(Plasmagik::PackageType, bool clearFirst)''' If clearFirst == true, clearProgrammingLanuages() will be called.
* '''setProgrammingLanguages(QString/QStringList &languages)''' If languages is QString, languages are separated by '|'. It will call clearProgrammingLanguages().
+
* '''setProgrammingLanguages(QString/QStringList languages)''' If languages is QString, languages are separated by '|'. It will call clearProgrammingLanguages().
 
* '''QString/QStringList programmingLanguages()'''
 
* '''QString/QStringList programmingLanguages()'''
* '''addProgrammingLanguages(QString/QStringList &languages)''' Same as setProgammingLanguages, but it won't call clearProgrammingLanguages() first, and will add languages to the end.
+
* '''addProgrammingLanguages(QString/QStringList languages)''' Same as setProgammingLanguages, but it won't call clearProgrammingLanguages() first, and will add languages to the end.
 
* '''clearProgrammingLanguages()''' It will remove any language previously set.
 
* '''clearProgrammingLanguages()''' It will remove any language previously set.
  
===== Proposed improvements =====
+
* '''setIcon(QIcon icon)''' Sets the icon for the dialog
* Renaming *ProgrammingLanguages --> *Languages
+
 
 +
* '''setPackageExtension(QString extension)''' Sets the provided extension as the one used when saving the package. It will be passed as-is to KFileDialog.
 +
 
 +
* '''setText(Plasmagik::Label label, QString text)''' You can customize GUI strings with that function
 +
 
 +
==== Improvements proposed for this section ====
 +
* Rename ProgrammingLanguages --> content, or such
 +
* setPackageExtension(QString extension) with mimetype instead of string?
  
==== Networking API ====
+
== Proposed API (networking section) ==
 
* '''TODO!'''
 
* '''TODO!'''

Latest revision as of 21:57, 29 June 2011

noframe
 
Warning
Names are just temporary. Infos can be as well. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.


Contents

[edit] The Packager/Uploader

The syntax I'd like to came up with is:

Code
Plasmagik packager;
packager.setPackageType(...);
packager.setSomething();
packager.show();

or something like that --Ruphy 18:14, 12 March 2007 (CET).

Plasmagik inherits QDialog

This task is mostly done, this is the API I came out with:

[edit] Proposed API (packaging section)

  • Plasmagik::PackageType -> Predefined list of package types. See packaging.txt for the complete list.
  • setPackageType(Plasmagik::PackageType, bool clearFirst) If clearFirst == true, clearProgrammingLanuages() will be called.
  • setProgrammingLanguages(QString/QStringList languages) If languages is QString, languages are separated by '|'. It will call clearProgrammingLanguages().
  • QString/QStringList programmingLanguages()
  • addProgrammingLanguages(QString/QStringList languages) Same as setProgammingLanguages, but it won't call clearProgrammingLanguages() first, and will add languages to the end.
  • clearProgrammingLanguages() It will remove any language previously set.
  • setIcon(QIcon icon) Sets the icon for the dialog
  • setPackageExtension(QString extension) Sets the provided extension as the one used when saving the package. It will be passed as-is to KFileDialog.
  • setText(Plasmagik::Label label, QString text) You can customize GUI strings with that function

[edit] Improvements proposed for this section

  • Rename ProgrammingLanguages --> content, or such
  • setPackageExtension(QString extension) with mimetype instead of string?

[edit] Proposed API (networking section)

  • TODO!

This page was last modified on 29 June 2011, at 21:57. This page has been accessed 7,212 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal