[rkward-cvs] SF.net SVN: rkward: [2092] branches/KDE4_port/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 18 16:03:21 UTC 2007


Revision: 2092
          http://rkward.svn.sourceforge.net/rkward/?rev=2092&view=rev
Author:   tfry
Date:     2007-10-18 09:03:21 -0700 (Thu, 18 Oct 2007)

Log Message:
-----------
Fix word wrap in labels

Modified Paths:
--------------
    branches/KDE4_port/rkward/agents/showedittextfileagent.cpp
    branches/KDE4_port/rkward/dataeditor/editlabelsdialog.cpp
    branches/KDE4_port/rkward/dialogs/rkloadlibsdialog.cpp
    branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp
    branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
    branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
    branches/KDE4_port/rkward/plugin/rktext.cpp
    branches/KDE4_port/rkward/settings/rksettings.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp
    branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp

Modified: branches/KDE4_port/rkward/agents/showedittextfileagent.cpp
===================================================================
--- branches/KDE4_port/rkward/agents/showedittextfileagent.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/agents/showedittextfileagent.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -136,7 +136,7 @@
 	setMainWidget (page);
 	Q3VBoxLayout *layout = new Q3VBoxLayout (page, 0, spacingHint ());
 	QLabel *label = new QLabel (text, page);
-	label->setAlignment (Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs);
+	label->setWordWrap (true);
 	layout->addWidget (label);
 
 	setButtonText (KDialog::Ok, i18n ("Done"));

Modified: branches/KDE4_port/rkward/dataeditor/editlabelsdialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dataeditor/editlabelsdialog.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/dataeditor/editlabelsdialog.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -230,7 +230,7 @@
 	KVBox *mainvbox = new KVBox ();
 	setMainWidget (mainvbox);
 	QLabel *label = new QLabel (i18n ("Levels can be assigned only to consecutive integers starting with 1 (the index column is read only). To remove levels at the end of the list, just set them to empty."), mainvbox);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 
 	Q3HBoxLayout *hbox = new Q3HBoxLayout (mainvbox, KDialog::spacingHint ());
 

Modified: branches/KDE4_port/rkward/dialogs/rkloadlibsdialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkloadlibsdialog.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/dialogs/rkloadlibsdialog.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -256,7 +256,7 @@
 	
 	Q3VBoxLayout *mvbox = new Q3VBoxLayout (this, 0, KDialog::spacingHint ());
 	QLabel *label = new QLabel (i18n ("There are no safeguards against removing essential packages. For example, unloading \"rkward\" will prevent this application from running properly. Please be careful about the packages you unload."), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs | Qt::TextWordWrap);
+	label->setWordWrap (true);
 	mvbox->addWidget (label);
 	
 	Q3HBoxLayout *hbox = new Q3HBoxLayout (mvbox, KDialog::spacingHint ());
@@ -463,7 +463,7 @@
 	
 	Q3VBoxLayout *mvbox = new Q3VBoxLayout (this, 0, KDialog::spacingHint ());
 	QLabel *label = new QLabel (i18n ("In order to find out, which of your installed packaged have an update available, click \"Fetch List\". This feature requires a working internet connection."), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs | Qt::TextWordWrap);
+	label->setWordWrap (true);
 	mvbox->addWidget (label);
 	
 	Q3HBoxLayout *hbox = new Q3HBoxLayout (mvbox, KDialog::spacingHint ());
@@ -614,7 +614,7 @@
 	
 	Q3VBoxLayout *mvbox = new Q3VBoxLayout (this, 0, KDialog::spacingHint ());
 	QLabel *label = new QLabel (i18n ("Many packages are available on CRAN (Comprehensive R Archive Network), and other repositories (click \"Configure Repositories\" to add more sources). Click \"Fetch List\" to find out, which packages are available. This feature requires a working internet connection."), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs | Qt::TextWordWrap);
+	label->setWordWrap (true);
 	mvbox->addWidget (label);
 	Q3HBoxLayout *hbox = new Q3HBoxLayout (mvbox, KDialog::spacingHint ());
 	

Modified: branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -66,7 +66,7 @@
 	}
 
 	QLabel *promptl = new QLabel (prompt, page);
-	promptl->setAlignment (Qt::WordBreak | promptl->alignment ());
+	promptl->setWordWrap (true);
 
 	input = new QLineEdit (QString (), page);
 	input->setMinimumWidth (fontMetrics ().maxWidth ()*20);

