namespace {
- vector<string> getRequiredList(string const & modName)
- {
- LyXModule const * const mod = moduleList[modName];
- if (!mod)
- return vector<string>(); //empty such thing
- return mod->getRequiredModules();
- }
+vector<string> getRequiredList(string const & modName)
+{
+ LyXModule const * const mod = moduleList[modName];
+ if (!mod)
+ return vector<string>(); //empty such thing
+ return mod->getRequiredModules();
+}
- vector<string> getExcludedList(string const & modName)
- {
- LyXModule const * const mod = moduleList[modName];
- if (!mod)
- return vector<string>(); //empty such thing
- return mod->getExcludedModules();
- }
+vector<string> getExcludedList(string const & modName)
+{
+ LyXModule const * const mod = moduleList[modName];
+ if (!mod)
+ return vector<string>(); //empty such thing
+ return mod->getExcludedModules();
+}
- docstring getModuleDescription(string const & modName)
- {
- LyXModule const * const mod = moduleList[modName];
- if (!mod)
- return _("Module not found!");
- return _(mod->getDescription());
- }
+docstring getModuleDescription(string const & modName)
+{
+ LyXModule const * const mod = moduleList[modName];
+ if (!mod)
+ return _("Module not found!");
+ return _(mod->getDescription());
+}
- vector<string> getPackageList(string const & modName)
- {
- LyXModule const * const mod = moduleList[modName];
- if (!mod)
- return vector<string>(); //empty such thing
- return mod->getPackageList();
- }
+vector<string> getPackageList(string const & modName)
+{
+ LyXModule const * const mod = moduleList[modName];
+ if (!mod)
+ return vector<string>(); //empty such thing
+ return mod->getPackageList();
+}
- bool isModuleAvailable(string const & modName)
- {
- LyXModule * mod = moduleList[modName];
- if (!mod)
- return false;
- return mod->isAvailable();
- }
-} //anonymous namespace
+bool isModuleAvailable(string const & modName)
+{
+ LyXModule * mod = moduleList[modName];
+ if (!mod)
+ return false;
+ return mod->isAvailable();
+}
+
+} // anonymous namespace
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// ModuleSelectionManager
+//
+/////////////////////////////////////////////////////////////////////
-ModuleSelMan::ModuleSelMan(
+ModuleSelectionManager::ModuleSelectionManager(
QListView * availableLV,
QListView * selectedLV,
QPushButton * addPB,
{}
-void ModuleSelMan::updateAddPB()
+void ModuleSelectionManager::updateAddPB()
{
int const arows = availableModel->rowCount();
QModelIndexList const availSels =
}
-void ModuleSelMan::updateDownPB()
+void ModuleSelectionManager::updateDownPB()
{
int const srows = selectedModel->rowCount();
if (srows == 0) {
find(reqs.begin(), reqs.end(), curModName) == reqs.end());
}
-void ModuleSelMan::updateUpPB()
+void ModuleSelectionManager::updateUpPB()
{
int const srows = selectedModel->rowCount();
if (srows == 0) {
upPB->setEnabled(find(reqs.begin(), reqs.end(), preModName) == reqs.end());
}
-void ModuleSelMan::updateDelPB()
+void ModuleSelectionManager::updateDelPB()
{
int const srows = selectedModel->rowCount();
if (srows == 0) {
//
/////////////////////////////////////////////////////////////////////
-PreambleModule::PreambleModule(): current_id_(0)
+PreambleModule::PreambleModule() : current_id_(0)
{
// This is not a memory leak. The object will be destroyed
// with this.
this, SLOT(browseMaster()));
selectionManager =
- new ModuleSelMan(latexModule->availableLV, latexModule->selectedLV,
+ new ModuleSelectionManager(latexModule->availableLV,
+ latexModule->selectedLV,
latexModule->addPB, latexModule->deletePB,
latexModule->upPB, latexModule->downPB,
availableModel(), selectedModel());