Changeset 69ec30c


Ignore:
Timestamp:
12/10/13 08:03:39 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
d4237445
Parents:
fd03a3a
Message:

Add a new "ModuleUtils?" to EasyPBI. The new PBIModule class is all the raw Module interactions, while this new ModuleUtils? class contains all the EasyPBI simplifications for a module. So now the raw module functionality is not impaired by the special EasyPBI simplifications anymore.

Location:
src-qt4/EasyPBI-devel
Files:
2 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI-devel/EasyPBI.pro

    r809d133 r69ec30c  
    2121        preferencesDialog.cpp \ 
    2222        aboutDialog.cpp \ 
    23         PBIModule.cpp 
     23        PBIModule.cpp \ 
     24        ModuleUtils.cpp 
    2425 
    2526HEADERS  += mainGUI.h \ 
     
    3031            preferencesDialog.h \ 
    3132            aboutDialog.h \ 
    32             PBIModule.h 
     33            PBIModule.h \ 
     34            ModuleUtils.h 
    3335 
    3436FORMS    += mainGUI.ui \ 
  • src-qt4/EasyPBI-devel/Makefile

    r809d133 r69ec30c  
    11############################################################################# 
    22# Makefile for building: EasyPBI 
    3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Dec 9 16:12:58 2013 
     3# Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Dec 10 10:59:18 2013 
    44# Project:  EasyPBI.pro 
    55# Template: app 
     
    5252                preferencesDialog.cpp \ 
    5353                aboutDialog.cpp \ 
    54                 PBIModule.cpp moc_mainGUI.cpp \ 
     54                PBIModule.cpp \ 
     55                ModuleUtils.cpp moc_mainGUI.cpp \ 
    5556                moc_newModuleDialog.cpp \ 
    5657                moc_preferencesDialog.cpp \ 
     
    6768                aboutDialog.o \ 
    6869                PBIModule.o \ 
     70                ModuleUtils.o \ 
    6971                moc_mainGUI.o \ 
    7072                moc_newModuleDialog.o \ 
     
    192194dist:  
    193195        @$(CHK_DIR_EXISTS) .tmp/EasyPBI1.0.0 || $(MKDIR) .tmp/EasyPBI1.0.0  
    194         $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.h modBuild.h backend.h newModuleDialog.h config.h preferencesDialog.h aboutDialog.h PBIModule.h .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents EasyPBI.qrc .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents main.cpp mainGUI.cpp modBuild.cpp backend.cpp newModuleDialog.cpp config.cpp preferencesDialog.cpp aboutDialog.cpp PBIModule.cpp .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.ui newModuleDialog.ui preferencesDialog.ui aboutDialog.ui .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents i18n/EasyPBI_af.ts i18n/EasyPBI_ar.ts i18n/EasyPBI_az.ts i18n/EasyPBI_bg.ts i18n/EasyPBI_bn.ts i18n/EasyPBI_bs.ts i18n/EasyPBI_ca.ts i18n/EasyPBI_cs.ts i18n/EasyPBI_cy.ts i18n/EasyPBI_da.ts i18n/EasyPBI_de.ts i18n/EasyPBI_el.ts i18n/EasyPBI_en_GB.ts i18n/EasyPBI_en_ZA.ts i18n/EasyPBI_es.ts i18n/EasyPBI_et.ts i18n/EasyPBI_eu.ts i18n/EasyPBI_fa.ts i18n/EasyPBI_fi.ts i18n/EasyPBI_fr.ts i18n/EasyPBI_fr_CA.ts i18n/EasyPBI_gl.ts i18n/EasyPBI_he.ts i18n/EasyPBI_hi.ts i18n/EasyPBI_hr.ts i18n/EasyPBI_hu.ts i18n/EasyPBI_id.ts i18n/EasyPBI_is.ts i18n/EasyPBI_it.ts i18n/EasyPBI_ja.ts i18n/EasyPBI_ka.ts i18n/EasyPBI_ko.ts i18n/EasyPBI_lt.ts i18n/EasyPBI_lv.ts i18n/EasyPBI_mk.ts i18n/EasyPBI_mn.ts i18n/EasyPBI_ms.ts i18n/EasyPBI_mt.ts i18n/EasyPBI_nb.ts i18n/EasyPBI_nl.ts i18n/EasyPBI_pa.ts i18n/EasyPBI_pl.ts i18n/EasyPBI_pt.ts i18n/EasyPBI_pt_BR.ts i18n/EasyPBI_ro.ts i18n/EasyPBI_ru.ts i18n/EasyPBI_sa.ts i18n/EasyPBI_sk.ts i18n/EasyPBI_sl.ts i18n/EasyPBI_sr.ts i18n/EasyPBI_sv.ts i18n/EasyPBI_sw.ts i18n/EasyPBI_ta.ts i18n/EasyPBI_tg.ts i18n/EasyPBI_th.ts i18n/EasyPBI_tr.ts i18n/EasyPBI_uk.ts i18n/EasyPBI_uz.ts i18n/EasyPBI_vi.ts i18n/EasyPBI_zh_CN.ts i18n/EasyPBI_zh_HK.ts i18n/EasyPBI_zh_TW.ts i18n/EasyPBI_zu.ts .tmp/EasyPBI1.0.0/ && (cd `dirname .tmp/EasyPBI1.0.0` && $(TAR) EasyPBI1.0.0.tar EasyPBI1.0.0 && $(COMPRESS) EasyPBI1.0.0.tar) && $(MOVE) `dirname .tmp/EasyPBI1.0.0`/EasyPBI1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/EasyPBI1.0.0 
     196        $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.h modBuild.h backend.h newModuleDialog.h config.h preferencesDialog.h aboutDialog.h PBIModule.h ModuleUtils.h .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents EasyPBI.qrc .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents main.cpp mainGUI.cpp modBuild.cpp backend.cpp newModuleDialog.cpp config.cpp preferencesDialog.cpp aboutDialog.cpp PBIModule.cpp ModuleUtils.cpp .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.ui newModuleDialog.ui preferencesDialog.ui aboutDialog.ui .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents i18n/EasyPBI_af.ts i18n/EasyPBI_ar.ts i18n/EasyPBI_az.ts i18n/EasyPBI_bg.ts i18n/EasyPBI_bn.ts i18n/EasyPBI_bs.ts i18n/EasyPBI_ca.ts i18n/EasyPBI_cs.ts i18n/EasyPBI_cy.ts i18n/EasyPBI_da.ts i18n/EasyPBI_de.ts i18n/EasyPBI_el.ts i18n/EasyPBI_en_GB.ts i18n/EasyPBI_en_ZA.ts i18n/EasyPBI_es.ts i18n/EasyPBI_et.ts i18n/EasyPBI_eu.ts i18n/EasyPBI_fa.ts i18n/EasyPBI_fi.ts i18n/EasyPBI_fr.ts i18n/EasyPBI_fr_CA.ts i18n/EasyPBI_gl.ts i18n/EasyPBI_he.ts i18n/EasyPBI_hi.ts i18n/EasyPBI_hr.ts i18n/EasyPBI_hu.ts i18n/EasyPBI_id.ts i18n/EasyPBI_is.ts i18n/EasyPBI_it.ts i18n/EasyPBI_ja.ts i18n/EasyPBI_ka.ts i18n/EasyPBI_ko.ts i18n/EasyPBI_lt.ts i18n/EasyPBI_lv.ts i18n/EasyPBI_mk.ts i18n/EasyPBI_mn.ts i18n/EasyPBI_ms.ts i18n/EasyPBI_mt.ts i18n/EasyPBI_nb.ts i18n/EasyPBI_nl.ts i18n/EasyPBI_pa.ts i18n/EasyPBI_pl.ts i18n/EasyPBI_pt.ts i18n/EasyPBI_pt_BR.ts i18n/EasyPBI_ro.ts i18n/EasyPBI_ru.ts i18n/EasyPBI_sa.ts i18n/EasyPBI_sk.ts i18n/EasyPBI_sl.ts i18n/EasyPBI_sr.ts i18n/EasyPBI_sv.ts i18n/EasyPBI_sw.ts i18n/EasyPBI_ta.ts i18n/EasyPBI_tg.ts i18n/EasyPBI_th.ts i18n/EasyPBI_tr.ts i18n/EasyPBI_uk.ts i18n/EasyPBI_uz.ts i18n/EasyPBI_vi.ts i18n/EasyPBI_zh_CN.ts i18n/EasyPBI_zh_HK.ts i18n/EasyPBI_zh_TW.ts i18n/EasyPBI_zu.ts .tmp/EasyPBI1.0.0/ && (cd `dirname .tmp/EasyPBI1.0.0` && $(TAR) EasyPBI1.0.0.tar EasyPBI1.0.0 && $(COMPRESS) EasyPBI1.0.0.tar) && $(MOVE) `dirname .tmp/EasyPBI1.0.0`/EasyPBI1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/EasyPBI1.0.0 
    195197 
    196198 
     
    329331        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o aboutDialog.o aboutDialog.cpp 
    330332 
    331 PBIModule.o: PBIModule.cpp  
     333PBIModule.o: PBIModule.cpp PBIModule.h 
    332334        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PBIModule.o PBIModule.cpp 
     335 
     336ModuleUtils.o: ModuleUtils.cpp ModuleUtils.h \ 
     337                PBIModule.h 
     338        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ModuleUtils.o ModuleUtils.cpp 
    333339 
    334340moc_mainGUI.o: moc_mainGUI.cpp  
  • src-qt4/EasyPBI-devel/PBIModule.cpp

    r809d133 r69ec30c  
    44  //Setup the possible values that are recognized 
    55    // 10.x PBI format: 12/5/13 
    6   version = "10.x"; 
     6  version = "10.x (12/5/13)"; 
    77  //pbi.conf values 
    88  CTextValues << "PBI_PROGNAME" << "PBI_PROGWEB" << "PBI_PROGAUTHOR" << "PBI_PROGICON" \ 
     
    1717  xdgBoolValues << "StartupNotify" << "Terminal" << "NoDisplay"; 
    1818  //valid MIME values 
    19      // NOTE: These are hard-coded in the file read/write below due to specific file format 
     19     // NOTE: These values are hard-coded in the file read/write below due to specific file format 
    2020  mimeValues << "xmlns" << "type" << "pattern";  
    2121         
     
    2626         
    2727// ============== 
    28 //  Modules READ/WRITE 
     28//        Initial load 
    2929// ============== 
    3030bool PBIModule::loadModule(QString confpath){ 
     
    3838} 
    3939         
     40QString PBIModule::modulePath(){ 
     41  return basePath; 
     42} 
     43 
    4044// ================== 
    4145//  CONFIGURATION VALUES 
     
    151155  for(int i=0; i<CTextValues.length(); i++){ 
    152156    QString line = CTextValues[i]+"=\""; 
    153     if(HASH.contains(CTextValues[i])){ line.append( HASH[CTextValues[i]].toString() ); } 
     157    if(HASH.contains(CTextValues[i])){  
     158      QString val = HASH[CTextValues[i]].toString(); 
     159        //special check for PBI_MAKEPORT format validity 
     160        if(CTextValues[i]=="PBI_MAKEPORT" && val.endsWith("/")){ val.chop(1); } //Make sure there is  
     161      line.append( val );  
     162    } 
    154163    line.append("\""); //close out the quotes 
    155164    contents << line; 
  • src-qt4/EasyPBI-devel/PBIModule.h

    r809d133 r69ec30c  
    22#define _EASYPBI_PBI_MODULE_H 
    33 
    4 #include <QObject> 
    54#include <QHash> 
    65#include <QString> 
     
    1211#include <QDebug> 
    1312 
    14 class PBIModule : public QObject{ 
    15         Q_OBJECT 
     13class PBIModule{ 
     14         
    1615public: 
    1716        PBIModule(); 
    1817        ~PBIModule(); 
    1918 
    20         //Overarching read 
    21         bool loadModule(QString); 
     19        //Initial read 
     20        bool loadModule(QString); //must give it the absolute path to a "pbi.conf" file 
     21 
     22        //Module directory path 
     23        QString modulePath(); 
    2224 
    2325        //pbi.conf Values 
     
    4749        //Resources 
    4850        QStringList existingResources(); 
    49         bool addResource(QString, QString); 
     51        bool addResource(QString filePath, QString resourcePath = ""); 
    5052         
    5153        //XDG files 
Note: See TracChangeset for help on using the changeset viewer.