main.cpp
changeset 473 8b9cfc26638c
parent 434 c585be63ec69
child 486 9c86935835a4
     1.1 --- a/main.cpp	Wed Apr 25 16:02:54 2007 +0000
     1.2 +++ b/main.cpp	Wed Apr 25 16:02:54 2007 +0000
     1.3 @@ -12,6 +12,7 @@
     1.4  QString vymName;
     1.5  QString vymVersion;
     1.6  QString vymBuildDate;
     1.7 +QString vymCodeName;
     1.8  
     1.9  Main *mainWindow;				// used in BranchObj::select()								
    1.10  QString tmpVymDir;				// All temp files go there, created in mainwindow
    1.11 @@ -22,6 +23,7 @@
    1.12  QString iconPath;				// Pointing to icons used for toolbars
    1.13  QString flagsPath;				// Pointing to flags
    1.14  bool clipboardEmpty;			
    1.15 +bool debug;						// global debugging flag
    1.16  FlagRowObj *systemFlagsDefault;	// used to copy from in LinkableMapObj
    1.17  FlagRowObj *standardFlagsDefault;
    1.18  
    1.19 @@ -42,15 +44,17 @@
    1.20  	vymName=__VYM_NAME;
    1.21  	vymVersion=__VYM_VERSION;
    1.22  	vymBuildDate=__VYM_BUILD_DATE;
    1.23 +	vymCodeName=__VYM_CODENAME;
    1.24  
    1.25  
    1.26  	// Reading and initializing options commandline options
    1.27 -	options.add ("version", SwitchOption, "v","version");
    1.28 -	options.add ("local", SwitchOption, "l", "local");
    1.29 -	options.add ("help", SwitchOption, "h", "help");
    1.30 -	options.add ("quit", SwitchOption, "q", "quit");
    1.31 -	options.add ("run", StringOption, "r", "run");
    1.32 -	options.add ("test", StringOption, "t", "test");
    1.33 +	options.add ("debug", Option::Switch, "d", "debug");
    1.34 +	options.add ("version", Option::Switch, "v","version");
    1.35 +	options.add ("local", Option::Switch, "l", "local");
    1.36 +	options.add ("help", Option::Switch, "h", "help");
    1.37 +	options.add ("quit", Option::Switch, "q", "quit");
    1.38 +	options.add ("run", Option::String, "r", "run");
    1.39 +	options.add ("test", Option::String, "t", "test");
    1.40  	options.setHelpText (
    1.41  		"VYM - View Your Mind\n"
    1.42  		"--------------------\n\n"
    1.43 @@ -64,11 +68,14 @@
    1.44  		return 1;
    1.45  	}
    1.46  
    1.47 +	debug=options.isOn ("debug");
    1.48 +
    1.49  	if (options.isOn ("version"))
    1.50  	{
    1.51 -		cout << "vym version "<<__VYM_VERSION
    1.52 -			<<"  (c) 2004-2006 Uwe Drechsel - "
    1.53 -			<<__VYM_BUILD_DATE<<endl;
    1.54 +		cout << "vym version "<<__VYM_VERSION 
    1.55 +			<<"  (c) 2004-2007 Uwe Drechsel - "
    1.56 +			<<__VYM_BUILD_DATE 
    1.57 +			<<"  "<<__VYM_CODENAME<<endl;
    1.58  			
    1.59  		return 0;	
    1.60  	}