Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r130 - trunk/java/ch/idok/qtgui

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r130 - trunk/java/ch/idok/qtgui


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r130 - trunk/java/ch/idok/qtgui
  • Date: Wed, 2 Jul 2008 13:57:05 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: huebner AT PSI.CH
Date: Wed Jul 2 13:57:05 2008
New Revision: 130

Log:
Resolved issue:
IDO-119 - make connect button flash after repository URL has changed

Modified:
trunk/java/ch/idok/qtgui/RepositoryController.java

Modified: trunk/java/ch/idok/qtgui/RepositoryController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/RepositoryController.java (original)
+++ trunk/java/ch/idok/qtgui/RepositoryController.java Wed Jul 2 13:57:05
2008
@@ -34,10 +34,14 @@
import com.trolltech.qt.core.QPoint;
import com.trolltech.qt.core.Qt;
import com.trolltech.qt.gui.QApplication;
+import com.trolltech.qt.gui.QColor;
import com.trolltech.qt.gui.QDialog;
import com.trolltech.qt.gui.QListWidgetItem;
import com.trolltech.qt.gui.QMessageBox;
+import com.trolltech.qt.gui.QPalette;
+import com.trolltech.qt.gui.QPalette$ColorRole;
import com.trolltech.qt.gui.QAbstractItemView.SelectionMode;
+import com.trolltech.qt.gui.QPalette.ColorRole;

/**
* This class is responsible for all data exchange between the Views and the
@@ -81,6 +85,7 @@
ui.urlPushButton.clicked.connect(this, "activateComboBox()");
ui.urlPushButton.clicked.connect(this, "connectRepository()");
ui.urlComboBox.activated.connect(this, "connectRepository()");
+ ui.urlComboBox.editTextChanged.connect(this,"urlChange()");
// allow to edit list by right clicking on it
uiList_ = new Ui_ListSelectionDialog();
listDialog_ = new QDialog();
@@ -98,6 +103,23 @@

}

+ public final void urlChange() {
+ ArrayList<String> plist = new ArrayList<String>();
+ plist = getPreferences();
+ if (!plist.contains(ui_.urlComboBox.currentText())){
+ QPalette pal = new QPalette();
+ pal.setColor(ColorRole.ButtonText, QColor.darkRed);
+ pal.setColor(ColorRole.Button, QColor.transparent);
+ ui_.urlPushButton.setPalette(pal);
+ }
+ if (plist.contains(ui_.urlComboBox.currentText())){
+ QPalette pal = new QPalette();
+ pal.setColor(ColorRole.ButtonText, QColor.color1);
+ pal.setColor(ColorRole.Button, QColor.color0);
+ ui_.urlPushButton.setPalette(pal);
+ }
+ }
+

public final void activateComboBox() {
if (ui_.urlComboBox.findText(ui_.urlComboBox.currentText()) == -1) {



  • [idok-commit] idok commit r130 - trunk/java/ch/idok/qtgui, Apache, 07/02/2008

Archive powered by MHonArc 2.6.19.

Top of Page