Skip to content

Commit

Permalink
make some more windows remember geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Mar 16, 2015
1 parent 7970036 commit 34dddb1
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 21 deletions.
3 changes: 2 additions & 1 deletion huggle/protectpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using namespace Huggle;

ProtectPage::ProtectPage(QWidget *parent) : QDialog(parent), ui(new Ui::ProtectPage)
ProtectPage::ProtectPage(QWidget *parent) : HW("protectpageform", this, parent), ui(new Ui::ProtectPage)
{
this->ui->setupUi(this);
this->PageToProtect = nullptr;
Expand All @@ -32,6 +32,7 @@ ProtectPage::ProtectPage(QWidget *parent) : QDialog(parent), ui(new Ui::ProtectP
this->ui->comboBox_3->setCurrentIndex(2);
this->tt = nullptr;
this->ui->comboBox->addItem(Configuration::HuggleConfiguration->ProjectConfig->ProtectReason);
this->RestoreWindow();
}

ProtectPage::~ProtectPage()
Expand Down
4 changes: 2 additions & 2 deletions huggle/protectpage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "definitions.hpp"

#include <QDialog>
#include "hw.hpp"
#include <QString>
#include <QtXml>
#include "collectable_smartptr.hpp"
Expand All @@ -34,7 +34,7 @@ namespace Huggle
/*!
* \brief The ProtectPage class display a window where user can protect a page given they have the permissions to do that
*/
class HUGGLE_EX ProtectPage : public QDialog
class HUGGLE_EX ProtectPage : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/reportuser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "ui_reportuser.h"
using namespace Huggle;

ReportUser::ReportUser(QWidget *parent) : QDialog(parent), ui(new Ui::ReportUser)
ReportUser::ReportUser(QWidget *parent) : HW("reportuser", this, parent), ui(new Ui::ReportUser)
{
this->ui->setupUi(this);
this->ReportedUser = nullptr;
Expand Down Expand Up @@ -84,6 +84,7 @@ ReportUser::ReportUser(QWidget *parent) : QDialog(parent), ui(new Ui::ReportUser
this->ui->tableWidget_2->setShowGrid(false);
this->tReportUser = nullptr;
this->ui->webView->setHtml(_l("report-select"));
this->RestoreWindow();
}

ReportUser::~ReportUser()
Expand Down
4 changes: 2 additions & 2 deletions huggle/reportuser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "definitions.hpp"

#include <QDialog>
#include "hw.hpp"
#include <QTimer>
#include <QCheckBox>
#include <QList>
Expand All @@ -35,7 +35,7 @@ namespace Huggle
class BlockUser;

//! Report user
class HUGGLE_EX ReportUser : public QDialog
class HUGGLE_EX ReportUser : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/requestprotect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@

using namespace Huggle;

RequestProtect::RequestProtect(WikiPage *wikiPage, QWidget *parent) : QDialog(parent), ui(new Ui::RequestProtect)
RequestProtect::RequestProtect(WikiPage *wikiPage, QWidget *parent) : HW("requestprotect", this, parent), ui(new Ui::RequestProtect)
{
this->page = new Huggle::WikiPage(wikiPage);
this->ui->setupUi(this);
this->setWindowTitle(_l("protect-request-title", this->page->PageName));
this->tm = new QTimer(this);
connect(this->tm, SIGNAL(timeout()), this, SLOT(Tick()));
this->RestoreWindow();
}

RequestProtect::~RequestProtect()
Expand Down
4 changes: 2 additions & 2 deletions huggle/requestprotect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "definitions.hpp"

#include <QTimer>
#include <QDialog>
#include "hw.hpp"
#include <QRegExp>
#include "wikipage.hpp"
#include "apiquery.hpp"
Expand All @@ -32,7 +32,7 @@ namespace Huggle
class ApiQuery;

//! This can be used to request protection of a page
class HUGGLE_EX RequestProtect : public QDialog
class HUGGLE_EX RequestProtect : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/sessionform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
#include "wikisite.hpp"

using namespace Huggle;
SessionForm::SessionForm(QWidget *parent) : QDialog(parent), ui(new Ui::SessionForm)
SessionForm::SessionForm(QWidget *parent) : HW("sessionform", this, parent), ui(new Ui::SessionForm)
{
this->ui->setupUi(this);
foreach (WikiSite *site, Configuration::HuggleConfiguration->Projects)
this->ui->comboBox->addItem(site->Name);
this->ui->comboBox->setEnabled(Configuration::HuggleConfiguration->Multiple);
this->ui->comboBox->setCurrentIndex(0);
this->Reload(0);
this->RestoreWindow();
}

SessionForm::~SessionForm()
Expand Down
4 changes: 2 additions & 2 deletions huggle/sessionform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "definitions.hpp"

#include <QDialog>
#include "hw.hpp"

namespace Ui
{
Expand All @@ -25,7 +25,7 @@ namespace Huggle
//! Session info

//! Display which user, project, what rights and flags your session have
class HUGGLE_EX SessionForm : public QDialog
class HUGGLE_EX SessionForm : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/speedyform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@

using namespace Huggle;

SpeedyForm::SpeedyForm(QWidget *parent) : QDialog(parent), ui(new Ui::SpeedyForm)
SpeedyForm::SpeedyForm(QWidget *parent) : HW("speedyform", this, parent), ui(new Ui::SpeedyForm)
{
this->timer = new QTimer(this);
this->connect(this->timer, SIGNAL(timeout()), this, SLOT(OnTick()));
this->ui->setupUi(this);
this->ui->checkBox->setText(_l("speedy-notifycreator"));
this->ui->label->setText(_l("speedy-reason"));
this->RestoreWindow();
}

SpeedyForm::~SpeedyForm()
Expand Down
4 changes: 2 additions & 2 deletions huggle/speedyform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "definitions.hpp"

#include <QTimer>
#include <QDialog>
#include "hw.hpp"
#include "apiquery.hpp"
#include "collectable_smartptr.hpp"
#include "editquery.hpp"
Expand All @@ -35,7 +35,7 @@ namespace Huggle
/*!
* \brief The window that is used to report a page for deletion
*/
class HUGGLE_EX SpeedyForm : public QDialog
class HUGGLE_EX SpeedyForm : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/uaareport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

using namespace Huggle;

UAAReport::UAAReport(QWidget *parent) : QDialog(parent), ui(new Ui::UAAReport)
UAAReport::UAAReport(QWidget *parent) : HW("uaareport", this, parent), ui(new Ui::UAAReport)
{
this->ui->setupUi(this);
this->User = nullptr;
Expand All @@ -40,6 +40,7 @@ UAAReport::UAAReport(QWidget *parent) : QDialog(parent), ui(new Ui::UAAReport)
this->OptionalReason = "";
this->ta = "";
this->UAAReportReason = "";
this->RestoreWindow();
}

UAAReport::~UAAReport()
Expand Down
4 changes: 2 additions & 2 deletions huggle/uaareport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "definitions.hpp"

#include <QDialog>
#include "hw.hpp"
#include <QString>
#include <QTimer>
#include "apiquery.hpp"
Expand All @@ -30,7 +30,7 @@ namespace Huggle
class WikiPage;
class ApiQuery;
//! Form to report users to UAA
class HUGGLE_EX UAAReport : public QDialog
class HUGGLE_EX UAAReport : public HW
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion huggle/wikipagetagsform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "ui_wikipagetagsform.h"

using namespace Huggle;
WikiPageTagsForm::WikiPageTagsForm(QWidget *parent) : QDialog(parent), ui(new Ui::WikiPageTagsForm)
WikiPageTagsForm::WikiPageTagsForm(QWidget *parent) : HW("wptf", this, parent), ui(new Ui::WikiPageTagsForm)
{
this->ui->setupUi(this);
QStringList header;
Expand All @@ -36,6 +36,7 @@ WikiPageTagsForm::WikiPageTagsForm(QWidget *parent) : QDialog(parent), ui(new U
this->ui->tableWidget->horizontalHeader()->setSelectionBehavior(QAbstractItemView::SelectRows);
this->ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
this->ui->tableWidget->setShowGrid(false);
this->RestoreWindow();
}

WikiPageTagsForm::~WikiPageTagsForm()
Expand Down
4 changes: 2 additions & 2 deletions huggle/wikipagetagsform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "definitions.hpp"

#include <QDialog>
#include "hw.hpp"
#include <QCheckBox>
#include <QLineEdit>
#include <QHash>
Expand All @@ -34,7 +34,7 @@ namespace Huggle
void WikiPageTagsForm_FinishRead(Query *result);

//! Form used to tag page
class HUGGLE_EX WikiPageTagsForm : public QDialog
class HUGGLE_EX WikiPageTagsForm : public HW
{
Q_OBJECT
public:
Expand Down

0 comments on commit 34dddb1

Please sign in to comment.