0.6.7:
* scale package icons to proper size in the package details dialog
-* other minor UI tweaks
+* minor UI tweaks and fixes for Qt 4.7
* fix: show free space and size correctly for large filesystems
-- system upgrade warning does not work
-- remove autorotation hacks (should work now with maemo pr1.3)
-- make sure network is online on startup (utilize Qt mobility features)
-- possible to save package selection or a list of installed (user category) packages anywhere ("backup & restore")
+- use QNetworkSession
+- fix: date fetching is very slow with qt4.7
+- test blacklist functionality with very large lists
0.7:
+- app list backup & restore
+
+
+0.8:
- support loading .install files
- support installing local .debs
- dbus interface for installing packages by name
known bugs:
-- possible to get stuck in portrait mode (wait for Qt autorotation fix)
- no window menu indicator in stacked windows (probably a Qt bug)
- updating menu icons after installation does not work or works only sometimes (currently disabled)
+- does not warn about system upgrade?
QApplication::processEvents(QEventLoop::WaitForMoreEvents);
}
} else {
- while( iDateRequestsWaiting>50 ) {
+ while( iDateRequestsWaiting>1 ) {
QApplication::processEvents(QEventLoop::WaitForMoreEvents);
}
}
void setText(QString title, QString text);
void disableButton();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
+ */
protected:
void changeEvent(QEvent *e);
QWidget(parent)
{
iParent = parent;
- iAlpha = 205;
+
iLayout = new QVBoxLayout(this);
iLabel = new QLabel(this);
iLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
iLabel->setAlignment(Qt::AlignCenter);
iLayout->addWidget(iLabel);
+ iLayout->setSizeConstraint(QLayout::SetMaximumSize);
+
+ iAlpha = 205;
iBusy = false;
iAnim = 0;
iAnimDir = 1;
iUpdateAnim = false;
iDownloadSpeed = -1;
+
iTimer = new QTimer(this);
connect(iTimer,SIGNAL(timeout()),this,SLOT(timerEvent()));
iUpdateAnim = false;
}
-void dimmer::resizeEvent(QResizeEvent *)
+void dimmer::resizeEvent(QResizeEvent* event)
{
- this->resize(iParent->size());
- iLayout->setGeometry(iParent->rect());
- iLayout->setSizeConstraint(QLayout::SetMaximumSize);
- iAnimY = this->rect().height()-this->rect().height()/4;
+ iAnimY = this->rect().height() - this->rect().height() / 4;
+ QWidget::resizeEvent(event);
}
void dimmer::orientationChanged()
{
- resizeEvent(0);
+ //resize( iParent->size() );
}
void dimmer::dim(QString title, QString message)
iAnimDir = 1;
show();
+
+ resize(iParent->size());
+
iTimer->start(250);
}
{
Q_OBJECT
public:
- explicit dimmer(QWidget *parent = 0);
+ explicit dimmer(QWidget *parent);
virtual ~dimmer();
void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(QResizeEvent* event);
void dim(QString title, QString message);
void undim();
void setList(QStringList labels, int selected);
int selection();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
+ */
protected:
void changeEvent(QEvent *e);
explicit Help(QWidget *parent = 0);
virtual ~Help();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
+ */
protected:
void changeEvent(QEvent *e);
int LogView::exec()
{
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
if(r.width() < r.height())
this->setAttribute(Qt::WA_Maemo5PortraitOrientation);
#endif
+ */
+
show();
//ui->plainTextEdit->setMinimumHeight( ui->plainTextEdit->contentsRect().height() );
int e = QDialog::exec();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
this->setAttribute(Qt::WA_Maemo5AutoOrientation);
#endif
+ */
+
return e;
}
iSettings->qsettings()->value("search_desclong",false).toBool() );
#ifdef Q_WS_MAEMO_5
- this->setAttribute(Qt::WA_Maemo5StackedWindow);
if( !iSettings->qsettings()->value("disable_autorotation",false).toBool() ) {
this->setAttribute(Qt::WA_Maemo5AutoOrientation);
} else {
this->setAttribute(Qt::WA_Maemo5LandscapeOrientation);
}
+ this->setAttribute(Qt::WA_Maemo5StackedWindow);
#endif
iDimmer = new dimmer(this);
installing_blacklisted = true;
}
#ifdef Q_WS_MAEMO_5
- if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) {
+ if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) { // unreliable?
warn_system_package_install = true;
}
#endif
}
}
+void MainWindow::resizeEvent(QResizeEvent* event)
+{
+ QRect sg = ui->listWidget->rect();
+
+ if( sg.width() > sg.height() ) {
+ ui->listWidget->setGridSize( QSize((sg.width()-12)/5, (sg.height()-12)/2) );
+ } else {
+ ui->listWidget->setGridSize( QSize((sg.width()-12)/3, (sg.height()-12)/3) );
+ }
+
+ if( iDimmer ) {
+ iDimmer->resize( this->size() );
+ }
+
+ QMainWindow::resizeEvent(event);
+}
+
void MainWindow::orientationChanged()
{
- if( QApplication::desktop()->width() > QApplication::desktop()->height() )
- ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/5, (ui->listWidget->height()-12)/2) );
- else
- ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/3, (ui->listWidget->height()-12)/3) );
}
void setNextOperation(nextOperation op_) { iNextOperation=op_; }
void on_btnUpdate_clicked();
+ void resizeEvent(QResizeEvent* event);
public slots:
void orientationChanged();
<property name="spacing">
<number>0</number>
</property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetNoConstraint</enum>
+ </property>
<property name="leftMargin">
<number>20</number>
</property>
</property>
<item>
<widget class="QListWidget" name="listWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<enum>QListView::LeftToRight</enum>
</property>
<property name="resizeMode">
- <enum>QListView::Fixed</enum>
+ <enum>QListView::Adjust</enum>
+ </property>
+ <property name="gridSize">
+ <size>
+ <width>140</width>
+ <height>160</height>
+ </size>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</item>
<item>
<widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
<x>0</x>
<y>0</y>
<width>800</width>
- <height>23</height>
+ <height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuMenu">
explicit PackageSelector(Package* pkg, AAptInterface* apt, Settings* set, QWidget *parent);
virtual ~PackageSelector();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
+ */
Package::operation selectedOperation();
void PackageView::resizeEvent(QResizeEvent* event)
{
+ if( iDimmer ) {
+ iDimmer->resize( this->size() );
+ }
+
iListCoverLabel->setGeometry( ui->listWidget->rect() );
QWidget::resizeEvent(event);
}
enum sortOrder { SortAlpha, SortDateDesc, SortSizeDesc };
- explicit PackageView(QWidget *parent = 0);
+ explicit PackageView(QWidget *parent);
virtual ~PackageView();
void openWin();
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
void show() {
if( !isVisible() ) {
+ /*
QRect r = dynamic_cast<QMainWindow*>(this->parent())->rect();
if(r.width() < r.height()) {
this->setAttribute(Qt::WA_Maemo5PortraitOrientation);
this->setAttribute( Qt::WA_Maemo5LandscapeOrientation );
}
this->setAttribute(Qt::WA_Maemo5StackedWindow);
- this->setWindowFlags(Qt::Window);
+ this->setWindowFlags( Qt::Window );
}
+ */
+ this->setAttribute(Qt::WA_Maemo5StackedWindow);
+ this->setWindowFlags( Qt::Window );
}
QMainWindow::show();
}
<x>0</x>
<y>0</y>
<width>800</width>
- <height>23</height>
+ <height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuMenu">
explicit RepoEdit(AAptInterface* apt, Repository* repo, int pos, QWidget *parent = 0);
virtual ~RepoEdit();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
-
+ */
protected:
void changeEvent(QEvent *e);
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
void show() {
if( !isVisible() ) {
+ /*
QRect r = dynamic_cast<QMainWindow*>(this->parent())->rect();
if(r.width() < r.height())
this->setAttribute(Qt::WA_Maemo5PortraitOrientation);
else
this->setAttribute( Qt::WA_Maemo5LandscapeOrientation );
}
+ */
this->setAttribute(Qt::WA_Maemo5StackedWindow);
- this->setWindowFlags(Qt::Window);
+ this->setWindowFlags( Qt::Window );
}
QMainWindow::show();
}
}
}
-void RotatingBackground::resizeEvent(QResizeEvent *)
+void RotatingBackground::resizeEvent(QResizeEvent* event)
{
- this->resize( dynamic_cast<QWidget*>(parent())->size() );
+ QWidget::resizeEvent(event);
}
void RotatingBackground::orientationChanged()
{
- resizeEvent(0);
}
virtual ~RotatingBackground();
void loadWallpaper();
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(QPaintEvent*);
+ void resizeEvent(QResizeEvent* event);
public slots:
void orientationChanged();
void setAptInterface(AAptInterface* apt) { iAptInterface=apt; }
void setPackageView(PackageView* v_) { iPackageView=v_; }
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
void open() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
QDialog::open();
}
#endif
+ */
QSettings* qsettings() { return iQSettings; }
explicit SortSelector(PackageView::sortOrder currOrder, QWidget *parent = 0);
virtual ~SortSelector();
+ /*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast<QWidget*>(this->parent())->rect();
return e;
}
#endif
+ */
PackageView::sortOrder selectedOperation();
protected: