r24050 by jghali - Add missing include
scribus-commit
scribus-commit at lists.scribus.net
Sat Oct 3 23:57:16 UTC 2020
Author: jghali
Date: Sat Oct 3 23:57:16 2020
New Revision: 24050
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24050
Log:
Add missing include
Modified:
trunk/Scribus/scribus/ui/printlanguagecombo.cpp
Modified: trunk/Scribus/scribus/ui/printlanguagecombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24050&path=/trunk/Scribus/scribus/ui/printlanguagecombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printlanguagecombo.cpp (original)
+++ trunk/Scribus/scribus/ui/printlanguagecombo.cpp Sat Oct 3 23:57:16 2020
@@ -9,6 +9,7 @@
#include "commonstrings.h"
#include "printlanguagecombo.h"
+#include "scribusstructs.h"
#include "util_printer.h"
PrintLanguageCombo::PrintLanguageCombo(QWidget* parent) : QComboBox(parent)
@@ -43,11 +44,11 @@
int PrintLanguageCombo::findLanguage(PrintLanguage prnLanguage) const
{
- for (int i = 0; i < this->count(); ++i)
- {
- PrintLanguage printLanguage = languageAt(i);
- if (printLanguage == prnLanguage)
- return i;
+ for (int i = 0; i < this->count(); ++i)
+ {
+ PrintLanguage printLanguage = languageAt(i);
+ if (printLanguage == prnLanguage)
+ return i;
}
return -1;
@@ -55,11 +56,11 @@
bool PrintLanguageCombo::hasLanguage(PrintLanguage prnLanguage) const
{
- for (int i = 0; i < this->count(); ++i)
- {
- PrintLanguage printLanguage = languageAt(i);
- if (printLanguage == prnLanguage)
- return true;
+ for (int i = 0; i < this->count(); ++i)
+ {
+ PrintLanguage printLanguage = languageAt(i);
+ if (printLanguage == prnLanguage)
+ return true;
}
return false;
@@ -67,30 +68,30 @@
bool PrintLanguageCombo::hasPDF() const
{
- for (int i = 0; i < this->count(); ++i)
- {
- PrintLanguage prnLanguage = languageAt(i);
- if (prnLanguage == PrintLanguage::PDF)
- return true;
+ for (int i = 0; i < this->count(); ++i)
+ {
+ PrintLanguage prnLanguage = languageAt(i);
+ if (prnLanguage == PrintLanguage::PDF)
+ return true;
}
return false;
}
-bool PrintLanguageCombo::hasPostscript() const
-{
- for (int i = 0; i < this->count(); ++i)
- {
- PrintLanguage prnLanguage = languageAt(i);
- if (prnLanguage == PrintLanguage::PostScript1)
- return true;
- if (prnLanguage == PrintLanguage::PostScript2)
- return true;
- if (prnLanguage == PrintLanguage::PostScript3)
- return true;
- }
-
- return false;
+bool PrintLanguageCombo::hasPostscript() const
+{
+ for (int i = 0; i < this->count(); ++i)
+ {
+ PrintLanguage prnLanguage = languageAt(i);
+ if (prnLanguage == PrintLanguage::PostScript1)
+ return true;
+ if (prnLanguage == PrintLanguage::PostScript2)
+ return true;
+ if (prnLanguage == PrintLanguage::PostScript3)
+ return true;
+ }
+
+ return false;
}
PrintLanguage PrintLanguageCombo::languageAt(int index) const
@@ -146,31 +147,31 @@
setCurrentIndex(oldPDLIndex);
}
-void PrintLanguageCombo::changeEvent(QEvent *e)
-{
- if (e->type() == QEvent::LanguageChange)
- {
- languageChange();
- return;
- }
-
- QWidget::changeEvent(e);
-}
-
-void PrintLanguageCombo::languageChange()
-{
- for (int i = 0; i < this->count(); ++i)
- {
- PrintLanguage prnLanguage = languageAt(i);
- if (prnLanguage == PrintLanguage::PostScript1)
- setItemText(i, CommonStrings::trPostScript1);
- if (prnLanguage == PrintLanguage::PostScript2)
- setItemText(i, CommonStrings::trPostScript2);
- if (prnLanguage == PrintLanguage::PostScript3)
- setItemText(i, CommonStrings::trPostScript3);
- if (prnLanguage == PrintLanguage::WindowsGDI)
- setItemText(i, CommonStrings::trWindowsGDI);
- if (prnLanguage == PrintLanguage::PDF)
- setItemText(i, CommonStrings::trPDF);
- }
+void PrintLanguageCombo::changeEvent(QEvent *e)
+{
+ if (e->type() == QEvent::LanguageChange)
+ {
+ languageChange();
+ return;
+ }
+
+ QWidget::changeEvent(e);
+}
+
+void PrintLanguageCombo::languageChange()
+{
+ for (int i = 0; i < this->count(); ++i)
+ {
+ PrintLanguage prnLanguage = languageAt(i);
+ if (prnLanguage == PrintLanguage::PostScript1)
+ setItemText(i, CommonStrings::trPostScript1);
+ if (prnLanguage == PrintLanguage::PostScript2)
+ setItemText(i, CommonStrings::trPostScript2);
+ if (prnLanguage == PrintLanguage::PostScript3)
+ setItemText(i, CommonStrings::trPostScript3);
+ if (prnLanguage == PrintLanguage::WindowsGDI)
+ setItemText(i, CommonStrings::trWindowsGDI);
+ if (prnLanguage == PrintLanguage::PDF)
+ setItemText(i, CommonStrings::trPDF);
+ }
}
More information about the scribus-commit
mailing list