#include "keduvocdocument.h"
#include <qfileinfo.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QTextStream>
+#include <QtAlgorithms>
#include <kapplication.h>
#include <klocale.h>
if (KIO::NetAccess::download( url, tmpfile, 0 ))
{
QFile f(tmpfile);
- if (!f.open(IO_ReadOnly))
+ if (!f.open(QIODevice::ReadOnly))
{
KMessageBox::error(0, i18n("<qt>Cannot open file<br><b>%1</b></qt>").arg(url.path()));
return false;
bool read = false;
while (!read) {
- QApplication::setOverrideCursor( waitCursor );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
switch (ft) {
case kvtml:
{
QFile f(tmp.path());
- if (!f.open(IO_WriteOnly))
+ if (!f.open(QIODevice::WriteOnly))
{
KMessageBox::error(0, i18n("<qt>Cannot write to file<br><b>%1</b></qt>").arg(tmp.path()));
return false;
}
- QApplication::setOverrideCursor( waitCursor );
+ QApplication::setOverrideCursor(Qt::WaitCursor);
switch (ft) {
case kvtml: {
KEduVocKvtmlWriter kvtmlWriter(&f);
{
if (index < (int)m_identifiers.size() && index >= 1 )
{
- m_identifiers.erase(m_identifiers.at(index));
- QValueList<KEduVocExpression>::iterator it;
+ m_identifiers.takeAt(index);
+ Q3ValueList<KEduVocExpression>::iterator it;
for (it = m_vocabulary.begin(); it != m_vocabulary.end(); ++it)
(*it).removeTranslation(index);
}
sortAscending = m_sortIdentifier[index];
sortIndex = index;
- qHeapSort(m_vocabulary);
+ ///@todo port qStableSort(m_vocabulary);
m_sortIdentifier[index] = !m_sortIdentifier[index];
result = m_sortIdentifier[index];
}
void KEduVocDocument::resetEntry(int index, int lesson)
{
- QValueList<KEduVocExpression>::iterator it;
+ Q3ValueList<KEduVocExpression>::iterator it;
if (index < 0)
{
for (it = m_vocabulary.begin(); it != m_vocabulary.end(); ++it)
}
-QValueList<int> KEduVocDocument::lessonsInQuery() const
+Q3ValueList<int> KEduVocDocument::lessonsInQuery() const
{
- QValueList<int> iqvec;
+ Q3ValueList<int> iqvec;
for (unsigned i = 0; i < m_lessonsInQuery.size(); i++)
if (m_lessonsInQuery[i]) {
iqvec.push_back(i+1); // Offset <no lesson>
}
-void KEduVocDocument::setLessonsInQuery(QValueList<int> lesson_iq)
+void KEduVocDocument::setLessonsInQuery(Q3ValueList<int> lesson_iq)
{
m_lessonsInQuery.clear();
for (unsigned i = 0; i < m_lessonDescriptions.size(); i++)
KEduVocDocument::FileType KEduVocDocument::detectFileType(const QString &filename)
{
QFile f( filename );
- if (!f.open( IO_ReadOnly ))
+ if (!f.open( QIODevice::ReadOnly ))
return csv;
QDataStream is( &f );
KEduVocExpression *exp;
};
-typedef QValueList<ExpRef> ExpRefList;
+typedef Q3ValueList<ExpRef> ExpRefList;
int KEduVocDocument::cleanUp()
{
int count = 0;
KEduVocExpression *kve1, *kve2;
ExpRefList shadow;
- QValueList<int> to_delete;
+ Q3ValueList<int> to_delete;
for (int i = 0; i < (int) m_vocabulary.size(); i++)
shadow.push_back (ExpRef (entry(i), i));
- qHeapSort(shadow.begin(), shadow.end());
+ ///@todo port qStableSort(shadow.begin(), shadow.end());
#ifdef CLEAN_BUG
ofstream sso ("shadow.out");
f_ent_percent = to_delete.size () / 100.0;
emit progressChanged(this, 0);
- qHeapSort(to_delete.begin(), to_delete.end());
+ ///@todo port qStableSort(to_delete.begin(), to_delete.end());
//std::sort (to_delete.begin(), to_delete.end() );
for (int i = (int) to_delete.size()-1; i >= 0; i--) {
ent_no++;
#include <qobject.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QTextStream>
#include <kurl.h>
#include "keduvocexpression.h"
QString lessonDescription(int index) const;
/** returns lessons in current query */
- QValueList<int> lessonsInQuery() const;
+ Q3ValueList<int> lessonsInQuery() const;
/** sets lessons in current query */
- void setLessonsInQuery(QValueList<int>);
+ void setLessonsInQuery(Q3ValueList<int>);
inline QStringList lessonDescriptions() const { return m_lessonDescriptions; }
private:
bool m_dirty;
KURL m_url;
- QValueList<bool> m_sortIdentifier;
+ Q3ValueList<bool> m_sortIdentifier;
bool m_sortLesson;
bool m_unknownAttribute;
bool m_unknownElement;
int m_cols;
int m_lines;
int m_currentLesson;
- QValueList<int> m_extraSizeHints;
- QValueList<int> m_sizeHints;
+ Q3ValueList<int> m_extraSizeHints;
+ Q3ValueList<int> m_sizeHints;
QFont* m_font;
QString m_generator;
QString m_queryorg;
QString m_querytrans;
- QValueList<KEduVocExpression> m_vocabulary;
- QValueList<bool> m_lessonsInQuery;
+ Q3ValueList<KEduVocExpression> m_vocabulary;
+ Q3ValueList<bool> m_lessonsInQuery;
QStringList m_lessonDescriptions;
QStringList m_typeDescriptions;
QStringList m_tenseDescriptions;
QString m_remark;
QString m_version;
- QValueList<KEduVocArticle> m_articles;
- QValueList<KEduVocConjugation> m_conjugations;
+ Q3ValueList<KEduVocArticle> m_articles;
+ Q3ValueList<KEduVocConjugation> m_conjugations;
LeitnerSystem* m_leitnerSystem;
bool m_activeLeitnerSystem;
#define KV_LEV7_GRADE 7
#define KV_LEV7_TEXT I18N_NOOP("Level 7")
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qstringlist.h>
#include <qdatetime.h>
QStringList m_example;
QStringList m_antonym;
QStringList m_pronounciations;
- QValueList<grade_t> m_grades;
- QValueList<grade_t> m_reverseGrades;
- QValueList<count_t> m_queryCounts;
- QValueList<count_t> m_reverseQueryCounts;
- QValueList<count_t> m_badCounts;
- QValueList<count_t> m_reverseBadCounts;
- QValueList<QDateTime> m_queryDates;
- QValueList<QDateTime> m_reverseQueryDates;
- QValueList<KEduVocConjugation> m_conjugations;
- QValueList<KEduVocComparison> m_comparisons;
- QValueList<KEduVocMultipleChoice> m_multipleChoices;
+ Q3ValueList<grade_t> m_grades;
+ Q3ValueList<grade_t> m_reverseGrades;
+ Q3ValueList<count_t> m_queryCounts;
+ Q3ValueList<count_t> m_reverseQueryCounts;
+ Q3ValueList<count_t> m_badCounts;
+ Q3ValueList<count_t> m_reverseBadCounts;
+ Q3ValueList<QDateTime> m_queryDates;
+ Q3ValueList<QDateTime> m_reverseQueryDates;
+ Q3ValueList<KEduVocConjugation> m_conjugations;
+ Q3ValueList<KEduVocComparison> m_comparisons;
+ Q3ValueList<KEduVocMultipleChoice> m_multipleChoices;
QString m_leitnerBox;
int m_lesson;
#include "keduvocgrammar.h"
#include <klocale.h>
+//Added by qt3to4:
+#include <Q3ValueList>
KEduVocConjugation::conjug_name_t
KEduVocConjugation::names [] =
}
-QValueList<KEduVocTenseRelation> KEduVocConjugation::getRelation ()
+Q3ValueList<KEduVocTenseRelation> KEduVocConjugation::getRelation ()
{
- QValueList<KEduVocTenseRelation> vec;
+ Q3ValueList<KEduVocTenseRelation> vec;
for (int i = 0; i < numInternalNames(); i++) {
vec.append(KEduVocTenseRelation(names[i].abbrev, i18n(names[i].name)));
QString KEduVocConjugation::getName (const QString &abbrev)
{
- if (abbrev.length() >= 2 && abbrev[0] == QString(UL_USER_TENSE)) {
+ if (abbrev.length() >= 2 && QString(abbrev[0]) == QString(UL_USER_TENSE)) {
QString s = abbrev;
s.remove(0, 1);
int i = s.toInt() - 1;
#define grammarmanager_included
#include <qstring.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qstringlist.h>
#define CONJ_SIMPLE_PRESENT "PrSi" // I live at home what you frequently do
int numEntries() const;
- static QValueList<KEduVocTenseRelation> getRelation ();
+ static Q3ValueList<KEduVocTenseRelation> getRelation ();
static void setTenseNames (QStringList names);
static QString getName (const QString &abbrev);
};
protected:
- typedef QValueList<conjug_t> conjug_tList;
+ typedef Q3ValueList<conjug_t> conjug_tList;
conjug_tList conjugations;
static conjug_name_t names [];
#include <kmessagebox.h>
#include <qtextstream.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include "keduvockvtmlreader.h"
#include "keduvocdocument.h"
}
-bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent, QValueList<KEduVocConjugation> &curr_conjug, const QString &entry_tag)
+bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent, Q3ValueList<KEduVocConjugation> &curr_conjug, const QString &entry_tag)
/*
<conjugation> used in header for definiton of "prefix"
<e l="de"> lang determines also lang order in entries !!
QString antonym;
QString usage;
QString paraphrase;
- QValueList<KEduVocConjugation> conjug;
+ Q3ValueList<KEduVocConjugation> conjug;
KEduVocComparison comparison;
KEduVocMultipleChoice mc;
"read documents with unknown elements.\n"
);
QString msg = format.arg(elem);
- QApplication::setOverrideCursor( arrowCursor, true );
+ QApplication::setOverrideCursor(Qt::ArrowCursor, true);
QString s = kapp->makeStdCaption(i18n("Unknown element"));
KMessageBox::sorry(0, ln+msg, s);
QApplication::restoreOverrideCursor();
void KEduVocKvtmlReader::domError(const QString &text )
{
- QApplication::setOverrideCursor( arrowCursor, true );
+ QApplication::setOverrideCursor(Qt::ArrowCursor, true);
QString s = kapp->makeStdCaption(i18n("Error"));
QString ln = i18n("File:\t%1\n").arg(m_doc->URL().path());
QString msg = text;
#include <qfile.h>
#include <qdom.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include "keduvocdocument.h"
#include "keduvocgrammar.h"
bool readLesson(QDomElement &domElementParent);
bool readArticle(QDomElement &domElementParent);
- bool readConjug(QDomElement &domElementParent, QValueList<KEduVocConjugation> &curr_conjug, const QString &entry_tag);
+ bool readConjug(QDomElement &domElementParent, Q3ValueList<KEduVocConjugation> &curr_conjug, const QString &entry_tag);
bool readOptions(QDomElement &domElementParent);
bool readType(QDomElement &domElementParent);
bool readTense(QDomElement &domElementParent);
#include <kdebug.h>
#include <qdom.h>
#include <qtextstream.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include "keduvockvtmlwriter.h"
#include "keduvocdocument.h"
}
bool KEduVocKvtmlWriter::saveConjugHeader(QDomDocument &domDoc, QDomElement &domElementParent,
- QValueList<KEduVocConjugation> &curr_conjug)
+ Q3ValueList<KEduVocConjugation> &curr_conjug)
{
/*
<conjugation> used in header for definiton of "prefix"
return false;
QString q_org, q_trans;
- QValueList<KEduVocExpression>::const_iterator first = m_doc->m_vocabulary.begin ();
+ Q3ValueList<KEduVocExpression>::const_iterator first = m_doc->m_vocabulary.begin ();
m_doc->queryLang(q_org, q_trans);
int ent_no = 0;
#include <qfile.h>
#include <qdom.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//#include "keduvocdocument.h"
#include "keduvocgrammar.h"
bool saveOptionsKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
bool saveArticleKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
bool saveConjugHeader (QDomDocument &domDoc, QDomElement &domElementParent,
- QValueList<KEduVocConjugation> &curr_conjug);
+ Q3ValueList<KEduVocConjugation> &curr_conjug);
bool saveConjug (QDomDocument &domDoc, QDomElement &domElementParent,
const KEduVocConjugation &curr_conjug, QString type);
bool saveConjugEntry (QDomDocument &domDoc, QDomElement &domElementParent,
#include <qfile.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <QTextStream>
class KEduVocDocument;
//
#include "leitnersystem.h"
#include <kdebug.h>
+//Added by qt3to4:
+#include <Q3ValueList>
-LeitnerSystem::LeitnerSystem(QValueList<LeitnerBox>& boxes, QString name)
+LeitnerSystem::LeitnerSystem(Q3ValueList<LeitnerBox>& boxes, QString name)
{
if( !boxes.empty() )
m_boxes = boxes;
QStringList LeitnerSystem::getBoxNameList()
{
QStringList boxNameList;
- QValueList<LeitnerBox>::iterator it;
+ Q3ValueList<LeitnerBox>::iterator it;
for(it = m_boxes.begin(); it != m_boxes.end(); ++it)
LeitnerBox* LeitnerSystem::boxWithName( const QString& name )
{
- QValueList<LeitnerBox>::iterator it;
+ Q3ValueList<LeitnerBox>::iterator it;
for(it = m_boxes.begin(); it != m_boxes.end(); ++it)
{
#include <qstring.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include "leitnerbox.h"
#ifndef LEITNERSYSTEM_H
{
public:
LeitnerSystem();
- LeitnerSystem( QValueList<LeitnerBox>& boxes, QString name );
+ LeitnerSystem( Q3ValueList<LeitnerBox>& boxes, QString name );
~LeitnerSystem();
private:
QString m_systemName; //the systems name
- QValueList<LeitnerBox> m_boxes;
+ Q3ValueList<LeitnerBox> m_boxes;
};
#endif
#include <stdlib.h>
#include <kiconloader.h>
#include <qpainter.h>
+//Added by qt3to4:
+#include <QMouseEvent>
#include <kdebug.h>
-LeitnerSystemView::LeitnerSystemView(QWidget * parent, const char* name, WFlags f)
- : QScrollView(parent, name, f)
+LeitnerSystemView::LeitnerSystemView(QWidget * parent, const char* name, Qt::WFlags f)
+ : Q3ScrollView(parent, name, f)
{
m_highlightedBox = -1;
}
{
//p->drawPixmap(12 + i * 64 + i*10, m_imageY, KGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
p->drawRect(12 + i * 64 + i*10, m_imageY,64,64);
- p->fillRect(12 + i * 64 + i*10, m_imageY,64,64, QBrush(red));
+ p->fillRect(12 + i * 64 + i*10, m_imageY,64,64, QBrush(Qt::red));
}
else
{ //for each box 74 = 64(pixmap) + 10(distance between two boxes)
int dist, width = 0;
int numberOfBoxes = m_leitnerSystem->getNumberOfBoxes();
- p->setPen( QPen(green, 2) );
+ p->setPen( QPen(Qt::green, 2) );
//paint the connections for the correct word boxes, above the boxes
for(int i = 0; i < numberOfBoxes; i++)
}
//paint the connections for the wrong word boxes, below the boxes
- p->setPen(QPen(red, 2));
+ p->setPen(QPen(Qt::red, 2));
for(int i = 0; i < numberOfBoxes; i++)
{
#ifndef LEITNERSYSTEMVIEW_H
#define LEITNERSYSTEMVIEW_H
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qpixmap.h>
+//Added by qt3to4:
+#include <QMouseEvent>
class LeitnerSystem;
@author Martin Pfeiffer
*/
-class LeitnerSystemView : public QScrollView
+class LeitnerSystemView : public Q3ScrollView
{
Q_OBJECT
public:
- LeitnerSystemView(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ LeitnerSystemView(QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0);
~LeitnerSystemView();
#include <kdebug.h>
-PrefLeitner::PrefLeitner(QWidget * parent, const char* name, WFlags f, LeitnerSystem* system)
- : PrefLeitnerBase( parent, name, f )
+PrefLeitner::PrefLeitner(QWidget * parent, LeitnerSystem* system) : QDialog(parent)
{
- m_selectedSystem = system;
+ setupUi(this);
+ m_selectedSystem = system;
m_selectedBox = 0;
//create new leitnersystemview, show and connect it
m_leitnerSystemView = new LeitnerSystemView( this, 0 );
- PrefLeitnerBaseLayout->addWidget( m_leitnerSystemView, 1, 0 );
- PrefLeitnerBaseLayout->setOrigin( QGridLayout::BottomLeft );
+ ///@todo port PrefLeitnerBaseLayout->addWidget( m_leitnerSystemView, 1, 0 );
+ ///@todo port PrefLeitnerBaseLayout->setOrigin( Qt::BottomLeftCorner );
connect( m_leitnerSystemView, SIGNAL( boxClicked( int ) ), this, SLOT( slotBoxClicked( int ) ) );
m_leitnerSystemView->setSystem( m_selectedSystem );
}
-
-PrefLeitner::~PrefLeitner()
-{
-}
-
void PrefLeitner::slotCorrectWord( const QString& newBox )
{
if( m_selectedBox == 0 )
/**
@author Martin Pfeiffer
*/
-class PrefLeitner : public PrefLeitnerBase
+class PrefLeitner : public QDialog, public Ui::PrefLeitnerBase
{
Q_OBJECT
public:
- PrefLeitner(QWidget * parent, const char* name, WFlags f, LeitnerSystem* system);
+ PrefLeitner(QWidget * parent, LeitnerSystem* system);
- ~PrefLeitner();
-
LeitnerSystem* getSystem();
public slots:
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>PrefLeitnerBase</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>PrefLeitnerBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>770</width>
- <height>458</height>
- </rect>
- </property>
- <property name="caption">
- <string>Leitner System</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>layout5</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QPushButton" row="3" column="3">
- <property name="name">
- <cstring>btnApply</cstring>
- </property>
- <property name="text">
- <string>Appl&y Changes</string>
- </property>
- <property name="accel">
- <string>Alt+Y</string>
- </property>
- </widget>
- <spacer row="3" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>421</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="3" colspan="1">
- <property name="name">
- <cstring>lytBoxName</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLineEdit" row="1" column="0">
- <property name="name">
- <cstring>lndBoxName</cstring>
- </property>
- </widget>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>lblBoxName</cstring>
- </property>
- <property name="text">
- <string>Edit box name:</string>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="QPushButton" row="3" column="2">
- <property name="name">
- <cstring>btnDiscard</cstring>
- </property>
- <property name="text">
- <string>Disc&ard Changes</string>
- </property>
- <property name="accel">
- <string>Alt+A</string>
- </property>
- </widget>
- <widget class="QPushButton" row="1" column="0">
- <property name="name">
- <cstring>btnAddBox</cstring>
- </property>
- <property name="text">
- <string>Add a bo&x</string>
- </property>
- <property name="accel">
- <string>Alt+X</string>
- </property>
- </widget>
- <widget class="QPushButton" row="2" column="0">
- <property name="name">
- <cstring>btnDeleteBox</cstring>
- </property>
- <property name="text">
- <string>Delete selected &box</string>
- </property>
- <property name="accel">
- <string>Alt+B</string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="0" column="2" rowspan="3" colspan="2">
- <property name="name">
- <cstring>lytWrongCorrect</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>lblCorrect</cstring>
- </property>
- <property name="paletteBackgroundColor">
- <color>
- <red>0</red>
- <green>255</green>
- <blue>0</blue>
- </color>
- </property>
- <property name="text">
- <string>Correct words to:</string>
- </property>
- </widget>
- <widget class="QComboBox" row="0" column="1">
- <property name="name">
- <cstring>cmbCorrect</cstring>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>lblWrong</cstring>
- </property>
- <property name="paletteBackgroundColor">
- <color>
- <red>255</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </property>
- <property name="text">
- <string>Wrong words to:</string>
- </property>
- </widget>
- <widget class="QComboBox" row="1" column="1">
- <property name="name">
- <cstring>cmbWrong</cstring>
- </property>
- <property name="paletteBackgroundColor">
- <color>
- <red>253</red>
- <green>253</green>
- <blue>253</blue>
- </color>
- </property>
- </widget>
- </grid>
- </widget>
- <spacer row="0" column="0">
- <property name="name">
- <cstring>spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>252</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>PrefLeitnerBase</class>
+ <widget class="QDialog" name="PrefLeitnerBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>770</width>
+ <height>458</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Leitner System</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>10</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="3" column="3" >
+ <widget class="QPushButton" name="btnApply" >
+ <property name="text" >
+ <string>Appl&y Changes</string>
+ </property>
+ <property name="shortcut" >
+ <string>Alt+Y</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>421</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item rowspan="3" row="0" column="1" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLineEdit" name="lndBoxName" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="lblBoxName" >
+ <property name="text" >
+ <string>Edit box name:</string>
+ </property>
</widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>cmbCorrect</sender>
- <signal>activated(const QString&)</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotCorrectWord(const QString&)</slot>
- </connection>
- <connection>
- <sender>cmbWrong</sender>
- <signal>activated(const QString&)</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotWrongWord(const QString&)</slot>
- </connection>
- <connection>
- <sender>lndBoxName</sender>
- <signal>textChanged(const QString&)</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotBoxName(const QString&)</slot>
- </connection>
- <connection>
- <sender>btnAddBox</sender>
- <signal>clicked()</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotAddBox()</slot>
- </connection>
- <connection>
- <sender>btnDeleteBox</sender>
- <signal>clicked()</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotDeleteBox()</slot>
- </connection>
- <connection>
- <sender>btnApply</sender>
- <signal>clicked()</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotDiscard()</slot>
- </connection>
- <connection>
- <sender>btnDiscard</sender>
- <signal>clicked()</signal>
- <receiver>PrefLeitnerBase</receiver>
- <slot>slotApply()</slot>
- </connection>
-</connections>
-<slots>
- <slot>slotBoxName(const QString&)</slot>
- <slot>slotSystem(const QString&)</slot>
- <slot>slotWrongWord(const QString&)</slot>
- <slot>slotCorrectWord(const QString&)</slot>
- <slot>slotAddBox()</slot>
- <slot>slotDeleteBox()</slot>
- <slot>slotDiscard()</slot>
- <slot>slotApply()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="2" >
+ <widget class="QPushButton" name="btnDiscard" >
+ <property name="text" >
+ <string>Disc&ard Changes</string>
+ </property>
+ <property name="shortcut" >
+ <string>Alt+A</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="btnAddBox" >
+ <property name="text" >
+ <string>Add a bo&x</string>
+ </property>
+ <property name="shortcut" >
+ <string>Alt+X</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="btnDeleteBox" >
+ <property name="text" >
+ <string>Delete selected &box</string>
+ </property>
+ <property name="shortcut" >
+ <string>Alt+B</string>
+ </property>
+ </widget>
+ </item>
+ <item rowspan="3" row="0" column="2" colspan="2" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="lblCorrect" >
+ <property name="text" >
+ <string>Correct words to:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="cmbCorrect" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="lblWrong" >
+ <property name="text" >
+ <string>Wrong words to:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="cmbWrong" />
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>