Maths packages: Further GUI improvements

This commit is contained in:
Juergen Spitzmueller 2013-03-02 10:03:08 +01:00
parent f520df382d
commit 3861fa1cb4
3 changed files with 70 additions and 0 deletions

View File

@ -1202,6 +1202,12 @@ GuiDocument::GuiDocument(GuiView & lv)
this, SLOT(change_adaptor()));
++i;
}
connect(mathsModule->allPackagesAutoPB, SIGNAL(clicked()),
this, SLOT(allPackagesAuto()));
connect(mathsModule->allPackagesAlwaysPB, SIGNAL(clicked()),
this, SLOT(allPackagesAlways()));
connect(mathsModule->allPackagesNotPB, SIGNAL(clicked()),
this, SLOT(allPackagesNot()));
// latex class
@ -3855,6 +3861,33 @@ void GuiDocument::executeBranchRenaming() const
}
void GuiDocument::allPackagesAuto()
{
allPackages(1);
}
void GuiDocument::allPackagesAlways()
{
allPackages(2);
}
void GuiDocument::allPackagesNot()
{
allPackages(3);
}
void GuiDocument::allPackages(int col)
{
for (int row = 0; row < mathsModule->packagesTW->rowCount(); ++row) {
QRadioButton * rb = (QRadioButton*)mathsModule->packagesTW->cellWidget(row, col);
rb->setChecked(true);
}
}
Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); }

View File

@ -126,6 +126,9 @@ private Q_SLOTS:
void osFontsChanged(bool);
void mathFontChanged(int);
void branchesRename(docstring const &, docstring const &);
void allPackagesAuto();
void allPackagesAlways();
void allPackagesNot();
private:
/// validate listings parameters and return an error message, if any
QString validateListingsParameters();
@ -263,6 +266,8 @@ private:
///
bool noMathFont() const;
///
void allPackages(int);
///
BufferParams bp_;
/// List of names of available modules
std::list<modInfoStruct> moduleNames_;

View File

@ -37,6 +37,38 @@
<column/>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="allPakcagesLA">
<property name="text">
<string>All packages:</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="allPackagesAutoPB">
<property name="text">
<string>Load a&amp;utomatically</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="allPackagesAlwaysPB">
<property name="text">
<string>Load alwa&amp;ys</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="allPackagesNotPB">
<property name="text">
<string>Do &amp;not load</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<includes>