Modified: branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -37,7 +37,7 @@
 	
 	Q3VBoxLayout *layout = new Q3VBoxLayout (this, KDialog::marginHint (), KDialog::spacingHint ());
 	QLabel *label = new QLabel (text, this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	layout->addWidget (label);
 	
 	QPushButton *cancel_button = new QPushButton (i18n ("Cancel"), this);

Modified: branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -202,7 +202,7 @@
 	Q3VBoxLayout *vbox = new Q3VBoxLayout (this, RKGlobals::marginHint (), RKGlobals::spacingHint ());
 
 	QLabel *label = new QLabel (text, this);
-	label->setAlignment (Qt::AlignLeft | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	vbox->addWidget (label);
 
 	error_indicator = new QLabel (i18n ("<b>There have been errors and / or warnings! See below for a transcript</b>"), this);

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -305,7 +305,7 @@
 		RKComponent *last_page = stack->addPage (component);
 		Q3VBoxLayout *vbox = new Q3VBoxLayout (last_page, RKGlobals::spacingHint ());
 		QLabel *label = new QLabel (i18n ("Below you can see the command(s) corresponding to the settings you made. Click 'Submit' to run the command(s)."), last_page);
-		label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+		label->setWordWrap (true);
 		code_display = new RKCommandEditorWindow (last_page, true);
 		vbox->addWidget (label);
 		vbox->addWidget (code_display);

Modified: branches/KDE4_port/rkward/plugin/rktext.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rktext.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/plugin/rktext.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -38,8 +38,8 @@
 	// create layout and label
 	Q3VBoxLayout *vbox = new Q3VBoxLayout (this, RKGlobals::spacingHint ());
 
-	label = new QLabel (QString::null, this);
-	label->setAlignment (Qt::AlignLeft | Qt::ExpandTabs | Qt::WordBreak);
+	label = new QLabel (QString (), this);
+	label->setWordWrap (true);
 	vbox->addWidget (label);
 
 	QString initial_text;

Modified: branches/KDE4_port/rkward/settings/rksettings.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettings.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/settings/rksettings.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -106,14 +106,9 @@
 	modules.append (new RKSettingsModuleObjectBrowser (this, this));
 	
 	ModuleList::const_iterator it;
-	KVBox *page;
 	int i=0;
 	for (it = modules.constBegin (); it != modules.constEnd (); ++it) {
-		page = new KVBox ();
-		pages[i++] = addPage (page, (*it)->caption ());
-
-// this is somewhat ugly, but works fine (KDE4: does it still?)
-		(*it)->setParent (page);
+		pages[i++] = addPage (*it, (*it)->caption ());
 		(*it)->show ();
 	}
 	RK_ASSERT (i == (NumPages - 1));

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -49,7 +49,7 @@
 
 	Q3VBoxLayout *main_vbox = new Q3VBoxLayout (this, RKGlobals::marginHint ());
 	QLabel *label = new QLabel (i18n ("Settings marked with (*) do not take effect until you restart RKWard"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	main_vbox->addWidget (label);
 
 	files_choser = new GetFileNameWidget (this, GetFileNameWidget::ExistingDirectory, i18n ("Directory where the logfiles should be kept (*)"), QString::null, new_files_path);
@@ -74,7 +74,7 @@
 	main_vbox->addSpacing (2*RKGlobals::spacingHint ());
 
 	label = new QLabel (i18n ("The workplace layout (i.e. which script-, data-, help-windows are open) may be saved (and loaded) per R workspace, or independent of the R workspace. Which do you prefer?"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	main_vbox->addWidget (label);
 
 	workplace_save_chooser = new Q3ButtonGroup (this);

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -38,7 +38,7 @@
 
 	Q3VBoxLayout *main_vbox = new Q3VBoxLayout (this, RKGlobals::marginHint ());
 	QLabel *label = new QLabel (i18n ("Changes in this section take effect the next time you start a plugin"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	main_vbox->addWidget (label);
 	
 	main_vbox->addSpacing (2*RKGlobals::spacingHint ());

Modified: branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -59,7 +59,7 @@
 	main_vbox->addSpacing (2*RKGlobals::spacingHint ());
 
 	QLabel *label = new QLabel (i18n ("The following settings mostly affect R behavior in the console. It is generally safe to keep these unchanged."), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	main_vbox->addWidget (label);
 
 	Q3GridLayout *grid = new Q3GridLayout (main_vbox, 1, 2, RKGlobals::spacingHint ());

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp	2007-10-18 16:02:38 UTC (rev 2091)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp	2007-10-18 16:03:21 UTC (rev 2092)
@@ -123,23 +123,23 @@
 	Q3VBoxLayout *vbox = new Q3VBoxLayout (this, RKGlobals::marginHint ());
 
 	QLabel *label = new QLabel (i18n ("For now, settings only apply to new commands. All previous commands remain visible/invisible."), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	vbox->addWidget (label);
 	vbox->addSpacing (10);
 	
 	Q3GridLayout *grid = new Q3GridLayout (vbox, 5, 5);
 
 	label = new QLabel (i18n ("always show command"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	grid->addWidget (label, 0, 1);
 	label = new QLabel (i18n ("always show result"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	grid->addWidget (label, 0, 2);
 	label = new QLabel (i18n ("show errors"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	grid->addWidget (label, 0, 3);
 	label = new QLabel (i18n ("show/raise window"), this);
-	label->setAlignment (Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
+	label->setWordWrap (true);
 	grid->addWidget (label, 0, 4);
 	
 	user_filter_boxes = addFilterSettings (this, grid, 1, i18n ("User commands"), user_filter);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list