summaryrefslogtreecommitdiffstats
path: root/klipper/urlgrabber.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /klipper/urlgrabber.h
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klipper/urlgrabber.h')
-rw-r--r--klipper/urlgrabber.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/klipper/urlgrabber.h b/klipper/urlgrabber.h
index ae39d648d..232455fa0 100644
--- a/klipper/urlgrabber.h
+++ b/klipper/urlgrabber.h
@@ -72,7 +72,8 @@ public:
private:
const ActionList& matchingActions( const QString& );
- void execute( const struct ClipCommand *command ) const;
+ void execute( const struct ClipCommand *command,
+ QStringList *backrefs ) const;
void editData();
bool isAvoidedWindow() const;
void actionMenu( bool wm_class_check );
@@ -83,6 +84,7 @@ private:
QString myClipData;
ClipAction *myCurrentAction;
QIntDict<ClipCommand> myCommandMapper;
+ QIntDict<QStringList> myGroupingMapper;
KPopupMenu *myMenu;
QTimer *myPopupKillTimer;
int myPopupKillTimeout;
@@ -127,8 +129,13 @@ public:
void setRegExp( const QString& r) { myRegExp = QRegExp( r ); }
QString regExp() const { return myRegExp.pattern(); }
- inline bool matches( const QString& string ) const {
- return ( myRegExp.search( string ) != -1 );
+ inline bool matches( const QString& string ) {
+ int res = myRegExp.search( string ) ;
+ if ( res != -1 ) {
+ myCapturedTexts = myRegExp.capturedTexts();
+ return true;
+ }
+ return false;
}
void setDescription( const QString& d) { myDescription = d; }
@@ -147,9 +154,15 @@ public:
*/
void save( KConfig * ) const;
+ /**
+ * Returns the most recent list of matched group backreferences.
+ * Note: you probably need to call matches() first.
+ */
+ inline const QStringList* capturedTexts() const { return &myCapturedTexts; }
private:
QRegExp myRegExp;
+ QStringList myCapturedTexts;
QString myDescription;
QPtrList<ClipCommand> myCommands;