|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 21:59:22
|
Update of /cvsroot/kimageprocess/kimageprocess/src/kimagecmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24238/src/kimagecmd Added Files: Makefile.am kimagecmd.cpp Log Message: Started implementing a command line tool --- NEW FILE: Makefile.am --- ## Makefile.am for kimageprocess # this is the program that gets installed. it's name is used for all # of the other Makefile.am variables bin_PROGRAMS = kimagecmd # set the include path for X, qt and KDE INCLUDES = $(all_includes) -I$(top_srcdir)/src/libkimageprocess -I$(top_srcdir)/src/libktimgview # the library search path. kimagecmd_LDFLAGS = $(KDE_RPATH) $(all_libraries) # the libraries to link against. kimagecmd_LDADD = ../libkimageprocess/libkimageprocess.la \ $(LIB_KFILE) # which sources should be compiled for kimageprocess kimagecmd_SOURCES = kimagecmd.cpp # these are the headers for your project noinst_HEADERS = # let automoc handle all of the meta source files (moc) METASOURCES = AUTO messages: rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kimageprocess.pot --- NEW FILE: kimagecmd.cpp --- #include <ktmethodmanager.h> #include <ktpluginmanager.h> #include <ktpatternmanager.h> #include <ktfeaturemanager.h> #include <ktproject.h> #include <kapplication.h> #include <kcmdlineargs.h> #include <klocale.h> static const KCmdLineOptions options[] = { { "+project_file", I18N_NOOP("The project to be used"), 0 }, KCmdLineLastOption // End of options. }; int main(int argc, char **argv) { KCmdLineArgs::init(argc, argv, "kimagecmd", "kimagecmd", "0.1"); KCmdLineArgs::addCmdLineOptions( options ); KApplication app(argc, argv); //Create the managers KTPluginManager::self(); KTFeatureManager::self(); KTMethodManager::self(); KTProject::self(); KTImageManager::self(); KTFeatureManager *featmng = KTFeatureManager::self(); KTProject *prj = KTProject::self(); QObject::connect(prj, SIGNAL(aboutToLoad(QDomElement*)), featmng, SLOT(slotLoad(QDomElement*))); QObject::connect(prj, SIGNAL(aboutToSave(QDomDocument*, QDomElement*)), featmng, SLOT(slotSave(QDomDocument*, QDomElement*))); //load all plugins KTPluginManager::self()->loadPlugins(); KTMethodManager::self()->loadMethods(); KTFeatureManager::self()->loadFeatures(); } |