45 #include <qapplication.h> 47 #define YUILogComponent "qt-pkg" 50 #include "YQPackageSelector.h" 51 #include "YQPkgTextDialog.h" 56 #include <Libyui_config.h> 67 html +=
para( _(
"<b>Note:</b> This is a just a short overview." 68 " Refer to the manual for details." ) );
70 if ( onlineUpdateMode() )
74 html +=
para( _(
"In this dialog, select patches to download and install." ) );
75 html +=
para( _(
"The list on the left side contains available patches" 76 " along with the respective patch kind (security, recommended, or optional)" 77 " and the (estimated) download size." ) );
78 html +=
para( _(
"This list normally contains only those patches that are not installed on your system yet." 79 " You can change that with the <b>Include Installed Patches</b> check box below the list." ) );
80 html +=
para( _(
"The <b>Patch Description</b> field contains a longer explanation of the currently" 81 " selected patch. Click a patch in the list to view its description here." ) );
82 html +=
para( _(
"The package list on the right side shows the contents of the currently selected patch, i.e.," 83 " the packages it contains. You cannot install or delete individual packages from a patch," 84 " only the patch as a whole. This is intentional to avoid system inconsistencies." ) );
90 html +=
para( _(
"In addition to <b>Patches</b>, you can also select one of the other filter views" 91 " from <b>Filter</b> at the upper left:" ) );
98 html +=
para( _(
"In this dialog, select which packages to install, update, or delete." 99 " You can select individual packages or entire package \"selections\"." ) );
100 html +=
para( _(
"Click the status icon for a package or selection to change the status" 101 " or right-click it to open a context menu." ) );
102 html +=
para( _(
"Use the <b>Check Dependencies</b> button to resolve package dependencies." 103 " Some packages require other packages to be installed." 104 " Some packages can only be installed if certain other packages are not installed, too." 105 " This check will automatically mark required packages for installation" 106 " and it will warn you if there are dependency conflicts." ) );
107 html +=
para( _(
"When you leave this dialog with <b>Accept</b>, this check will automatically be performed." ) );
113 html +=
para( _(
"Select one of the available filter views with the <b>Filter</b> combo-box" 114 " at the upper left:" ) );
117 html +=
listItem(
para( _(
"<b>Selections</b> shows some predefined sets of packages that logically belong together." ) ) +
118 para( _(
"Use the check box next to the selection to select it as a whole." 119 " You can also select or deselect individual packages in the package list at the right." ) ) );
126 html +=
listItem(
para( _(
"<b>Package Groups</b> shows packages by category. You can expand and collapse tree items" 127 " to refine or generalize categories. Click any category to display the packages" 128 " in that category in the package list on the right side." ) ) +
129 para( _(
" <b>Hint:</b> There is a \"zzz All\" entry at the very end of the list that will show" 130 " all packages. This may take a few seconds on slow machines." ) ) );
132 html +=
listItem(
para( _(
"<b>Search</b> allows you to search for packages that meet various criteria." 133 " This is usually the easiest way to find a package if you know its name." ) )+
134 para( _(
"<b>Hint:</b> You can also use this to find out what package contains a certain library. " 135 " Search in the <b>Provides</b> RPM field." ) ) );
137 html +=
listItem(
para( _(
"<b>Installation Summary</b> by default shows the changes to your system -- what packages" 138 " will be installed, deleted, or updated." ) ) +
139 para( _(
"It is generally a good idea to use <b>Check Dependencies</b> then switch to" 140 " <b>Installation Summary</b> before clicking <b>Accept</b>. This way you can see" 141 " all changes that will be made to your system." ) ) +
142 para( _(
"You can also explicitly select what packages with what status to see here;" 143 " use the check boxes at the left side." ) ) +
144 para( _(
"<b>Hint:</b> You can also reverse the effect of this filter." 145 " You can see what packages remain the same on your system. Simply check <b>Keep</b>" 146 " and uncheck everything else." ) ) );
164 html +=
"<table border='1'>";
166 html +=
symHelp(
"package-available",
168 _(
"Do not install" ),
170 _(
"This package is not installed and it will not be installed." ) );
172 html +=
symHelp(
"package-install",
176 _(
"This package will be installed. It is not installed yet." ) );
178 html +=
symHelp(
"package-installed-updated",
182 _(
"This package is already installed. Leave it untouched." ) );
184 html +=
symHelp(
"package-upgrade",
188 _(
"This package is already installed. Update it or reinstall it" 189 " (if the versions are the same)." ) );
191 html +=
symHelp(
"package-remove",
195 _(
"This package is already installed. Delete it." ) );
197 html +=
symHelp(
"package-available-locked",
201 _(
"This package is not installed and should not be installed under any circumstances, " 202 " especially not because of unresolved dependencies that other packages" 203 " might have or get." )
205 + _(
"Packages set to \"taboo\" are treated as if they did not exist on any installation media." ) );
207 html +=
symHelp(
"package-installed-locked",
211 _(
"This package is installed and should not be modified, " 212 " especially not because of unresolved dependencies that other packages" 213 " might have or get." )
215 + _(
"Use this status for third-party packages that should not be overwritten by newer versions" 216 " that may come with the distribution." ) );
218 html +=
symHelp(
"package-install-auto",
222 _(
"This package will be installed automatically because some other package needs it." )
224 + _(
"<b>Hint:</b> You may have to use \"taboo\" to get rid of such a package." ) );
226 html +=
symHelp(
"package-upgrade-auto",
230 _(
"This package is already installed, but some other package" 231 " needs a newer version, so it will automatically be updated." ) );
233 html +=
symHelp(
"package-remove-auto",
237 _(
"This package is already installed, but package dependencies require that it is deleted." )
238 + _(
"This can happen, for example, if some other package obsoletes this one." ) );
248 const QString & summary,
249 const QString & explanation )
251 QIcon icon = YQUI::ui()->loadIcon( imgFileName.toStdString() );
252 QPixmap pixmap = icon.pixmap(16);
253 QString html =
"<tr valign='top'>";
254 QByteArray byteArray;
255 QBuffer buffer(&byteArray);
256 pixmap.save(&buffer,
"PNG");
257 html += QString(
"<td><img src=\"data:image/png;base64,") + byteArray.toBase64() +
"\"/></td>";
258 html +=
"<td>" + summary +
"</td>" 259 +
"<td>" + explanation +
"</td>" 274 QString goto_next =
"<br>" + _(
"In any case, go to the next list item." );
277 html +=
"<table border=1>";
283 _(
"Get this package. Install it if it is not installed yet." 284 " Update it to the latest version if it is installed " 285 " and there is a newer version." )
292 _(
"Get rid of this package. Mark it as \"do not install\" " 293 "if it is not installed yet. Delete it if it is installed." )
300 _(
"Update this package if it is installed and there is a newer version." 301 " Ignore packages that are not installed." )
309 _(
"Undo the effect of \">\" above: Set package to \"keep\"" 310 " if it is currently set to \"update\". Ignore all other packages." )
317 _(
"Set this package to \"taboo\" if it is not installed:" 318 " make sure this package does not get installed, especially not" 319 " because of unresolved dependencies that other packages might have or get. " )
321 + _(
"Packages set to \"taboo\" are treated as if they did not exist on any installation media." )
329 _(
"Set this package to \"protected\" if it is installed:" 330 " make sure this package will not be modified, especially not" 331 " because of unresolved dependencies that other packages might have or get. " )
333 + _(
"Use this for third-party packages that should not be overwritten by newer versions" 334 " that may come with the distribution." )
346 const QString & summary,
347 const QString & explanation )
349 QString html =
"<tr valign='top'>";
351 "<td><table><tr><td align='center'><b>" 353 +
"</b></td></tr></table></td>" 354 +
"<td>" + summary +
"</td>" 355 +
"<td>" + explanation +
"</td>" 365 return "<p>" + text +
"</p>";
372 return "<li>" + text +
"</li>";
QString keyHelp(const QString &key, const QString &summary, const QString &explanation)
Return HTML code describing a key.
QString symHelp(const QString &imgFileName, const QString &summary, const QString &explanation)
Return HTML code describing a symbol (an icon).
void keyboardHelp()
Display online help about magic keys.
static void showText(QWidget *parent, const QString &text)
Show a text and wait until the user confirmed with 'OK'.
void symbolHelp()
Display online help about symbols (package status icons).
static QString listItem(const QString &text)
Basic HTML formatting: Embed text into ...
void help()
Display (generic) online help.
static QString para(const QString &text)
Basic HTML formatting: Embed text into.
static QString htmlHeading(const QString &text)
Returns a uniform heading in HTML format.